summaryrefslogtreecommitdiff
path: root/meta/recipes-core
diff options
context:
space:
mode:
authorCalifornia Sullivan <california.l.sullivan@intel.com>2016-08-09 13:35:52 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-08-17 10:31:02 +0100
commit40e2d36573a7a6bce377b1f9653607065ba5ffb6 (patch)
tree97b54b794d45f902bb2b22ceff7e661bea1fb9e6 /meta/recipes-core
parent36f110594506fbee5dc18de3a04981f019f2024d (diff)
downloadopenembedded-core-40e2d36573a7a6bce377b1f9653607065ba5ffb6.tar.gz
openembedded-core-40e2d36573a7a6bce377b1f9653607065ba5ffb6.tar.bz2
openembedded-core-40e2d36573a7a6bce377b1f9653607065ba5ffb6.zip
initrdscripts/init-install*: Add rootwait when installing to USB devices
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>
Diffstat (limited to 'meta/recipes-core')
-rw-r--r--meta/recipes-core/initrdscripts/files/init-install-efi.sh6
-rw-r--r--meta/recipes-core/initrdscripts/files/init-install.sh5
2 files changed, 11 insertions, 0 deletions
diff --git a/meta/recipes-core/initrdscripts/files/init-install-efi.sh b/meta/recipes-core/initrdscripts/files/init-install-efi.sh
index f564f4e2d6..bf8a76b96b 100644
--- a/meta/recipes-core/initrdscripts/files/init-install-efi.sh
+++ b/meta/recipes-core/initrdscripts/files/init-install-efi.sh
@@ -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
diff --git a/meta/recipes-core/initrdscripts/files/init-install.sh b/meta/recipes-core/initrdscripts/files/init-install.sh
index 72ce92b964..5f2599e724 100644
--- a/meta/recipes-core/initrdscripts/files/init-install.sh
+++ b/meta/recipes-core/initrdscripts/files/init-install.sh
@@ -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