From 2a50bb9ee8838e3d026c82dc09aaccb880a264f4 Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Fri, 1 Jul 2016 15:53:51 +0200 Subject: 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=) and sleep between each attempt (default: one second, rootdelay=). 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). Signed-off-by: Patrick Ohly Signed-off-by: Ross Burton --- meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb') 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" inherit allarch SRC_URI = "file://init \ + file://rootfs \ file://finish \ file://mdev \ file://udev \ @@ -21,6 +22,7 @@ do_install() { # base install -m 0755 ${WORKDIR}/init ${D}/init + install -m 0755 ${WORKDIR}/rootfs ${D}/init.d/90-rootfs install -m 0755 ${WORKDIR}/finish ${D}/init.d/99-finish # mdev @@ -47,7 +49,7 @@ PACKAGES = "${PN}-base \ initramfs-module-e2fs \ initramfs-module-debug" -FILES_${PN}-base = "/init /init.d/99-finish /dev" +FILES_${PN}-base = "/init /init.d/90-rootfs /init.d/99-finish /dev" SUMMARY_initramfs-module-mdev = "initramfs support for mdev" RDEPENDS_initramfs-module-mdev = "${PN}-base busybox-mdev" -- cgit 1.2.3-korg