diff options
Diffstat (limited to 'scripts/lib/mic/plugins/source')
-rw-r--r-- | scripts/lib/mic/plugins/source/rootfs.py | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/scripts/lib/mic/plugins/source/rootfs.py b/scripts/lib/mic/plugins/source/rootfs.py index 6323811183..75999e03d2 100644 --- a/scripts/lib/mic/plugins/source/rootfs.py +++ b/scripts/lib/mic/plugins/source/rootfs.py @@ -45,14 +45,26 @@ class RootfsPlugin(SourcePlugin): @classmethod def do_prepare_partition(self, part, cr, cr_workdir, oe_builddir, bootimg_dir, - kernel_dir, rootfs_dir, native_sysroot): + kernel_dir, krootfs_dir, native_sysroot): """ Called to do the actual content population for a partition i.e. it 'prepares' the partition to be incorporated into the image. In this case, prepare content for legacy bios boot partition. """ - if part.rootfs: - rootfs_dir = part.rootfs + if part.rootfs is None: + if not 'ROOTFS_DIR' in krootfs_dir: + msg = "Couldn't find --rootfs-dir, exiting" + msger.error(msg) + rootfs_dir = krootfs_dir['ROOTFS_DIR'] + else: + if part.rootfs in krootfs_dir: + rootfs_dir = krootfs_dir[part.rootfs] + elif os.path.isdir(part.rootfs): + rootfs_dir = part.rootfs + else: + msg = "Couldn't find --rootfs-dir=%s connection" + msg += " or it is not a valid path, exiting" + msger.error(msg % part.rootfs) part.set_rootfs(rootfs_dir) part.prepare_rootfs(cr_workdir, oe_builddir, rootfs_dir, native_sysroot) |