summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/kernel.bbclass18
1 files changed, 9 insertions, 9 deletions
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index cfa61e60de..ce2cab65ae 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -34,7 +34,6 @@ KERNEL_VERSION_PKG_NAME = "${@legitimize_package_name(d.getVar('KERNEL_VERSION')
34KERNEL_VERSION_PKG_NAME[vardepvalue] = "${LINUX_VERSION}" 34KERNEL_VERSION_PKG_NAME[vardepvalue] = "${LINUX_VERSION}"
35 35
36python __anonymous () { 36python __anonymous () {
37 import re
38 37
39 # Merge KERNEL_IMAGETYPE and KERNEL_ALT_IMAGETYPE into KERNEL_IMAGETYPES 38 # Merge KERNEL_IMAGETYPE and KERNEL_ALT_IMAGETYPE into KERNEL_IMAGETYPES
40 type = d.getVar('KERNEL_IMAGETYPE') or "" 39 type = d.getVar('KERNEL_IMAGETYPE') or ""
@@ -46,7 +45,10 @@ python __anonymous () {
46 types = (alttype + ' ' + types).strip() 45 types = (alttype + ' ' + types).strip()
47 d.setVar('KERNEL_IMAGETYPES', types) 46 d.setVar('KERNEL_IMAGETYPES', types)
48 47
49 typeformake = re.sub(r'\.gz', '', types) 48 # some commonly used kernel images aren't generated by the kernel build system, such as vmlinux.gz
49 # typeformake lists only valid kernel make targets, and post processing can be done after the kernel
50 # is built (such as using gzip to compress vmlinux)
51 typeformake = types.replace('vmlinux.gz', 'vmlinux')
50 d.setVar('KERNEL_IMAGETYPE_FOR_MAKE', typeformake) 52 d.setVar('KERNEL_IMAGETYPE_FOR_MAKE', typeformake)
51 53
52 for type in types.split(): 54 for type in types.split():
@@ -270,14 +272,12 @@ kernel_do_compile() {
270 fi 272 fi
271 for typeformake in ${KERNEL_IMAGETYPE_FOR_MAKE} ; do 273 for typeformake in ${KERNEL_IMAGETYPE_FOR_MAKE} ; do
272 oe_runmake ${typeformake} CC="${KERNEL_CC}" LD="${KERNEL_LD}" ${KERNEL_EXTRA_ARGS} $use_alternate_initrd 274 oe_runmake ${typeformake} CC="${KERNEL_CC}" LD="${KERNEL_LD}" ${KERNEL_EXTRA_ARGS} $use_alternate_initrd
273 for type in ${KERNEL_IMAGETYPES} ; do
274 if test "${typeformake}.gz" = "${type}"; then
275 mkdir -p "${KERNEL_OUTPUT_DIR}"
276 gzip -9c < "${typeformake}" > "${KERNEL_OUTPUT_DIR}/${type}"
277 break;
278 fi
279 done
280 done 275 done
276 # vmlinux.gz is not built by kernel
277 if (echo "${KERNEL_IMAGETYPES}" | grep -wq "vmlinux\.gz"); then
278 mkdir -p "${KERNEL_OUTPUT_DIR}"
279 gzip -9c < ${B}/vmlinux > "${KERNEL_OUTPUT_DIR}/vmlinux.gz"
280 fi
281} 281}
282 282
283do_compile_kernelmodules() { 283do_compile_kernelmodules() {