summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/classes/kernel-uimage.bbclass26
1 files changed, 12 insertions, 14 deletions
diff --git a/meta/classes/kernel-uimage.bbclass b/meta/classes/kernel-uimage.bbclass
index 19c6ade507..7c026abf0b 100644
--- a/meta/classes/kernel-uimage.bbclass
+++ b/meta/classes/kernel-uimage.bbclass
@@ -15,23 +15,21 @@ python __anonymous () {
15 typeformake = d.getVar("KERNEL_IMAGETYPE_FOR_MAKE") or "" 15 typeformake = d.getVar("KERNEL_IMAGETYPE_FOR_MAKE") or ""
16 if "uImage" in typeformake.split(): 16 if "uImage" in typeformake.split():
17 d.setVar('KERNEL_IMAGETYPE_FOR_MAKE', typeformake.replace('uImage', 'vmlinux')) 17 d.setVar('KERNEL_IMAGETYPE_FOR_MAKE', typeformake.replace('uImage', 'vmlinux'))
18
19 # Enable building of uImage with mkimage
20 bb.build.addtask('do_uboot_mkimage', 'do_install', 'do_kernel_link_images', d)
18} 21}
19 22
23do_uboot_mkimage[dirs] += "${B}"
20do_uboot_mkimage() { 24do_uboot_mkimage() {
21 if echo "${KERNEL_IMAGETYPES}" | grep -wq "uImage"; then 25 uboot_prep_kimage
22 if test "x${KEEPUIMAGE}" != "xyes" ; then
23 uboot_prep_kimage
24
25 ENTRYPOINT=${UBOOT_ENTRYPOINT}
26 if [ -n "${UBOOT_ENTRYSYMBOL}" ]; then
27 ENTRYPOINT=`${HOST_PREFIX}nm ${S}/vmlinux | \
28 awk '$3=="${UBOOT_ENTRYSYMBOL}" {print $1}'`
29 fi
30 26
31 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 27 ENTRYPOINT=${UBOOT_ENTRYPOINT}
32 rm -f linux.bin 28 if [ -n "${UBOOT_ENTRYSYMBOL}" ]; then
33 fi 29 ENTRYPOINT=`${HOST_PREFIX}nm ${B}/vmlinux | \
30 awk '$3=="${UBOOT_ENTRYSYMBOL}" {print $1}'`
34 fi 31 fi
35}
36 32
37addtask uboot_mkimage before do_install after do_compile 33 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
34 rm -f linux.bin
35}