This patch adds support for building
uImage with initramfs

Signed-off-by: Vineeth Chowdary <[email protected]>
---
 meta/classes/kernel-uimage.bbclass | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/meta/classes/kernel-uimage.bbclass 
b/meta/classes/kernel-uimage.bbclass
index 1d8656e..399098d 100644
--- a/meta/classes/kernel-uimage.bbclass
+++ b/meta/classes/kernel-uimage.bbclass
@@ -18,10 +18,18 @@ python __anonymous () {
 
             # Enable building of uImage with mkimage
             bb.build.addtask('do_uboot_mkimage', 'do_install', 
'do_kernel_link_images', d)
+
+            if d.getVar('INITRAMFS_IMAGE_BUNDLE') == '1' :
+                bb.build.addtask('do_uboot_mkimage_initramfs', 'do_deploy', 
'do_bundle_initramfs', d)
+
 }
 
 do_uboot_mkimage[dirs] += "${B}"
 do_uboot_mkimage() {
+
+       local uimage_name="$1"
+       [ -z "$uimage_name" ] && uimage_name="uImage"
+
        uboot_prep_kimage
 
        ENTRYPOINT=${UBOOT_ENTRYPOINT}
@@ -30,6 +38,11 @@ do_uboot_mkimage() {
                        awk '$3=="${UBOOT_ENTRYSYMBOL}" {print "0x"$1;exit}'`
        fi
 
-       uboot-mkimage -A ${UBOOT_ARCH} -O linux -T kernel -C "${linux_comp}" -a 
${UBOOT_LOADADDRESS} -e $ENTRYPOINT -n "${DISTRO_NAME}/${PV}/${MACHINE}" -d 
linux.bin ${B}/arch/${ARCH}/boot/uImage
+       uboot-mkimage -A ${UBOOT_ARCH} -O linux -T kernel -C "${linux_comp}" -a 
${UBOOT_LOADADDRESS} -e $ENTRYPOINT -n "${DISTRO_NAME}/${PV}/${MACHINE}" -d 
linux.bin ${B}/arch/${ARCH}/boot/$uimage_name
        rm -f linux.bin
 }
+
+do_uboot_mkimage_initramfs() {
+       cd ${B}
+       do_uboot_mkimage uImage.initramfs
+}
-- 
2.7.4

-- 
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Reply via email to