diff options
author | California Sullivan <california.l.sullivan@intel.com> | 2016-08-09 13:35:52 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-08-17 10:35:39 +0100 |
commit | df6694b7c852c9ac627135d4158b306d90b7273f (patch) | |
tree | 43eff388f3f935a41026ed96ec621f4e49a636e2 /meta/recipes-core | |
parent | 08a54713acf424f45d8588c5c149a6053c9ac9c5 (diff) | |
download | poky-df6694b7c852c9ac627135d4158b306d90b7273f.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: 40e2d36573a7a6bce377b1f9653607065ba5ffb6)
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 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 | |||
144 | part_prefix="p" | 144 | part_prefix="p" |
145 | rootwait="rootwait" | 145 | rootwait="rootwait" |
146 | fi | 146 | fi |
147 | |||
148 | # USB devices also require rootwait | ||
149 | if [ -n `readlink /dev/disk/by-id/usb* | grep $TARGET_DEVICE_NAME` ]; then | ||
150 | rootwait="rootwait" | ||
151 | fi | ||
152 | |||
147 | bootfs=${device}${part_prefix}1 | 153 | bootfs=${device}${part_prefix}1 |
148 | rootfs=${device}${part_prefix}2 | 154 | rootfs=${device}${part_prefix}2 |
149 | swap=${device}${part_prefix}3 | 155 | 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 | |||
152 | rootwait="rootwait" | 152 | rootwait="rootwait" |
153 | fi | 153 | fi |
154 | 154 | ||
155 | # USB devices also require rootwait | ||
156 | if [ -n `readlink /dev/disk/by-id/usb* | grep $TARGET_DEVICE_NAME` ]; then | ||
157 | rootwait="rootwait" | ||
158 | fi | ||
159 | |||
155 | if [ $grub_version -eq 0 ] ; then | 160 | if [ $grub_version -eq 0 ] ; then |
156 | bios_boot='' | 161 | bios_boot='' |
157 | bootfs=${device}${part_prefix}1 | 162 | bootfs=${device}${part_prefix}1 |