]> code.ossystems Code Review - openembedded-core.git/commitdiff
kernel-fitimage: unbreak UBOOT_ENTRYSYMBOL support
authorAndré Draszik <adraszik@tycoint.com>
Wed, 20 Sep 2017 09:41:54 +0000 (10:41 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 25 Sep 2017 13:14:03 +0000 (14:14 +0100)
- vmlinux is located in ${B}, not ${S}.
- parsing of nm output got broken completely in commit
  b406a89935f148779569fa3770776e009dd51f13 ("kernel-fitimage: add
  initramfs support"), commit ec755d2524fcbd9dfded23a576f25c990d405a6c
  in yocto

While at it, make awk exit on match to save a few CPU cycles.

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

index 6f1b7667bc6e47ca4ad6dbf7e299c393de087c23..5583b4472e043e9f5513c92807f065769b23d23b 100644 (file)
@@ -97,8 +97,8 @@ fitimage_emit_section_kernel() {
 
        ENTRYPOINT=${UBOOT_ENTRYPOINT}
        if [ -n "${UBOOT_ENTRYSYMBOL}" ]; then
-               ENTRYPOINT=`${HOST_PREFIX}nm ${S}/vmlinux | \
-                       awk '$4=="${UBOOT_ENTRYSYMBOL}" {print $2}'`
+               ENTRYPOINT=`${HOST_PREFIX}nm vmlinux | \
+                       awk '$3=="${UBOOT_ENTRYSYMBOL}" {print "0x"$1;exit}'`
        fi
 
        cat << EOF >> ${1}