summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb
diff options
context:
space:
mode:
authorPatrick Ohly <patrick.ohly@intel.com>2016-07-01 15:53:51 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-07-08 09:57:26 +0100
commitee6a6c3461694ce09789bf4d852cea2e22fc95e4 (patch)
treefe1d939900dac7954f4828fcbecd1da210d9b8d3 /meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb
parente34eb01c0f0cf5e893d919eb74111115f57870f7 (diff)
downloadpoky-ee6a6c3461694ce09789bf4d852cea2e22fc95e4.tar.gz
initramfs-framework: add retry loop for slow boot devices (like USB)
On some hardware platforms (Gigabyte, qemu), detection of USB devices by the kernel is slow enough such that it happens only after the first attempt to mount the rootfs. We need to keep trying for a while (default: 5s seconds, controlled by roottimeout=<seconds>) and sleep between each attempt (default: one second, rootdelay=<seconds>). This change intentionally splits finding the rootfs (in the new "rootfs") and switching to it ("finish"). That is needed to keep udev running while waiting for the rootfs, because it shuts down before "finish" starts. It is also the direction that was discussed on the OE mailing list for future changes to initramfs-framework (like supporting a "live CD" module, which would replace or further augment mounting of the rootfs). (From OE-Core rev: 2a50bb9ee8838e3d026c82dc09aaccb880a264f4) Signed-off-by: Patrick Ohly <patrick.ohly@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/initrdscripts/initramfs-framework_1.0.bb')
-rw-r--r--meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb4
1 files changed, 3 insertions, 1 deletions
diff --git a/meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb b/meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb
index e5cf9cb4dd..89e153d348 100644
--- a/meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb
+++ b/meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb
@@ -8,6 +8,7 @@ PR = "r2"
8inherit allarch 8inherit allarch
9 9
10SRC_URI = "file://init \ 10SRC_URI = "file://init \
11 file://rootfs \
11 file://finish \ 12 file://finish \
12 file://mdev \ 13 file://mdev \
13 file://udev \ 14 file://udev \
@@ -21,6 +22,7 @@ do_install() {
21 22
22 # base 23 # base
23 install -m 0755 ${WORKDIR}/init ${D}/init 24 install -m 0755 ${WORKDIR}/init ${D}/init
25 install -m 0755 ${WORKDIR}/rootfs ${D}/init.d/90-rootfs
24 install -m 0755 ${WORKDIR}/finish ${D}/init.d/99-finish 26 install -m 0755 ${WORKDIR}/finish ${D}/init.d/99-finish
25 27
26 # mdev 28 # mdev
@@ -47,7 +49,7 @@ PACKAGES = "${PN}-base \
47 initramfs-module-e2fs \ 49 initramfs-module-e2fs \
48 initramfs-module-debug" 50 initramfs-module-debug"
49 51
50FILES_${PN}-base = "/init /init.d/99-finish /dev" 52FILES_${PN}-base = "/init /init.d/90-rootfs /init.d/99-finish /dev"
51 53
52SUMMARY_initramfs-module-mdev = "initramfs support for mdev" 54SUMMARY_initramfs-module-mdev = "initramfs support for mdev"
53RDEPENDS_initramfs-module-mdev = "${PN}-base busybox-mdev" 55RDEPENDS_initramfs-module-mdev = "${PN}-base busybox-mdev"