diff options
author | Ed Bartosh <ed.bartosh@linux.intel.com> | 2017-02-10 12:57:13 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-02-15 20:06:45 -0800 |
commit | 01d37e7537df84ec511164dc72f1f7db7b181527 (patch) | |
tree | eddcc2e0c2d4cb5423ef0f78cb6d679caf5783fc /scripts | |
parent | 58528cd5a7fbf8248257535055ef03b075e2b3c4 (diff) | |
download | poky-01d37e7537df84ec511164dc72f1f7db7b181527.tar.gz |
wic: direct: set bootloader.source in the __init__
Moved setting of bootloader source from do_create method
to __init__ as it doesn't have anything to do with image
creation.
(From OE-Core rev: 361b890da1c7b24de0a62516545e4c164830081d)
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/lib/wic/plugins/imager/direct.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/scripts/lib/wic/plugins/imager/direct.py b/scripts/lib/wic/plugins/imager/direct.py index 18cd2773d1..64a3368526 100644 --- a/scripts/lib/wic/plugins/imager/direct.py +++ b/scripts/lib/wic/plugins/imager/direct.py | |||
@@ -87,6 +87,13 @@ class DirectPlugin(ImagerPlugin): | |||
87 | continue | 87 | continue |
88 | part.realnum = realnum | 88 | part.realnum = realnum |
89 | 89 | ||
90 | # as a convenience, set source to the boot partition source | ||
91 | # instead of forcing it to be set via bootloader --source | ||
92 | for part in self.parts: | ||
93 | if not self.ks.bootloader.source and part.mountpoint == "/boot": | ||
94 | self.ks.bootloader.source = part.source | ||
95 | break | ||
96 | |||
90 | def do_create(self): | 97 | def do_create(self): |
91 | """ | 98 | """ |
92 | Plugin entry point. | 99 | Plugin entry point. |
@@ -160,12 +167,6 @@ class DirectPlugin(ImagerPlugin): | |||
160 | self._image = PartitionedImage(image_path, self.ptable_format, | 167 | self._image = PartitionedImage(image_path, self.ptable_format, |
161 | self.parts, self.native_sysroot) | 168 | self.parts, self.native_sysroot) |
162 | 169 | ||
163 | for part in self.parts: | ||
164 | # as a convenience, set source to the boot partition source | ||
165 | # instead of forcing it to be set via bootloader --source | ||
166 | if not self.ks.bootloader.source and part.mountpoint == "/boot": | ||
167 | self.ks.bootloader.source = part.source | ||
168 | |||
169 | fstab_path = self._write_fstab(self.rootfs_dir.get("ROOTFS_DIR")) | 170 | fstab_path = self._write_fstab(self.rootfs_dir.get("ROOTFS_DIR")) |
170 | 171 | ||
171 | for part in self.parts: | 172 | for part in self.parts: |