From: Walter Goossens <waltergooss...@creative-embedded.com>

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.)

Signed-off-by: Leon Woestenberg <l...@sidebranch.com>
---
 meta/classes/kernel-fitimage.bbclass | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/meta/classes/kernel-fitimage.bbclass 
b/meta/classes/kernel-fitimage.bbclass
index 88d8022..8bda644 100644
--- a/meta/classes/kernel-fitimage.bbclass
+++ b/meta/classes/kernel-fitimage.bbclass
@@ -475,7 +475,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
@@ -483,6 +485,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() {
-- 
2.7.4

-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Reply via email to