summaryrefslogtreecommitdiffstats
path: root/meta/classes/kernel.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes/kernel.bbclass')
-rw-r--r--meta/classes/kernel.bbclass13
1 files changed, 9 insertions, 4 deletions
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 473e28be47..880ee61406 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -30,6 +30,8 @@ INITRAMFS_IMAGE ?= ""
30INITRAMFS_IMAGE_NAME ?= "${@['${INITRAMFS_IMAGE}-${MACHINE}', ''][d.getVar('INITRAMFS_IMAGE') == '']}" 30INITRAMFS_IMAGE_NAME ?= "${@['${INITRAMFS_IMAGE}-${MACHINE}', ''][d.getVar('INITRAMFS_IMAGE') == '']}"
31INITRAMFS_TASK ?= "" 31INITRAMFS_TASK ?= ""
32INITRAMFS_IMAGE_BUNDLE ?= "" 32INITRAMFS_IMAGE_BUNDLE ?= ""
33INITRAMFS_DEPLOY_DIR_IMAGE ?= "${DEPLOY_DIR_IMAGE}"
34INITRAMFS_MULTICONFIG ?= ""
33 35
34# KERNEL_VERSION is extracted from source code. It is evaluated as 36# KERNEL_VERSION is extracted from source code. It is evaluated as
35# None for the first parsing, since the code has not been fetched. 37# None for the first parsing, since the code has not been fetched.
@@ -133,7 +135,10 @@ set -e
133 # the do_bundle_initramfs does nothing, but the INITRAMFS_IMAGE is built 135 # the do_bundle_initramfs does nothing, but the INITRAMFS_IMAGE is built
134 # standalone for use by wic and other tools. 136 # standalone for use by wic and other tools.
135 if image: 137 if image:
136 d.appendVarFlag('do_bundle_initramfs', 'depends', ' ${INITRAMFS_IMAGE}:do_image_complete') 138 if d.getVar('INITRAMFS_MULTICONFIG'):
139 d.appendVarFlag('do_bundle_initramfs', 'mcdepends', ' mc::${INITRAMFS_MULTICONFIG}:${INITRAMFS_IMAGE}:do_image_complete')
140 else:
141 d.appendVarFlag('do_bundle_initramfs', 'depends', ' ${INITRAMFS_IMAGE}:do_image_complete')
137 if image and bb.utils.to_boolean(d.getVar('INITRAMFS_IMAGE_BUNDLE')): 142 if image and bb.utils.to_boolean(d.getVar('INITRAMFS_IMAGE_BUNDLE')):
138 bb.build.addtask('do_transform_bundled_initramfs', 'do_deploy', 'do_bundle_initramfs', d) 143 bb.build.addtask('do_transform_bundled_initramfs', 'do_deploy', 'do_bundle_initramfs', d)
139 144
@@ -240,8 +245,8 @@ copy_initramfs() {
240 # Find and use the first initramfs image archive type we find 245 # Find and use the first initramfs image archive type we find
241 rm -f ${B}/usr/${INITRAMFS_IMAGE_NAME}.cpio 246 rm -f ${B}/usr/${INITRAMFS_IMAGE_NAME}.cpio
242 for img in cpio cpio.gz cpio.lz4 cpio.lzo cpio.lzma cpio.xz cpio.zst; do 247 for img in cpio cpio.gz cpio.lz4 cpio.lzo cpio.lzma cpio.xz cpio.zst; do
243 if [ -e "${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE_NAME}.$img" ]; then 248 if [ -e "${INITRAMFS_DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE_NAME}.$img" ]; then
244 cp ${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE_NAME}.$img ${B}/usr/. 249 cp ${INITRAMFS_DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE_NAME}.$img ${B}/usr/.
245 case $img in 250 case $img in
246 *gz) 251 *gz)
247 echo "gzip decompressing image" 252 echo "gzip decompressing image"
@@ -278,7 +283,7 @@ copy_initramfs() {
278 fi 283 fi
279 done 284 done
280 # Verify that the above loop found a initramfs, fail otherwise 285 # Verify that the above loop found a initramfs, fail otherwise
281 [ -f ${B}/usr/${INITRAMFS_IMAGE_NAME}.cpio ] && echo "Finished copy of initramfs into ./usr" || die "Could not find any ${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE_NAME}.cpio{.gz|.lz4|.lzo|.lzma|.xz|.zst) for bundling; INITRAMFS_IMAGE_NAME might be wrong." 286 [ -f ${B}/usr/${INITRAMFS_IMAGE_NAME}.cpio ] && echo "Finished copy of initramfs into ./usr" || die "Could not find any ${INITRAMFS_DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE_NAME}.cpio{.gz|.lz4|.lzo|.lzma|.xz|.zst) for bundling; INITRAMFS_IMAGE_NAME might be wrong."
282} 287}
283 288
284do_bundle_initramfs () { 289do_bundle_initramfs () {