aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes/kernel.bbclass
diff options
context:
space:
mode:
authorMarek Vasut <marex@denx.de>2015-05-14 14:31:06 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-05-26 10:57:40 +0100
commita1690131691507bbf5853540229b3ad775b836bf (patch)
tree1f73dd1434c9351a7f418781779660fdf2c51ebc /meta/classes/kernel.bbclass
parentd3b6aa30b3ea30d4e6a6ca923693367f66957ab0 (diff)
downloadopenembedded-core-contrib-a1690131691507bbf5853540229b3ad775b836bf.tar.gz
kernel: Clean up KERNEL_IMAGETYPE_FOR_MAKE
Remove the lambda function setting KERNEL_IMAGETYPE_FOR_MAKE and instead set it in the anonymous python function. This also allows us to handle image types which are not supported directly by kernel, but require some other kernel target to be built. This is the case for example with the fitImage, which is the uImage successor. There is no functional change. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Richard Purdie <richard.purdie@linuxfoundation.org> Cc: Koen Kooi <koen@dominion.thruhere.net> Cc: Paul Eggleton <paul.eggleton@linux.intel.com> Cc: Ross Burton <ross.burton@intel.com> Cc: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/kernel.bbclass')
-rw-r--r--meta/classes/kernel.bbclass6
1 files changed, 4 insertions, 2 deletions
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 54725baaf1..1782473181 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -17,12 +17,16 @@ INITRAMFS_TASK ?= ""
INITRAMFS_IMAGE_BUNDLE ?= ""
python __anonymous () {
+ import re
+
kerneltype = d.getVar('KERNEL_IMAGETYPE', True)
if kerneltype == 'uImage':
depends = d.getVar("DEPENDS", True)
depends = "%s u-boot-mkimage-native" % depends
d.setVar("DEPENDS", depends)
+ d.setVar("KERNEL_IMAGETYPE_FOR_MAKE", re.sub(r'\.gz$', '', kerneltype))
+
image = d.getVar('INITRAMFS_IMAGE', True)
if image:
d.appendVarFlag('do_bundle_initramfs', 'depends', ' ${INITRAMFS_IMAGE}:do_rootfs')
@@ -104,8 +108,6 @@ KERNEL_ALT_IMAGETYPE ??= ""
# they are staged.
KERNEL_SRC_PATH = "/usr/src/kernel"
-KERNEL_IMAGETYPE_FOR_MAKE = "${@(lambda s: s[:-3] if s[-3:] == ".gz" else s)(d.getVar('KERNEL_IMAGETYPE', True))}"
-
copy_initramfs() {
echo "Copying initramfs into ./usr ..."
# In case the directory is not created yet from the first pass compile: