]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
kernel-fitImage: Take possible multiconfig into account.
authorWeisser, Pascal.ext <Pascal.Weisser.ext@karlstorz.com>
Thu, 6 Feb 2025 08:26:56 +0000 (09:26 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 11 Feb 2025 11:42:23 +0000 (11:42 +0000)
When specifying the dependencies of do_assemble_fitimage_initramfs the
initramfs image might be built with another multiconfig. This needs to be
taken into account.

The path of the initramfs image also needs to be adapted to handle the
case when it's built with another multiconfig.

Signed-off-by: Weisser, Pascal <pascal.weisser.ext@karlstorz.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes-recipe/kernel-fitimage.bbclass

index 22356fe5678a8243154b9a7c4d9a87cf45b2a9de..5f1231fde37537681eb44c0167e284eddbf2d222 100644 (file)
@@ -39,7 +39,11 @@ python __anonymous () {
 
     image = d.getVar('INITRAMFS_IMAGE')
     if image:
-        d.appendVarFlag('do_assemble_fitimage_initramfs', 'depends', ' ${INITRAMFS_IMAGE}:do_image_complete')
+        if d.getVar('INITRAMFS_MULTICONFIG'):
+            mc = d.getVar('BB_CURRENT_MC')
+            d.appendVarFlag('do_assemble_fitimage_initramfs', 'mcdepends', ' mc:' + mc + ':${INITRAMFS_MULTICONFIG}:${INITRAMFS_IMAGE}:do_image_complete')
+        else:
+            d.appendVarFlag('do_assemble_fitimage_initramfs', 'depends', ' ${INITRAMFS_IMAGE}:do_image_complete')
 
     #check if there are any dtb providers
     providerdtb = d.getVar("PREFERRED_PROVIDER_virtual/dtb")
@@ -624,7 +628,7 @@ fitimage_assemble() {
                # Find and use the first initramfs image archive type we find
                found=
                for img in ${FIT_SUPPORTED_INITRAMFS_FSTYPES}; do
-                       initramfs_path="${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE_NAME}.$img"
+                       initramfs_path="${INITRAMFS_DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE_NAME}.$img"
                        if [ -e "$initramfs_path" ]; then
                                bbnote "Found initramfs image: $initramfs_path"
                                found=true