diff options
| author | California Sullivan <california.l.sullivan@intel.com> | 2016-08-09 13:35:52 -0700 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-06-27 23:41:01 +0100 |
| commit | 50fdd784231299bedb008f20adeaeeca3eb1452d (patch) | |
| tree | d5a35920fccb260fb2f5cae59922ab7e5cdb8583 /meta/recipes-core | |
| parent | 3cf0e093481ea260d4f41bed24336ea7f0102bde (diff) | |
| download | poky-50fdd784231299bedb008f20adeaeeca3eb1452d.tar.gz | |
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].
(From OE-Core rev: 7f26cee3d8e4b2e9240b30c21be9fa7661186ccd)
Signed-off-by: California Sullivan <california.l.sullivan@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core')
| -rw-r--r-- | meta/recipes-core/initrdscripts/files/init-install-efi.sh | 6 | ||||
| -rw-r--r-- | meta/recipes-core/initrdscripts/files/init-install.sh | 5 |
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 d58826a240..d4c5fb3297 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 | |||
| 138 | part_prefix="p" | 138 | part_prefix="p" |
| 139 | rootwait="rootwait" | 139 | rootwait="rootwait" |
| 140 | fi | 140 | fi |
| 141 | |||
| 142 | # USB devices also require rootwait | ||
| 143 | if [ -n `readlink /dev/disk/by-id/usb* | grep $TARGET_DEVICE_NAME` ]; then | ||
| 144 | rootwait="rootwait" | ||
| 145 | fi | ||
| 146 | |||
| 141 | bootfs=${device}${part_prefix}1 | 147 | bootfs=${device}${part_prefix}1 |
| 142 | rootfs=${device}${part_prefix}2 | 148 | rootfs=${device}${part_prefix}2 |
| 143 | swap=${device}${part_prefix}3 | 149 | 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 c5623eeb26..fddaf6aa82 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 | |||
| 146 | rootwait="rootwait" | 146 | rootwait="rootwait" |
| 147 | fi | 147 | fi |
| 148 | 148 | ||
| 149 | # USB devices also require rootwait | ||
| 150 | if [ -n `readlink /dev/disk/by-id/usb* | grep $TARGET_DEVICE_NAME` ]; then | ||
| 151 | rootwait="rootwait" | ||
| 152 | fi | ||
| 153 | |||
| 149 | if [ $grub_version -eq 0 ] ; then | 154 | if [ $grub_version -eq 0 ] ; then |
| 150 | bios_boot='' | 155 | bios_boot='' |
| 151 | bootfs=${device}${part_prefix}1 | 156 | bootfs=${device}${part_prefix}1 |
