From: Ross Burton <ross.bur...@arm.com>

Add a minimal initramfs image recipe that just contains enough initramfs
to find the real root filesystem and pivot to it.

BSPs can use MACHINE_EXTRA_RRECOMMENDS to pull in any kernel module
packages that are required to bring up the hardware so that the rootfs
can be found.

Signed-off-by: Ross Burton <ross.bur...@arm.com>
---
 meta/conf/distro/include/maintainers.inc      |  1 +
 .../images/core-image-initramfs-boot.bb       | 22 +++++++++++++++++++
 2 files changed, 23 insertions(+)
 create mode 100644 meta/recipes-core/images/core-image-initramfs-boot.bb

diff --git a/meta/conf/distro/include/maintainers.inc 
b/meta/conf/distro/include/maintainers.inc
index 445f797bcb7..de68b32192f 100644
--- a/meta/conf/distro/include/maintainers.inc
+++ b/meta/conf/distro/include/maintainers.inc
@@ -101,6 +101,7 @@ RECIPE_MAINTAINER:pn-connman-conf = "Ross Burton 
<ross.bur...@arm.com>"
 RECIPE_MAINTAINER:pn-connman-gnome = "Ross Burton <ross.bur...@arm.com>"
 RECIPE_MAINTAINER:pn-consolekit = "Chen Qi <qi.c...@windriver.com>"
 RECIPE_MAINTAINER:pn-core-image-base = "Richard Purdie 
<richard.pur...@linuxfoundation.org>"
+RECIPE_MAINTAINER:pn-core-image-initramfs-boot = "Ross Burton 
<ross.bur...@arm.com>"
 RECIPE_MAINTAINER:pn-core-image-minimal = "Richard Purdie 
<richard.pur...@linuxfoundation.org>"
 RECIPE_MAINTAINER:pn-core-image-minimal-dev = "Richard Purdie 
<richard.pur...@linuxfoundation.org>"
 RECIPE_MAINTAINER:pn-core-image-minimal-initramfs = "Richard Purdie 
<richard.pur...@linuxfoundation.org>"
diff --git a/meta/recipes-core/images/core-image-initramfs-boot.bb 
b/meta/recipes-core/images/core-image-initramfs-boot.bb
new file mode 100644
index 00000000000..72589447513
--- /dev/null
+++ b/meta/recipes-core/images/core-image-initramfs-boot.bb
@@ -0,0 +1,22 @@
+SUMMARY = "Basic initramfs to boot a fully-featured rootfs"
+DESCRIPTION = "Small initramfs that contains just udev and init, to find the 
real rootfs."
+LICENSE = "MIT"
+
+INITRAMFS_SCRIPTS ?= "initramfs-framework-base initramfs-module-udev"
+
+PACKAGE_INSTALL = "${INITRAMFS_SCRIPTS} ${VIRTUAL-RUNTIME_base-utils} 
base-passwd"
+
+# Ensure the initramfs only contains the bare minimum
+IMAGE_FEATURES = ""
+IMAGE_LINGUAS = ""
+
+# Don't allow the initramfs to contain a kernel, as kernel modules will depend
+# on the kernel image.
+PACKAGE_EXCLUDE = "kernel-image-*"
+
+IMAGE_FSTYPES = "${INITRAMFS_FSTYPES}"
+IMAGE_NAME_SUFFIX ?= ""
+IMAGE_ROOTFS_SIZE = "8192"
+IMAGE_ROOTFS_EXTRA_SPACE = "0"
+
+inherit image
-- 
2.34.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#192310): 
https://lists.openembedded.org/g/openembedded-core/message/192310
Mute This Topic: https://lists.openembedded.org/mt/103155160/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to