Skip to contentSkip to conversation

initramfs-kexecboot-image: support cases where machines override IMAGE_FSTYPES

PATCH New Andrea Adami 1 participant 2 messages Jun 12, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 initramfs-kexecboot-image: support cases where machines override IMAGE_FSTYPES

test case: zaurus.inc

IMAGE_FSTYPES ?= "tar.gz jffs2 jffs2.sum ubi ubifs" IMAGE_FSTYPES_collie ?= "tar.gz jffs2 jffs2.sum" INITRAMFS_FSTYPES ?= "cpio.gz cpio.xz"

The last assignment IMAGE_FSTYPES = "${INITRAMFS_FSTYPES}" did in fact reset the value to IMAGE_FSTYPES_collie, thus not producing cpio.gz / cpio.xz.

---
 .../recipes-core/images/initramfs-kexecboot-image.bb      | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
meta-initramfs/recipes-core/images/initramfs-kexecboot-image.bb +6 -2
index 9a686f366f..dd082ba529 100644
@@ -1,9 +1,13 @@
 SUMMARY = "Initramfs image for kexecboot kernel"
 DESCRIPTION = "This image provides kexecboot (linux as bootloader) and helpers."
 
-inherit image
+# Some BSPs use IMAGE_FSTYPES_<machine override> which would override
+# an assignment to IMAGE_FSTYPES so we need anon python
+python () {
+    d.setVar("IMAGE_FSTYPES", d.getVar("INITRAMFS_FSTYPES"))
+}
 
-IMAGE_FSTYPES = "${INITRAMFS_FSTYPES}"
+inherit image
 
 # avoid circular dependencies
 EXTRA_IMAGEDEPENDS = ""
Signature · 1 line
2.17.1
#1 lore raw

PATCH 2/2 initramfs-debug-image: support cases where machines override IMAGE_FSTYPES

As done for initramfs-kexecboot-image we need to use python to get the desired value for IMAGE_FSTYPES.

---
 .../recipes-core/images/initramfs-debug-image.bb           | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
meta-initramfs/recipes-core/images/initramfs-debug-image.bb +6 -1
index c3dcd2b821..601056b7e5 100644
@@ -11,7 +11,12 @@ IMAGE_FEATURES = ""
 export IMAGE_BASENAME = "initramfs-debug-image"
 IMAGE_LINGUAS = ""
 
-IMAGE_FSTYPES = "${INITRAMFS_FSTYPES}"
+# Some BSPs use IMAGE_FSTYPES_<machine override> which would override
+# an assignment to IMAGE_FSTYPES so we need anon python
+python () {
+    d.setVar("IMAGE_FSTYPES", d.getVar("INITRAMFS_FSTYPES"))
+}
+
 inherit core-image
 
 IMAGE_ROOTFS_SIZE = "8192"
Signature · 1 line
2.17.1