Skip to contentSkip to conversation

initramfs-framework: make rootfs module optional

PATCH In review Patrick Ohly 2 participants 2 messages Jul 12, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 initramfs-framework: make rootfs module optional

It still gets installed by default via RRECOMMENDS without having to update users of the framework (because without it, the framework is incomplete), but that recommendation can be overridden on a per-image basis.

---
 .../recipes-core/initrdscripts/initramfs-framework_1.0.bb | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)
meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb +14 -1
index 89e153d..67a1b04 100644
@@ -47,9 +47,18 @@ PACKAGES = "${PN}-base \
             initramfs-module-mdev \
             initramfs-module-udev \
             initramfs-module-e2fs \
+            initramfs-module-rootfs \
             initramfs-module-debug"
 
-FILES_${PN}-base = "/init /init.d/90-rootfs /init.d/99-finish /dev"
+FILES_${PN}-base = "/init /init.d/99-finish /dev"
+
+# 99-finish in base depends on some other module which mounts
+# the rootfs, like 90-rootfs. To replace that default, use
+# BAD_RECOMMENDATIONS += "initramfs-module-rootfs" in your
+# initramfs recipe and install something else, or install
+# something that runs earlier (for example, a 89-my-rootfs)
+# and mounts the rootfs. Then 90-rootfs will proceed immediately.
+RRECOMMENDS_${PN}-base += "initramfs-module-rootfs"
 
 SUMMARY_initramfs-module-mdev = "initramfs support for mdev"
 RDEPENDS_initramfs-module-mdev = "${PN}-base busybox-mdev"
@@ -63,6 +72,10 @@ SUMMARY_initramfs-module-e2fs = "initramfs support for ext4/ext3/ext2 filesystem
 RDEPENDS_initramfs-module-e2fs = "${PN}-base"
 FILES_initramfs-module-e2fs = "/init.d/10-e2fs"
 
+SUMMARY_initramfs-module-rootfs = "initramfs support for locating and mounting the root partition"
+RDEPENDS_initramfs-module-rootfs = "${PN}-base"
+FILES_initramfs-module-rootfs = "/init.d/90-rootfs"
+
 SUMMARY_initramfs-module-debug = "initramfs dynamic debug support"
 RDEPENDS_initramfs-module-debug = "${PN}-base"
 FILES_initramfs-module-debug = "/init.d/00-debug"
Signature · 1 line
2.6.2
Acked-by on v1 1/1
#1 lore raw
Quoted 5 lines · Patrick Ohly

It still gets installed by default via RRECOMMENDS without having to update users of the framework (because without it, the framework is incomplete), but that recommendation can be overridden on a per-image basis.

Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750