[oe-commits] Darren Hart : mkefidisk: Always use rootwait and document kernel parameters used

git at git.openembedded.org git at git.openembedded.org
Fri Mar 22 17:05:38 UTC 2013


Module: openembedded-core.git
Branch: master
Commit: 5b6a6a3872fd341cf978be40c69707223e3c29df
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=5b6a6a3872fd341cf978be40c69707223e3c29df

Author: Darren Hart <dvhart at linux.intel.com>
Date:   Tue Mar 19 15:15:04 2013 -0700

mkefidisk: Always use rootwait and document kernel parameters used

Without a reliable way of knowing if the target device with be an
asyncronous block device on the target (MMC or USB), err on the side of
caution of always specifcy "rootwait", ensuring the kernel will wait for
the device to appear and not abort if it hasn't appeared in time for
mount.

Document the remaining kernel parameters added by this script on the
same line as rootwait.

Signed-off-by: Darren Hart <dvhart at linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>

---

 scripts/contrib/mkefidisk.sh |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/scripts/contrib/mkefidisk.sh b/scripts/contrib/mkefidisk.sh
index 9275ecf..f8c08dd 100755
--- a/scripts/contrib/mkefidisk.sh
+++ b/scripts/contrib/mkefidisk.sh
@@ -132,9 +132,7 @@ ROOTFS_START=$((BOOT_SIZE))
 ROOTFS_END=$((ROOTFS_START+ROOTFS_SIZE))
 SWAP_START=$((ROOTFS_END))
 
-# MMC devices are special in a couple of ways
-# 1) they use a partition prefix character 'p'
-# 2) they are detected asynchronously (need ROOTWAIT)
+# MMC devices use a partition prefix character 'p'
 PART_PREFIX=""
 if [ ! "${DEVICE#/dev/mmcblk}" = "${DEVICE}" ]; then
 	PART_PREFIX="p"
@@ -143,11 +141,9 @@ BOOTFS=$DEVICE${PART_PREFIX}1
 ROOTFS=$DEVICE${PART_PREFIX}2
 SWAP=$DEVICE${PART_PREFIX}3
 
-ROOTWAIT=""
 TARGET_PART_PREFIX=""
 if [ ! "${TARGET_DEVICE#/dev/mmcblk}" = "${TARGET_DEVICE}" ]; then
 	TARGET_PART_PREFIX="p"
-	ROOTWAIT="rootwait"
 fi
 TARGET_ROOTFS=$TARGET_DEVICE${TARGET_PART_PREFIX}2
 TARGET_SWAP=$TARGET_DEVICE${TARGET_PART_PREFIX}3
@@ -250,10 +246,14 @@ sed -i "/menuentry 'install'/,/^}/d" $GRUBCFG
 sed -i "/initrd /d" $GRUBCFG
 # Delete any LABEL= strings
 sed -i "s/ LABEL=[^ ]*/ /" $GRUBCFG
-# Replace the ramdisk root (if any) with the install device and include other
-# kernel parameters
+# Remove any existing root= kernel parameters and:
+# o Add a root= parameter with the target rootfs
+# o Specify ro so fsck can be run during boot
+# o Specify rootwait in case the target media is an asyncronous block device
+#   such as MMC or USB disks
+# o Specify "quiet" to minimize boot time when using slow serial consoles
 sed -i "s@ root=[^ ]*@ @" $GRUBCFG
-sed -i "s at vmlinuz @vmlinuz root=$TARGET_ROOTFS ro $ROOTWAIT quiet @" $GRUBCFG
+sed -i "s at vmlinuz @vmlinuz root=$TARGET_ROOTFS ro rootwait quiet @" $GRUBCFG
 
 # Provide a startup.nsh script for older firmware with non-standard boot
 # directories and paths.





More information about the Openembedded-commits mailing list