meta-phosphor: introduce static non-rootfs image type
Define a new image type 'static-norootfs' that takes the entire
rootfs and places it as the initramfs for the kernel's FIT image,
so that the BMC is entirely running from a ramdisk.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I0163f5be0a1b176e0db5f89b85f34e4feae8a588
diff --git a/meta-phosphor/conf/machine/include/image-type/static-norootfs.inc b/meta-phosphor/conf/machine/include/image-type/static-norootfs.inc
new file mode 100644
index 0000000..02574da
--- /dev/null
+++ b/meta-phosphor/conf/machine/include/image-type/static-norootfs.inc
@@ -0,0 +1,10 @@
+INITRAMFS_CTYPE="zst"
+
+IMAGE_FSTYPES += "cpio.${INITRAMFS_CTYPE}.fitImage mtd-static-norootfs"
+
+# We don't want to build an initial kernel-based FIT image because the
+# initramfs is going to be the eventual rootfs from this image and not
+# a smaller initramfs.
+INITRAMFS_IMAGE = ""
+KERNEL_IMAGETYPE = "${ARCH_DEFAULT_KERNELIMAGETYPE}"
+KERNEL_IMAGETYPES = "${ARCH_DEFAULT_KERNELIMAGETYPE}"
diff --git a/meta-phosphor/conf/machine/include/obmc-bsp-common.inc b/meta-phosphor/conf/machine/include/obmc-bsp-common.inc
index 8a38343..e57bc64 100644
--- a/meta-phosphor/conf/machine/include/obmc-bsp-common.inc
+++ b/meta-phosphor/conf/machine/include/obmc-bsp-common.inc
@@ -6,6 +6,7 @@
KERNEL_IMAGETYPES ?= "fitImage vmlinux"
OBMC_IMAGE_INCLUDE = "static"
+OBMC_IMAGE_INCLUDE:df-obmc-static-norootfs = "static-norootfs"
OBMC_IMAGE_INCLUDE:df-obmc-ubi-fs = "ubi-fs"
OBMC_IMAGE_INCLUDE:df-phosphor-mmc = "mmc"