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

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

MIPS generates vmlinuz.bin when compression in the kernel build is
enabled, including any necessary objcopy so we can leverage that
and skip our manual invocation of objcopy here. We just have to
put the file into the right place for the rest of the build to
find it.

Signed-off-by: André Draszik <adraszik@tycoint.com>
---
 meta/classes/kernel-uboot.bbclass | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/meta/classes/kernel-uboot.bbclass b/meta/classes/kernel-uboot.bbclass
index 868e97d7a7..87f02654fa 100644
--- a/meta/classes/kernel-uboot.bbclass
+++ b/meta/classes/kernel-uboot.bbclass
@@ -3,13 +3,19 @@ uboot_prep_kimage() {
 		vmlinux_path="arch/${ARCH}/boot/compressed/vmlinux"
 		linux_suffix=""
 		linux_comp="none"
+	elif [ -e arch/${ARCH}/boot/vmlinuz.bin ]; then
+		rm -f linux.bin
+		cp -l arch/${ARCH}/boot/vmlinuz.bin linux.bin
+		vmlinux_path=""
+		linux_suffix=""
+		linux_comp="none"
 	else
 		vmlinux_path="vmlinux"
 		linux_suffix=".gz"
 		linux_comp="gzip"
 	fi
 
-	${OBJCOPY} -O binary -R .note -R .comment -S "${vmlinux_path}" linux.bin
+	[ -n "${vmlinux_path}" ] && ${OBJCOPY} -O binary -R .note -R .comment -S "${vmlinux_path}" linux.bin
 
 	if [ "${linux_comp}" != "none" ] ; then
 		gzip -9 linux.bin
-- 
2.14.1



  parent reply	other threads:[~2017-09-20  9:42 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 ` [PATCH 2/5] kernel-fitimage: unbreak UBOOT_ENTRYSYMBOL support André Draszik
2017-09-20  9:41 ` [PATCH 3/5] kernel-uimage: optimise " André Draszik
2017-09-20  9:41 ` André Draszik [this message]
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-4-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