Create a phosphor-specific initramfs
OpenBMC has been using a .bbappend to add/remove packages from
core-image-minimal-initramfs. Doing so keeps the recipe and initramfs
image name as core-image-minimal-initramfs which is misleading as it now
is very much phosphor-specific. Instead, make a new
obmc-phosphor-initramfs recipe and image that is patterned after
core-image-minimal-initramfs.
Change-Id: Ieca2268eff01bb61cc0d25a1cbc1a6f5fadb6d2c
Signed-off-by: Rick Altherr <raltherr@google.com>
diff --git a/meta-phosphor/classes/image-overlay.bbclass b/meta-phosphor/classes/image-overlay.bbclass
index dbe4daf..68acca9 100644
--- a/meta-phosphor/classes/image-overlay.bbclass
+++ b/meta-phosphor/classes/image-overlay.bbclass
@@ -1,7 +1,7 @@
PACKAGES = " "
EXCLUDE_FROM_WORLD = "1"
-INITRD_IMAGE ?= "core-image-minimal-initramfs"
+INITRD_IMAGE ?= "obmc-phosphor-initramfs"
INITRD ?= "${DEPLOY_DIR_IMAGE}/${INITRD_IMAGE}-${MACHINE}.cpio.${INITRD_CTYPE}${uboot}"
IMAGE_BASETYPE ?= "squashfs-xz"
diff --git a/meta-phosphor/common/recipes-core/images/core-image-minimal-initramfs.bbappend b/meta-phosphor/common/recipes-core/images/core-image-minimal-initramfs.bbappend
deleted file mode 100644
index 5710d22..0000000
--- a/meta-phosphor/common/recipes-core/images/core-image-minimal-initramfs.bbappend
+++ /dev/null
@@ -1,4 +0,0 @@
-PACKAGE_INSTALL_remove = "initramfs-live-boot initramfs-live-install initramfs-live-install-efi"
-PACKAGE_INSTALL += "obmc-phosphor-initfs"
-INITRAMFS_CTYPE ?= "lzma"
-INITRAMFS_FSTYPES = "cpio.${INITRAMFS_CTYPE}"
diff --git a/meta-phosphor/common/recipes-phosphor/images/obmc-phosphor-initramfs.bb b/meta-phosphor/common/recipes-phosphor/images/obmc-phosphor-initramfs.bb
new file mode 100644
index 0000000..b68048a
--- /dev/null
+++ b/meta-phosphor/common/recipes-phosphor/images/obmc-phosphor-initramfs.bb
@@ -0,0 +1,21 @@
+DESCRIPTION = "Small image capable of booting a device. The kernel includes \
+the Minimal RAM-based Initial Root Filesystem (initramfs), which finds the \
+first 'init' program more efficiently."
+
+PACKAGE_INSTALL = "${VIRTUAL-RUNTIME_base-utils} udev base-passwd ${ROOTFS_BOOTSTRAP_INSTALL} obmc-phosphor-initfs"
+
+# Do not pollute the initrd image with rootfs features
+IMAGE_FEATURES = ""
+
+export IMAGE_BASENAME = "obmc-phosphor-initramfs"
+IMAGE_LINGUAS = ""
+
+LICENSE = "MIT"
+
+IMAGE_FSTYPES = "${INITRAMFS_FSTYPES}"
+inherit core-image
+
+IMAGE_ROOTFS_SIZE = "8192"
+IMAGE_ROOTFS_EXTRA_SPACE = "0"
+
+BAD_RECOMMENDATIONS += "busybox-syslog"