]> 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>
Tue, 27 Jun 2017 22:39:50 +0000 (23:39 +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 d58826a240993ef20341b551658ae27f128b956f..d4c5fb3297e07a7df63e14ade7d82f6b569771c1 100644 (file)
@@ -138,6 +138,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 c5623eeb26724846500de7b95332d5da52c0af7f..fddaf6aa823773a3360e6ad588bf00e47b03a563 100644 (file)
@@ -146,6 +146,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