From 62e5de419cbe7c3ee176be7f6b14e485fd89b312 Mon Sep 17 00:00:00 2001 From: Mark Hatle Date: Fri, 24 Jan 2025 13:08:16 -0700 Subject: meta-xilinx-core: embeddedsw: Add workaround for mcdepends Multiconfig dependencies are configured to be specific to a single from and to multiconfig, for example: mc:default:xilinx-image-recovery:core-image-tiny-initramfs:do_image_complete The above says, when in the 'default' multiconfig, we depend on the 'xilinx-image-recovery' multiconfig, and need to run the do_image_complete task within the core-image-tiny-initramfs recipe. Two workarouns are present, the first adjusts: mc::to_mc:recipe:task to be mc:${BB_CURRENT_MC}:to_mc:recipe_task This will allow the mcdependencies produced by gen-machine-conf to wor in any multiconfig the user may have. In the future we will adjust gen-machine-conf to use ${BB_CURRET_MC} instead. Second there is a bug/oversight in bitbake where the BB_CURRENT_MC reports 'default', but the system is expecting '' (blank) when in the default Linux multiconfig. We will do this conversion to avoid any issues. A patch for bitbake is in progress. Signed-off-by: Mark Hatle --- meta-xilinx-core/recipes-bsp/embeddedsw/fsbl.bb | 10 ++++++++++ meta-xilinx-core/recipes-bsp/embeddedsw/imgrcry.bb | 10 ++++++++++ meta-xilinx-core/recipes-bsp/embeddedsw/imgsel.bb | 10 ++++++++++ meta-xilinx-core/recipes-bsp/embeddedsw/plmfw.bb | 10 ++++++++++ meta-xilinx-core/recipes-bsp/embeddedsw/pmufw.bb | 10 ++++++++++ meta-xilinx-core/recipes-bsp/embeddedsw/psmfw.bb | 10 ++++++++++ 6 files changed, 60 insertions(+) diff --git a/meta-xilinx-core/recipes-bsp/embeddedsw/fsbl.bb b/meta-xilinx-core/recipes-bsp/embeddedsw/fsbl.bb index ca18672b..c4e52853 100644 --- a/meta-xilinx-core/recipes-bsp/embeddedsw/fsbl.bb +++ b/meta-xilinx-core/recipes-bsp/embeddedsw/fsbl.bb @@ -80,4 +80,14 @@ def check_fsbl_variables(d): python() { # Need to allow bbappends to change the check check_fsbl_variables(d) + + # Fix the mcdepends dependency format: mc:from-mc:to-mc:recipe:task + # If the value is 'mc::' we'll adjust it to be mc:BB_CURRENT_MC: (temporary workaround) + # If the value is 'mc:default:' we'll adjuts it to be mc:: (temporary workaround for bitbake bug) + mcdepend = d.getVar('FSBL_MCDEPENDS') + if mcdepend: + if d.getVar('BB_CURRENT_MC') == 'default': + d.setVar('FSBL_MCDEPENDS', mcdepend.replace('mc:default:', 'mc::')) + else: + d.setVar('FSBL_MCDEPENDS', mcdepend.replace('mc::', 'mc:${BB_CURRENT_MC}:')) } diff --git a/meta-xilinx-core/recipes-bsp/embeddedsw/imgrcry.bb b/meta-xilinx-core/recipes-bsp/embeddedsw/imgrcry.bb index e87e8793..1875825e 100644 --- a/meta-xilinx-core/recipes-bsp/embeddedsw/imgrcry.bb +++ b/meta-xilinx-core/recipes-bsp/embeddedsw/imgrcry.bb @@ -66,4 +66,14 @@ def check_imgrcry_variables(d): python() { # Need to allow bbappends to change the check check_imgrcry_variables(d) + + # Fix the mcdepends dependency format: mc:from-mc:to-mc:recipe:task + # If the value is 'mc::' we'll adjust it to be mc:BB_CURRENT_MC: (temporary workaround) + # If the value is 'mc:default:' we'll adjuts it to be mc:: (temporary workaround for bitbake bug) + mcdepend = d.getVar('IMGRCRY_MCDEPENDS') + if mcdepend: + if d.getVar('BB_CURRENT_MC') == 'default': + d.setVar('IMGRCRY_MCDEPENDS', mcdepend.replace('mc:default:', 'mc::')) + else: + d.setVar('IMGRCRY_MCDEPENDS', mcdepend.replace('mc::', 'mc:${BB_CURRENT_MC}:')) } diff --git a/meta-xilinx-core/recipes-bsp/embeddedsw/imgsel.bb b/meta-xilinx-core/recipes-bsp/embeddedsw/imgsel.bb index 0c0f1549..5f7e9988 100644 --- a/meta-xilinx-core/recipes-bsp/embeddedsw/imgsel.bb +++ b/meta-xilinx-core/recipes-bsp/embeddedsw/imgsel.bb @@ -69,4 +69,14 @@ def check_imgsel_variables(d): python() { # Need to allow bbappends to change the check check_imgsel_variables(d) + + # Fix the mcdepends dependency format: mc:from-mc:to-mc:recipe:task + # If the value is 'mc::' we'll adjust it to be mc:BB_CURRENT_MC: (temporary workaround) + # If the value is 'mc:default:' we'll adjuts it to be mc:: (temporary workaround for bitbake bug) + mcdepend = d.getVar('IMGSEL_MCDEPENDS') + if mcdepend: + if d.getVar('BB_CURRENT_MC') == 'default': + d.setVar('IMGSEL_MCDEPENDS', mcdepend.replace('mc:default:', 'mc::')) + else: + d.setVar('IMGSEL_MCDEPENDS', mcdepend.replace('mc::', 'mc:${BB_CURRENT_MC}:')) } diff --git a/meta-xilinx-core/recipes-bsp/embeddedsw/plmfw.bb b/meta-xilinx-core/recipes-bsp/embeddedsw/plmfw.bb index c3c595b2..94db9957 100644 --- a/meta-xilinx-core/recipes-bsp/embeddedsw/plmfw.bb +++ b/meta-xilinx-core/recipes-bsp/embeddedsw/plmfw.bb @@ -83,5 +83,15 @@ def check_plm_vars(d): python() { # Need to allow bbappends to change the check check_plm_vars(d) + + # Fix the mcdepends dependency format: mc:from-mc:to-mc:recipe:task + # If the value is 'mc::' we'll adjust it to be mc:BB_CURRENT_MC: (temporary workaround) + # If the value is 'mc:default:' we'll adjuts it to be mc:: (temporary workaround for bitbake bug) + mcdepend = d.getVar('PLM_MCDEPENDS') + if mcdepend: + if d.getVar('BB_CURRENT_MC') == 'default': + d.setVar('PLM_MCDEPENDS', mcdepend.replace('mc:default:', 'mc::')) + else: + d.setVar('PLM_MCDEPENDS', mcdepend.replace('mc::', 'mc:${BB_CURRENT_MC}:')) } diff --git a/meta-xilinx-core/recipes-bsp/embeddedsw/pmufw.bb b/meta-xilinx-core/recipes-bsp/embeddedsw/pmufw.bb index 40a0f5b2..538749ed 100644 --- a/meta-xilinx-core/recipes-bsp/embeddedsw/pmufw.bb +++ b/meta-xilinx-core/recipes-bsp/embeddedsw/pmufw.bb @@ -81,4 +81,14 @@ def check_pmu_vars(d): python() { # Need to allow bbappends to change the check check_pmu_vars(d) + + # Fix the mcdepends dependency format: mc:from-mc:to-mc:recipe:task + # If the value is 'mc::' we'll adjust it to be mc:BB_CURRENT_MC: (temporary workaround) + # If the value is 'mc:default:' we'll adjuts it to be mc:: (temporary workaround for bitbake bug) + mcdepend = d.getVar('PMU_MCDEPENDS') + if mcdepend: + if d.getVar('BB_CURRENT_MC') == 'default': + d.setVar('PMU_MCDEPENDS', mcdepend.replace('mc:default:', 'mc::')) + else: + d.setVar('PMU_MCDEPENDS', mcdepend.replace('mc::', 'mc:${BB_CURRENT_MC}:')) } diff --git a/meta-xilinx-core/recipes-bsp/embeddedsw/psmfw.bb b/meta-xilinx-core/recipes-bsp/embeddedsw/psmfw.bb index 0c70a0c5..d5305537 100644 --- a/meta-xilinx-core/recipes-bsp/embeddedsw/psmfw.bb +++ b/meta-xilinx-core/recipes-bsp/embeddedsw/psmfw.bb @@ -83,5 +83,15 @@ def check_psm_vars(d): python() { # Need to allow bbappends to change the check check_psm_vars(d) + + # Fix the mcdepends dependency format: mc:from-mc:to-mc:recipe:task + # If the value is 'mc::' we'll adjust it to be mc:BB_CURRENT_MC: (temporary workaround) + # If the value is 'mc:default:' we'll adjuts it to be mc:: (temporary workaround for bitbake bug) + mcdepend = d.getVar('PSM_MCDEPENDS') + if mcdepend: + if d.getVar('BB_CURRENT_MC') == 'default': + d.setVar('PSM_MCDEPENDS', mcdepend.replace('mc:default:', 'mc::')) + else: + d.setVar('PSM_MCDEPENDS', mcdepend.replace('mc::', 'mc:${BB_CURRENT_MC}:')) } -- cgit v1.2.3-54-g00ecf