]> code.ossystems Code Review - openembedded-core.git/commitdiff
mkefidisk: Always specify a root= kernel parameter
authorDarren Hart <dvhart@linux.intel.com>
Tue, 19 Mar 2013 22:15:02 +0000 (15:15 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 22 Mar 2013 16:51:16 +0000 (16:51 +0000)
The current script only replaces an existing root= kernel parameter
which can result images created without a root= paremeter, even though
the script expects a target rootfs parameter.

Rather than replacing the root= parameter, delete the root= parameter if
it exists, then append an appropriate root= parameter.

Fixes [YOCTO 4035] mkefidisk.sh forgets to add root= parameter

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Cc: Koen Kooi <koen@dominion.thruhere.net>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/contrib/mkefidisk.sh

index b7db0a913421ba3d2b10e901c157768d2e0577c0..40203ee9ccc557e44a017599fa2628b94d9bf246 100755 (executable)
@@ -250,8 +250,10 @@ sed -i "/menuentry 'install'/,/^}/d" $GRUBCFG
 sed -i "/initrd /d" $GRUBCFG
 # Delete any LABEL= strings
 sed -i "s/ LABEL=[^ ]*/ /" $GRUBCFG
-# Replace the ramdisk root with the install device and include other options
-sed -i "s@ root=[^ ]*@ root=$TARGET_ROOTFS rw $ROOTWAIT quiet@" $GRUBCFG
+# Replace the ramdisk root (if any) with the install device and include other
+# kernel parameters
+sed -i "s@ root=[^ ]*@ @" $GRUBCFG
+sed -i "s@vmlinuz @vmlinuz root=$TARGET_ROOTFS rw $ROOTWAIT quiet @" $GRUBCFG
 
 # Provide a startup.nsh script for older firmware with non-standard boot
 # directories and paths.