|
@@ -60,6 +60,13 @@ class RootfsUBootPlugin(RootfsPlugin):
|
|
|
(rootfs_dir, image_rootfs_dir))
|
|
|
real_rootfs_dir = image_rootfs_dir
|
|
|
|
|
|
+ root_dev = cr.rootdev
|
|
|
+ if not root_dev:
|
|
|
+ root_dev = source_params.get("root", None)
|
|
|
+ if not root_dev:
|
|
|
+ raise WicError("root not defined, exiting.")
|
|
|
+ root_dev = root_dev.replace(":", "=")
|
|
|
+
|
|
|
u_boot_script = os.path.join(real_rootfs_dir,
|
|
|
"etc/default/u-boot-script")
|
|
|
if not os.path.exists(u_boot_script):
|
|
@@ -70,7 +77,7 @@ class RootfsUBootPlugin(RootfsPlugin):
|
|
|
cfg.write('# Generated by wic, rootfs-u-boot plugin\n')
|
|
|
cfg.write('ROOT_PARTITION="%d"\n' % part.realnum)
|
|
|
cfg.write('KERNEL_ARGS="root=%s %s"\n' % \
|
|
|
- (cr.rootdev, cr.ks.bootloader.append or ""))
|
|
|
+ (root_dev, cr.ks.bootloader.append or ""))
|
|
|
no_initrd = source_params.get('no_initrd') or ''
|
|
|
cfg.write('NO_INITRD="%s"\n' % no_initrd)
|
|
|
overlays = source_params.get('overlays') or ''
|