From cb17b6c2a72f260c61b0ec46887c2a04ac5b3f80 Mon Sep 17 00:00:00 2001 From: Mike Crowe Date: Thu, 25 Aug 2011 13:59:28 +0100 Subject: 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 --- meta/classes/kernel.bbclass | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass index 52aea9737..229679c72 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() { -- cgit v1.2.3