Skip to contentSkip to conversation

kernel-fitimage.bbclass: Handle bundled initramfs case correctly.

PATCH Superseded Leon Woestenberg 1 participant 1 message Sep 3, 2018

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kernel-fitimage.bbclass: Handle bundled initramfs case correctly.

From: Walter Goossens <[email protected]>

If INITRAMFS_IMAGE was set, but also INITRAMFS_BUNDLE = 1, then the kernel image already has the initramfs bundled inside. In that case do not pack the initramfs inside the FIT (again).

(The fitImage name does keep the suffix INITRAMFS_IMAGE for all initramfs cases.)

---
 meta/classes/kernel-fitimage.bbclass | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)
meta/classes/kernel-fitimage.bbclass +15 -1
index 16499c8..6d02d74 100644
@@ -443,7 +443,9 @@ addtask assemble_fitimage before do_install after do_compile
 
 do_assemble_fitimage_initramfs() {
 	if echo ${KERNEL_IMAGETYPES} | grep -wq "fitImage" && \
-		test -n "${INITRAMFS_IMAGE}" ; then
+		test -n "${INITRAMFS_IMAGE}" && \
+		test ! -n "${INITRAMFS_IMAGE_BUNDLE}"; then
+
 		cd ${B}
 		fitimage_assemble fit-image-${INITRAMFS_IMAGE}.its fitImage-${INITRAMFS_IMAGE} 1
 	fi
@@ -451,6 +453,18 @@ do_assemble_fitimage_initramfs() {
 
 addtask assemble_fitimage_initramfs before do_deploy after do_install
 
+do_assemble_fitimage_bundled_initramfs() {
+	if echo ${KERNEL_IMAGETYPES} | grep -wq "fitImage" && \
+		test -n "${INITRAMFS_IMAGE}" && \
+		test -n "${INITRAMFS_IMAGE_BUNDLE}"; then
+
+		cd ${B}
+		fitimage_assemble fit-image-${INITRAMFS_IMAGE}.its fitImage-${INITRAMFS_IMAGE}
+	fi
+}
+
+addtask assemble_fitimage_bundled_initramfs before do_deploy after do_bundle_initramfs
+
 
 kernel_do_deploy[vardepsexclude] = "DATETIME"
 kernel_do_deploy_append() {
Signature · 1 line
2.7.4