From: Mike Crowe <mac@mcrowe.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH 2/2] kernel.bbclass: support kernel image type of vmlinux.gz
Date: Thu, 25 Aug 2011 13:59:28 +0100 [thread overview]
Message-ID: <1314277168-4324-2-git-send-email-mac@mcrowe.com> (raw)
In-Reply-To: <1314277168-4324-1-git-send-email-mac@mcrowe.com>
Add support for a gzipped vmlinux kernel by specifying:
KERNEL_IMAGETYPE = "vmlinux.gz"
Signed-off-by: Mike Crowe <mac@mcrowe.com>
---
meta/classes/kernel.bbclass | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 04e673a..15e3518 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -75,10 +75,15 @@ EXTRA_OEMAKE = ""
KERNEL_ALT_IMAGETYPE ??= ""
+KERNEL_IMAGETYPE_FOR_MAKE = "${@(lambda s: s[:-3] if s[-3:] == ".gz" else s)(bb.data.getVar('KERNEL_IMAGETYPE', d, 1))}"
+
kernel_do_compile() {
unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE
oe_runmake include/linux/version.h CC="${KERNEL_CC}" LD="${KERNEL_LD}"
- oe_runmake ${KERNEL_IMAGETYPE} ${KERNEL_ALT_IMAGETYPE} CC="${KERNEL_CC}" LD="${KERNEL_LD}"
+ oe_runmake ${KERNEL_IMAGETYPE_FOR_MAKE} ${KERNEL_ALT_IMAGETYPE} CC="${KERNEL_CC}" LD="${KERNEL_LD}"
+ if test "${KERNEL_IMAGETYPE_FOR_MAKE}.gz" = "${KERNEL_IMAGETYPE}"; then
+ gzip -9c < "${KERNEL_IMAGETYPE_FOR_MAKE}" > "${KERNEL_OUTPUT}"
+ fi
}
do_compile_kernelmodules() {
--
1.7.2.5
next prev parent reply other threads:[~2011-08-25 13:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-25 12:59 [PATCH 1/2] kernel.bbclass: Find the kernel consistently Mike Crowe
2011-08-25 12:59 ` Mike Crowe [this message]
2011-08-25 19:32 ` Saul Wold
2011-08-26 9:17 ` Mike Crowe
2011-08-26 9:21 ` [PATCH v2] " Mike Crowe
2011-08-29 13:02 ` Richard Purdie
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=1314277168-4324-2-git-send-email-mac@mcrowe.com \
--to=mac@mcrowe.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.