This patch adds support for building uImage with Initramfs. Signed-off-by: Vineeth Chowdary Karumanchi <vineethchowz.chowd...@xilinx.com> --- meta/classes/kernel-uimage.bbclass | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/meta/classes/kernel-uimage.bbclass b/meta/classes/kernel-uimage.bbclass index 1d8656e..9e776a1 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,14 @@ 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() { + if echo ${KERNEL_IMAGETYPES} | grep -wq "uImage" && \ + test -n "${INITRAMFS_IMAGE}" ; then + cd ${B} + do_uboot_mkimage uImage.initramfs + fi +} -- 2.7.4 This email and any attachments are intended for the sole use of the named recipient(s) and contain(s) confidential information that may be proprietary, privileged or copyrighted under applicable law. If you are not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately. -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core