]> code.ossystems Code Review - openembedded-core.git/commitdiff
kernel-uimage: optimise UBOOT_ENTRYSYMBOL support
authorAndré Draszik <adraszik@tycoint.com>
Wed, 20 Sep 2017 09:41:55 +0000 (10:41 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 25 Sep 2017 13:14:03 +0000 (14:14 +0100)
This is the remaining local change to a fix similar to
commit e0b4f018d1c2 ("kernel-uimage.bbclass: Fix up
generation of uImage from vmlinux"):

Make awk exit on match to save a few CPU cycles so as
to make this similar to kernel-fitimage.bbclass

Signed-off-by: André Draszik <adraszik@tycoint.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/classes/kernel-uimage.bbclass

index 7c026abf0b113e625b8071bd27092af162abff30..1d8656e76e3de69369301e3e3a7ecb0ee03276a3 100644 (file)
@@ -27,7 +27,7 @@ do_uboot_mkimage() {
        ENTRYPOINT=${UBOOT_ENTRYPOINT}
        if [ -n "${UBOOT_ENTRYSYMBOL}" ]; then
                ENTRYPOINT=`${HOST_PREFIX}nm ${B}/vmlinux | \
-                       awk '$3=="${UBOOT_ENTRYSYMBOL}" {print $1}'`
+                       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