[yocto] [meta-cgl][PATCHv2 2/3] Add an initramfs image

Adrian Dudau adrian.dudau at enea.com
Tue Sep 20 07:23:51 PDT 2016


This is needed to enable multipath support for the rootfs.
The ext3 support is needed to load the image onto the disk.

CGL requirements AVL.7.1.*

Signed-off-by: Adrian Dudau <adrian.dudau at enea.com>
---
 meta-cgl-common/conf/distro/poky-cgl.conf          |  1 +
 meta-cgl-common/images/core-image-cgl-initramfs.bb | 20 ++++++++++++++++++++
 meta-cgl-common/images/core-image-cgl.bb           |  2 ++
 3 files changed, 23 insertions(+)
 create mode 100644 meta-cgl-common/images/core-image-cgl-initramfs.bb

diff --git a/meta-cgl-common/conf/distro/poky-cgl.conf b/meta-cgl-common/conf/distro/poky-cgl.conf
index 8a76f70..90cc82b 100644
--- a/meta-cgl-common/conf/distro/poky-cgl.conf
+++ b/meta-cgl-common/conf/distro/poky-cgl.conf
@@ -3,4 +3,5 @@ require conf/distro/poky-selinux.conf
 
 DISTRO = "poky-cgl"
 
+IMAGE_CLASSES += "image_types_uboot"
 PREFERRED_PROVIDER_virtual/refpolicy="refpolicy-targeted"
diff --git a/meta-cgl-common/images/core-image-cgl-initramfs.bb b/meta-cgl-common/images/core-image-cgl-initramfs.bb
new file mode 100644
index 0000000..0777b7c
--- /dev/null
+++ b/meta-cgl-common/images/core-image-cgl-initramfs.bb
@@ -0,0 +1,20 @@
+require core-image-cgl.bb
+
+# Recipe is based on core-image-minimal.bb
+DESCRIPTION = "Initramfs used to mount multipath device as root file system"
+
+PACKAGE_INSTALL = "initramfs-cgl-boot busybox base-passwd udev ${ROOTFS_BOOTSTRAP_INSTALL}"
+
+# Do not pollute the initrd image with rootfs features
+IMAGE_FEATURES = ""
+
+export IMAGE_BASENAME = "core-image-cgl-initramfs"
+IMAGE_LINGUAS = ""
+
+LICENSE = "MIT"
+
+IMAGE_FSTYPES = "cpio.gz.u-boot"
+
+IMAGE_ROOTFS_SIZE = "8192"
+
+BAD_RECOMMENDATIONS += "busybox-syslog"
diff --git a/meta-cgl-common/images/core-image-cgl.bb b/meta-cgl-common/images/core-image-cgl.bb
index d12391b..5975601 100644
--- a/meta-cgl-common/images/core-image-cgl.bb
+++ b/meta-cgl-common/images/core-image-cgl.bb
@@ -21,6 +21,8 @@ IMAGE_INSTALL += "\
     kernel-modules \
     "
 
+IMAGE_FSTYPES += " ext3.gz"
+
 # kexec-tools doesn't work on Mips
 KEXECTOOLS_mips ?= ""
 KEXECTOOLS_mipsel ?= ""
-- 
1.9.1




More information about the yocto mailing list