[oe-commits] [openembedded-core] branch krogoth updated: initrdscripts/init-install*: Add rootwait when installing to USB devices

git at git.openembedded.org git at git.openembedded.org
Tue Jun 27 22:41:20 UTC 2017


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch krogoth
in repository openembedded-core.

The following commit(s) were added to refs/heads/krogoth by this push:
     new 7f26cee  initrdscripts/init-install*: Add rootwait when installing to USB devices
7f26cee is described below

commit 7f26cee3d8e4b2e9240b30c21be9fa7661186ccd
Author: California Sullivan <california.l.sullivan at intel.com>
AuthorDate: Tue Aug 9 13:35:52 2016 -0700

    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 at intel.com>
    Signed-off-by: Ross Burton <ross.burton at intel.com>
---
 meta/recipes-core/initrdscripts/files/init-install-efi.sh | 6 ++++++
 meta/recipes-core/initrdscripts/files/init-install.sh     | 5 +++++
 2 files changed, 11 insertions(+)

diff --git a/meta/recipes-core/initrdscripts/files/init-install-efi.sh b/meta/recipes-core/initrdscripts/files/init-install-efi.sh
index d58826a..d4c5fb3 100644
--- a/meta/recipes-core/initrdscripts/files/init-install-efi.sh
+++ b/meta/recipes-core/initrdscripts/files/init-install-efi.sh
@@ -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
diff --git a/meta/recipes-core/initrdscripts/files/init-install.sh b/meta/recipes-core/initrdscripts/files/init-install.sh
index c5623ee..fddaf6a 100644
--- a/meta/recipes-core/initrdscripts/files/init-install.sh
+++ b/meta/recipes-core/initrdscripts/files/init-install.sh
@@ -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

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list