diff options
-rw-r--r-- | meta/classes/kernel.bbclass | 6 |
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 ?= "" | |||
17 | INITRAMFS_IMAGE_BUNDLE ?= "" | 17 | INITRAMFS_IMAGE_BUNDLE ?= "" |
18 | 18 | ||
19 | python __anonymous () { | 19 | python __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. |
105 | KERNEL_SRC_PATH = "/usr/src/kernel" | 109 | KERNEL_SRC_PATH = "/usr/src/kernel" |
106 | 110 | ||
107 | KERNEL_IMAGETYPE_FOR_MAKE = "${@(lambda s: s[:-3] if s[-3:] == ".gz" else s)(d.getVar('KERNEL_IMAGETYPE', True))}" | ||
108 | |||
109 | copy_initramfs() { | 111 | copy_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: |