diff options
author | Mike Crowe <mac@mcrowe.com> | 2011-08-25 13:59:28 +0100 |
---|---|---|
committer | Saul Wold <sgw@linux.intel.com> | 2011-08-26 12:34:02 -0700 |
commit | cb17b6c2a72f260c61b0ec46887c2a04ac5b3f80 (patch) | |
tree | 4cf0951f512c3515dbcab5837e42e4018ee208b3 /meta/classes/kernel.bbclass | |
parent | bac15cc98e136892d4c09f2470622965bd9dbbeb (diff) | |
download | openembedded-core-cb17b6c2a72f260c61b0ec46887c2a04ac5b3f80.tar.gz openembedded-core-cb17b6c2a72f260c61b0ec46887c2a04ac5b3f80.tar.bz2 openembedded-core-cb17b6c2a72f260c61b0ec46887c2a04ac5b3f80.zip |
kernel.bbclass: support kernel image type of vmlinux.gz
Add support for a gzipped vmlinux kernel by specifying:
KERNEL_IMAGETYPE = "vmlinux.gz"
Signed-off-by: Mike Crowe <mac@mcrowe.com>
Diffstat (limited to 'meta/classes/kernel.bbclass')
-rw-r--r-- | 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 52aea97372..229679c72e 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() { |