Openembedded Core Discussions
 help / color / mirror / Atom feed
From: "André Draszik" <git@andred.net>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH 2/5] kernel-fitimage: unbreak UBOOT_ENTRYSYMBOL support
Date: Wed, 20 Sep 2017 10:41:54 +0100	[thread overview]
Message-ID: <20170920094157.11340-2-git@andred.net> (raw)
In-Reply-To: <20170920094157.11340-1-git@andred.net>

From: André Draszik <adraszik@tycoint.com>

- 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>
---
 meta/classes/kernel-fitimage.bbclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/classes/kernel-fitimage.bbclass b/meta/classes/kernel-fitimage.bbclass
index 6f1b7667bc..5583b4472e 100644
--- a/meta/classes/kernel-fitimage.bbclass
+++ b/meta/classes/kernel-fitimage.bbclass
@@ -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}
-- 
2.14.1



  reply	other threads:[~2017-09-20  9:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-20  9:41 [PATCH 1/5] kernel-fitimage: sanitize dtb section name (unbreak MIPS) André Draszik
2017-09-20  9:41 ` André Draszik [this message]
2017-09-20  9:41 ` [PATCH 3/5] kernel-uimage: optimise UBOOT_ENTRYSYMBOL support André Draszik
2017-09-20  9:41 ` [PATCH 4/5] kernel-uboot: support compressed kernel on MIPS André Draszik
2017-09-20  9:41 ` [PATCH 5/5] kernel-fitimage: support MIPS (compressed) André Draszik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170920094157.11340-2-git@andred.net \
    --to=git@andred.net \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox