summaryrefslogtreecommitdiffstats
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:51 +0100
commit92864a98300926393394c5f503d3bc2a2cb92e39 (patch)
tree306a6a3bcc0bd2c1d5b157279ace5e9a12eb4e9f /meta/classes/kernel.bbclass
parentaf6405ee9a455db38ee60cab06412f3a1fa6c3de (diff)
downloadpoky-92864a98300926393394c5f503d3bc2a2cb92e39.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. (From OE-Core rev: a1690131691507bbf5853540229b3ad775b836bf) 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 ?= ""
17INITRAMFS_IMAGE_BUNDLE ?= "" 17INITRAMFS_IMAGE_BUNDLE ?= ""
18 18
19python __anonymous () { 19python __anonymous () {
20 import re
21
20 kerneltype = d.getVar('KERNEL_IMAGETYPE', True) 22 kerneltype = d.getVar('KERNEL_IMAGETYPE', True)
21 if kerneltype == 'uImage': 23 if kerneltype == 'uImage':
22 depends = d.getVar("DEPENDS", True) 24 depends = d.getVar("DEPENDS", True)
23 depends = "%s u-boot-mkimage-native" % depends 25 depends = "%s u-boot-mkimage-native" % depends
24 d.setVar("DEPENDS", depends) 26 d.setVar("DEPENDS", depends)
25 27
28 d.setVar("KERNEL_IMAGETYPE_FOR_MAKE", re.sub(r'\.gz$', '', kerneltype))
29
26 image = d.getVar('INITRAMFS_IMAGE', True) 30 image = d.getVar('INITRAMFS_IMAGE', True)
27 if image: 31 if image:
28 d.appendVarFlag('do_bundle_initramfs', 'depends', ' ${INITRAMFS_IMAGE}:do_rootfs') 32 d.appendVarFlag('do_bundle_initramfs', 'depends', ' ${INITRAMFS_IMAGE}:do_rootfs')
@@ -104,8 +108,6 @@ KERNEL_ALT_IMAGETYPE ??= ""
104# they are staged. 108# they are staged.
105KERNEL_SRC_PATH = "/usr/src/kernel" 109KERNEL_SRC_PATH = "/usr/src/kernel"
106 110
107KERNEL_IMAGETYPE_FOR_MAKE = "${@(lambda s: s[:-3] if s[-3:] == ".gz" else s)(d.getVar('KERNEL_IMAGETYPE', True))}"
108
109copy_initramfs() { 111copy_initramfs() {
110 echo "Copying initramfs into ./usr ..." 112 echo "Copying initramfs into ./usr ..."
111 # In case the directory is not created yet from the first pass compile: 113 # In case the directory is not created yet from the first pass compile: