]> code.ossystems Code Review - openembedded-core.git/commitdiff
initrdscripts/init-install*: Add rootwait when installing to USB devices
authorCalifornia Sullivan <california.l.sullivan@intel.com>
Tue, 9 Aug 2016 20:35:52 +0000 (13:35 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 17 Aug 2016 09:31:02 +0000 (10:31 +0100)
It can take a bit for USB devices to be detected, so if a USB device is
your rootfs and you don't set rootwait you will most likely get a kernel
panic. Fix this by adding rootwait to the kernel command line on
installation.

Fixes [YOCTO #9462].

Signed-off-by: California Sullivan <california.l.sullivan@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/recipes-core/initrdscripts/files/init-install-efi.sh
meta/recipes-core/initrdscripts/files/init-install.sh

index f564f4e2d6ae2bf0dcb354f67a63dea30e6948a4..bf8a76b96bbe8787b2ae8d0b5272cbe44cc632cd 100644 (file)
@@ -144,6 +144,12 @@ if [ ! "${device#/dev/mmcblk}" = "${device}" ]; then
     part_prefix="p"
     rootwait="rootwait"
 fi
+
+# USB devices also require rootwait
+if [ -n `readlink /dev/disk/by-id/usb* | grep $TARGET_DEVICE_NAME` ]; then
+    rootwait="rootwait"
+fi
+
 bootfs=${device}${part_prefix}1
 rootfs=${device}${part_prefix}2
 swap=${device}${part_prefix}3
index 72ce92b9640baae5ad969d6df85f7f5374d4111e..5f2599e72428ec1f834af354d7dd00ede61b675b 100644 (file)
@@ -152,6 +152,11 @@ if [ ! "${device#/dev/mmcblk}" = "${device}" ]; then
     rootwait="rootwait"
 fi
 
+# USB devices also require rootwait
+if [ -n `readlink /dev/disk/by-id/usb* | grep $TARGET_DEVICE_NAME` ]; then
+    rootwait="rootwait"
+fi
+
 if [ $grub_version -eq 0 ] ; then
     bios_boot=''
     bootfs=${device}${part_prefix}1