From 3330093982a671d30ccf08aa131ec9dc7144db59 Mon Sep 17 00:00:00 2001 From: Mark Hatle Date: Tue, 25 Jan 2022 10:05:28 -0800 Subject: embeddedsw: Update to skip checks in eSDK build/install device-tree, fsbl, plmfw, pmufw, psmfw do basic validation checks, when in an eSDK skip these checks. Otherwise a partially configured system can't generate an eSDK for the end user. Sync Core and Standalone usages to be consistent. Also cleanup the BB_DONT_CACHE to be consistent in all usages. Signed-off-by: Mark Hatle --- .../recipes-bsp/embeddedsw/fsbl.bbappend | 15 ++++++++++++--- .../recipes-bsp/embeddedsw/plmfw.bbappend | 15 ++++++++++++--- .../recipes-bsp/embeddedsw/pmufw.bbappend | 15 ++++++++++++--- .../recipes-bsp/embeddedsw/psmfw.bbappend | 16 +++++++++++++--- 4 files changed, 49 insertions(+), 12 deletions(-) (limited to 'meta-xilinx-standalone/recipes-bsp/embeddedsw') diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/fsbl.bbappend b/meta-xilinx-standalone/recipes-bsp/embeddedsw/fsbl.bbappend index 5b02e3de..4507a0c7 100644 --- a/meta-xilinx-standalone/recipes-bsp/embeddedsw/fsbl.bbappend +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/fsbl.bbappend @@ -3,7 +3,16 @@ FSBL_INC = "${@bb.utils.contains('BBMULTICONFIG', 'fsbl-fw', 'fsbl-fw-cfg.inc', require ${FSBL_INC} def check_fsbl_variables(d): - if not d.getVar('FSBL_DEPENDS') and not d.getVar('FSBL_MCDEPENDS') and not (d.getVar('BBMULTICONFIG') and 'fsbl-fw' in d.getVar('BBMULTICONFIG').split()): + # If both are blank, the user MUST pass in the path to the firmware! + if not d.getVar('FSBL_DEPENDS') and not d.getVar('FSBL_MCDEPENDS'): + # Don't cache this, as the items on disk can change! + d.setVar('BB_DONT_CACHE', '1') + if not os.path.exists(d.getVar('FSBL_FILE') + ".elf"): - d.setVar('BB_DONT_CACHE', '1') - raise bb.parse.SkipRecipe("The expect file %s.elf is not available.\nEither specify FSBL_FILE, or you may need to enable BBMULTICONFIG += 'fsbl-fw' to generate it." % d.getVar('FSBL_FILE')) + if not d.getVar('WITHIN_EXT_SDK'): + raise bb.parse.SkipRecipe("The expect file %s.elf is not available.\nSet FSBL_FILE to the path with a precompiled FSBL binary or you may need to enable BBMULTICONFIG += 'fsbl-fw' to generate it." % d.getVar('FSBL_FILE')) + else: + # We found the file, so be sure to track it + d.setVar('SRC_URI', 'file://${FSBL_FILE}.elf') + d.setVarFlag('do_install', 'file-checksums', '${FSBL_FILE}.elf:True') + d.setVarFlag('do_deploy', 'file-checksums', '${FSBL_FILE}.elf:True') diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/plmfw.bbappend b/meta-xilinx-standalone/recipes-bsp/embeddedsw/plmfw.bbappend index d63529ff..49c897e1 100644 --- a/meta-xilinx-standalone/recipes-bsp/embeddedsw/plmfw.bbappend +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/plmfw.bbappend @@ -3,7 +3,11 @@ PLMFW_INC = "${@bb.utils.contains('BBMULTICONFIG', 'versal-fw', 'versal-fw-cfg.i require ${PLMFW_INC} def check_plm_vars(d): - if not d.getVar('PLM_DEPENDS') and not d.getVar('PLM_MCDEPENDS') and not (d.getVar('BBMULTICONFIG') and 'versal-fw' in d.getVar('BBMULTICONFIG').split()): + # If both are blank, the user MUST pass in the path to the firmware! + if not d.getVar('PLM_DEPENDS') and not d.getVar('PLM_MCDEPENDS'): + # Don't cache this, as the items on disk can change! + d.setVar('BB_DONT_CACHE', '1') + msg = "" fail = False if not os.path.exists(d.getVar('PLM_FILE') + ".elf"): @@ -13,5 +17,10 @@ def check_plm_vars(d): msg = msg + "The expected file %s.bin is not available. " % d.getVar('PLM_FILE') fail = True if fail: - d.setVar('BB_DONT_CACHE', '1') - raise bb.parse.SkipRecipe("%s\nEither specify PLM_FILE, or you may need to enable BBMULTICONFIG += 'versal-fw' to generate it." % msg) + if not d.getVar('WITHIN_EXT_SDK'): + raise bb.parse.SkipRecipe("%s\nEither specify PLM_FILE, or you may need to enable BBMULTICONFIG += 'versal-fw' to generate it." % msg) + else: + # We found the file, so be sure to track it + d.setVar('SRC_URI', 'file://${PLM_FILE}.elf file://${PLM_FILE}.bin') + d.setVarFlag('do_install', 'file-checksums', '${PLM_FILE}.elf:True') + d.setVarFlag('do_deploy', 'file-checksums', '${PLM_FILE}.elf:True ${PLM_FILE}.bin:True') diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmufw.bbappend b/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmufw.bbappend index 947408a1..663134c4 100644 --- a/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmufw.bbappend +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmufw.bbappend @@ -3,7 +3,11 @@ PMUFW_INC = "${@bb.utils.contains('BBMULTICONFIG', 'zynqmp-pmufw', 'zynqmp-pmufw require ${PMUFW_INC} def check_pmu_vars(d): - if not d.getVar('PMU_DEPENDS') and not d.getVar('PMU_MCDEPENDS') and not (d.getVar('BBMULTICONFIG') and 'zynqmp-pmufw' in d.getVar('BBMULTICONFIG').split()): + # If both are blank, the user MUST pass in the path to the firmware! + if not d.getVar('PMU_FIRMWARE_DEPENDS') and not d.getVar('PMU_FIRMWARE_MCDEPENDS'): + # Don't cache this, as the items on disk can change! + d.setVar('BB_DONT_CACHE', '1') + msg = "" fail = False if not os.path.exists(d.getVar('PMU_FILE') + ".elf"): @@ -13,5 +17,10 @@ def check_pmu_vars(d): msg = msg + "The expected file %s.bin is not available. " % d.getVar('PMU_FILE') fail = True if fail: - d.setVar('BB_DONT_CACHE', '1') - raise bb.parse.SkipRecipe("%s\nEither specify PMU_FILE, or you may need to enable BBMULTICONFIG += 'zynqmp-pmufw' to generate it." % msg) + if not d.getVar('WITHIN_EXT_SDK'): + raise bb.parse.SkipRecipe("%s\nEither specify PMU_FILE, or you may need to enable BBMULTICONFIG += 'zynqmp-pmufw' to generate it." % msg) + else: + # We found the file, so be sure to track it + d.setVar('SRC_URI', 'file://${PMU_FILE}.elf file://${PMU_FILE}.bin') + d.setVarFlag('do_install', 'file-checksums', '${PMU_FILE}.elf:True') + d.setVarFlag('do_deploy', 'file-checksums', '${PMU_FILE}.elf:True ${PMU_FILE}.bin:True') diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/psmfw.bbappend b/meta-xilinx-standalone/recipes-bsp/embeddedsw/psmfw.bbappend index 8944152d..dc7c6df6 100644 --- a/meta-xilinx-standalone/recipes-bsp/embeddedsw/psmfw.bbappend +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/psmfw.bbappend @@ -3,7 +3,11 @@ PSMFW_INC = "${@bb.utils.contains('BBMULTICONFIG', 'versal-fw', 'versal-fw-cfg.i require ${PSMFW_INC} def check_psm_vars(d): - if not d.getVar('PSM_DEPENDS') and not d.getVar('PSM_MCDEPENDS') and not (d.getVar('BBMULTICONFIG') and 'versal-fw' in d.getVar('BBMULTICONFIG').split()): + # If both are blank, the user MUST pass in the path to the firmware! + if not d.getVar('PSM_DEPENDS') and not d.getVar('PSM_MCDEPENDS'): + # Don't cache this, as the items on disk can change! + d.setVar('BB_DONT_CACHE', '1') + msg = "" fail = False if not os.path.exists(d.getVar('PSM_FILE') + ".elf"): @@ -12,6 +16,12 @@ def check_psm_vars(d): if not os.path.exists(d.getVar('PSM_FILE') + ".bin"): msg = msg + "The expected file %s.bin is not available. " % d.getVar('PSM_FILE') fail = True + if fail: - d.setVar('BB_DONT_CACHE', '1') - raise bb.parse.SkipRecipe("%s\nEither specify PSM_FILE, or you may need to enable BBMULTICONFIG += 'versal-fw' to generate it." % msg) + if not d.getVar('WITHIN_EXT_SDK'): + raise bb.parse.SkipRecipe("%s\nEither specify PSM_FILE, or you may need to enable BBMULTICONFIG += 'versal-fw' to generate it." % msg) + else: + # We found the file, so be sure to track it + d.setVar('SRC_URI', 'file://${PSM_FILE}.elf file://${PSM_FILE}.bin') + d.setVarFlag('do_install', 'file-checksums', '${PSM_FILE}.elf:True') + d.setVarFlag('do_deploy', 'file-checksums', '${PSM_FILE}.elf:True ${PSM_FILE}.bin:True') -- cgit v1.2.3-54-g00ecf