From: Adrian Freihofer <[email protected]> When the wic image creation requires an initramfs image that is not bundled with the kernel (INITRAMFS_IMAGE_BUNDLE != "1"), ensure that the initramfs image is built before attempting to create the wic image by adding an explicit dependency on do_image_complete.
Previously, this dependency was incorrectly handled by kernel.bbclass. This change moves the responsibility to image_types_wic.bbclass where it belongs. Signed-off-by: Adrian Freihofer <[email protected]> --- meta/classes-recipe/image_types_wic.bbclass | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/meta/classes-recipe/image_types_wic.bbclass b/meta/classes-recipe/image_types_wic.bbclass index 675aa97513..aea61d67e3 100644 --- a/meta/classes-recipe/image_types_wic.bbclass +++ b/meta/classes-recipe/image_types_wic.bbclass @@ -190,6 +190,18 @@ python () { d.setVar('_WKS_TEMPLATE', body) bb.build.addtask('do_write_wks_template', 'do_image_wic', 'do_image', d) bb.build.addtask('do_image_wic', 'do_image_complete', None, d) + + # If the INITRAMFS_IMAGE is set and the INITRAMFS_IMAGE_BUNDLE is set to 1, the initramfs + # image is expected to be built as part of the kernel. Otherwise, the standalone image + # must be requestd to be in the deployed artifacts for the wic image to be built. + initramfs_image = d.getVar('INITRAMFS_IMAGE') + if initramfs_image and not bb.utils.to_boolean(d.getVar('INITRAMFS_IMAGE_BUNDLE')): + initramfs_multiconfig = d.getVar('INITRAMFS_MULTICONFIG') + if initramfs_multiconfig: + d.appendVarFlag('do_image_wic', 'mcdepends', ' mc:%s:%s:%s:do_image_complete' % + (d.getVar('BB_CURRENT_MC'), initramfs_multiconfig, initramfs_image)) + else: + d.appendVarFlag('do_image_wic', 'depends', ' %s:do_image_complete' % initramfs_image) } # -- 2.52.0
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#231628): https://lists.openembedded.org/g/openembedded-core/message/231628 Mute This Topic: https://lists.openembedded.org/mt/117939107/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
