From 979d2f3bf4908a9a0185be740a7dff9bf791264d Mon Sep 17 00:00:00 2001 From: Raju Kumar Pothuraju Date: Fri, 10 Jan 2025 11:01:49 +0530 Subject: pmufw.bb: Remove pmufw.bin support We are using pmufw.elf in all flows to build and boot. Remove the pmufw.bin dependency or support from pmufw recipe. Use below command to generate the .bin from .elf. objcopy -O binary pmu-$MACHINE.elf pmu.bin Signed-off-by: Raju Kumar Pothuraju Signed-off-by: Mark Hatle --- meta-xilinx-core/conf/machine/include/soc-zynqmp.inc | 2 +- meta-xilinx-core/recipes-bsp/embeddedsw/pmufw.bb | 13 +++---------- .../recipes-bsp/embeddedsw/pmu-firmware_sdt.inc | 6 ------ .../recipes-bsp/embeddedsw/pmu-firmware_generic.inc | 4 ---- .../recipes-bsp/embeddedsw/pmufw-meta-xilinx-standalone.inc | 10 ++-------- 5 files changed, 6 insertions(+), 29 deletions(-) diff --git a/meta-xilinx-core/conf/machine/include/soc-zynqmp.inc b/meta-xilinx-core/conf/machine/include/soc-zynqmp.inc index aee5c19c..74029c4a 100644 --- a/meta-xilinx-core/conf/machine/include/soc-zynqmp.inc +++ b/meta-xilinx-core/conf/machine/include/soc-zynqmp.inc @@ -25,7 +25,7 @@ PMU_ROM ?= "${DEPLOY_DIR_IMAGE}/pmu-rom.elf" # Default expects the user to provide a specific pmu-firwmare in the deploy -# directory, named "pmu-firmware-${MACHINE}.elf" and "pmu-firmware-${MACHINE}.bin" +# directory, named "pmu-firmware-${MACHINE}.elf" PMU_DEPENDS ??= "" PMU_MCDEPENDS ??= "" PMU_FIRMWARE_DEPLOY_DIR ??= "${DEPLOY_DIR_IMAGE}" diff --git a/meta-xilinx-core/recipes-bsp/embeddedsw/pmufw.bb b/meta-xilinx-core/recipes-bsp/embeddedsw/pmufw.bb index 344a6f7a..40a0f5b2 100644 --- a/meta-xilinx-core/recipes-bsp/embeddedsw/pmufw.bb +++ b/meta-xilinx-core/recipes-bsp/embeddedsw/pmufw.bb @@ -23,7 +23,7 @@ PMU_FIRMWARE_DEPLOY_DIR ??= "${DEPLOY_DIR_IMAGE}" PMU_FIRMWARE_DEPLOY_DIR[vardepsexclude] += "TOPDIR" PMU_FIRMWARE_IMAGE_NAME ??= "pmu-firmware-${MACHINE}" -# Default is for the multilib case (without the extension .elf/.bin) +# Default is for the multilib case (without the extension .elf) PMU_FILE ??= "${PMU_FIRMWARE_DEPLOY_DIR}/${PMU_FIRMWARE_IMAGE_NAME}" PMU_FILE[vardepsexclude] = "PMU_FIRMWARE_DEPLOY_DIR" @@ -46,7 +46,6 @@ SHOULD_DEPLOY = "${@'false' if (d.getVar('PMU_FILE')).startswith(d.getVar('DEPLO do_deploy() { if ${SHOULD_DEPLOY}; then install -Dm 0644 ${PMU_FILE}.elf ${DEPLOYDIR}/${PMU_FIRMWARE_IMAGE_NAME}.elf - install -Dm 0644 ${PMU_FILE}.bin ${DEPLOYDIR}/${PMU_FIRMWARE_IMAGE_NAME}.bin fi } @@ -68,21 +67,15 @@ def check_pmu_vars(d): d.setVar('BB_DONT_CACHE', '1') msg = "" - fail = False if not os.path.exists(d.getVar('PMU_FILE') + ".elf"): msg = msg + "The expected file %s.elf is not available. " % d.getVar('PMU_FILE') - fail = True - if not os.path.exists(d.getVar('PMU_FILE') + ".bin"): - msg = msg + "The expected file %s.bin is not available. " % d.getVar('PMU_FILE') - fail = True - if fail: if not d.getVar('WITHIN_EXT_SDK'): raise bb.parse.SkipRecipe("%s See the meta-xilinx-core README." % 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.setVar('SRC_URI', 'file://${PMU_FILE}.elf') d.setVarFlag('do_install', 'file-checksums', '${PMU_FILE}.elf:True') - d.setVarFlag('do_deploy', 'file-checksums', '${PMU_FILE}.elf:True ${PMU_FILE}.bin:True') + d.setVarFlag('do_deploy', 'file-checksums', '${PMU_FILE}.elf:True') python() { diff --git a/meta-xilinx-standalone-sdt/recipes-bsp/embeddedsw/pmu-firmware_sdt.inc b/meta-xilinx-standalone-sdt/recipes-bsp/embeddedsw/pmu-firmware_sdt.inc index e5b123cd..bbab5b0d 100644 --- a/meta-xilinx-standalone-sdt/recipes-bsp/embeddedsw/pmu-firmware_sdt.inc +++ b/meta-xilinx-standalone-sdt/recipes-bsp/embeddedsw/pmu-firmware_sdt.inc @@ -11,10 +11,6 @@ do_configure:prepend() { ) } -do_compile:append() { - ${OBJCOPY} -O binary ${B}/${ESW_COMPONENT} ${B}/${ESW_COMPONENT}.bin -} - do_install() { : } @@ -24,8 +20,6 @@ ESW_COMPONENT = "zynqmp_pmufw.elf" do_deploy() { install -Dm 0644 ${B}/${ESW_COMPONENT} ${DEPLOYDIR}/${PMU_FIRMWARE_BASE_NAME}.elf ln -sf ${PMU_FIRMWARE_BASE_NAME}.elf ${DEPLOYDIR}/${PMU_FIRMWARE_IMAGE_NAME}.elf - install -m 0644 ${B}/${ESW_COMPONENT}.bin ${DEPLOYDIR}/${PMU_FIRMWARE_BASE_NAME}.bin - ln -sf ${PMU_FIRMWARE_BASE_NAME}.bin ${DEPLOYDIR}/${PMU_FIRMWARE_IMAGE_NAME}.bin } addtask deploy before do_build after do_install diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware_generic.inc b/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware_generic.inc index 9d4a5b07..d7a5009f 100644 --- a/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware_generic.inc +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware_generic.inc @@ -31,8 +31,6 @@ EXTRA_OEMAKE = "${@bsp_make_vars(d)}" do_compile() { oe_runmake - - ${MB_OBJCOPY} -O binary ${B}/${ESW_COMPONENT} ${B}/${ESW_COMPONENT}.bin } do_install() { @@ -46,8 +44,6 @@ ESW_COMPONENT = "executable.elf" do_deploy() { install -Dm 0644 ${B}/${ESW_COMPONENT} ${DEPLOYDIR}/${PMU_FIRMWARE_BASE_NAME}.elf ln -sf ${PMU_FIRMWARE_BASE_NAME}.elf ${DEPLOYDIR}/${PMU_FIRMWARE_IMAGE_NAME}.elf - install -m 0644 ${B}/${ESW_COMPONENT}.bin ${DEPLOYDIR}/${PMU_FIRMWARE_BASE_NAME}.bin - ln -sf ${PMU_FIRMWARE_BASE_NAME}.bin ${DEPLOYDIR}/${PMU_FIRMWARE_IMAGE_NAME}.bin } addtask deploy before do_build after do_install diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmufw-meta-xilinx-standalone.inc b/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmufw-meta-xilinx-standalone.inc index 241da1d0..4af57ec7 100644 --- a/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmufw-meta-xilinx-standalone.inc +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmufw-meta-xilinx-standalone.inc @@ -9,18 +9,12 @@ def check_pmu_vars(d): d.setVar('BB_DONT_CACHE', '1') msg = "" - fail = False if not os.path.exists(d.getVar('PMU_FILE') + ".elf"): msg = msg + "The expected file %s.elf is not available. " % d.getVar('PMU_FILE') - fail = True - if not os.path.exists(d.getVar('PMU_FILE') + ".bin"): - msg = msg + "The expected file %s.bin is not available. " % d.getVar('PMU_FILE') - fail = True - if fail: 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.setVar('SRC_URI', 'file://${PMU_FILE}.elf') d.setVarFlag('do_install', 'file-checksums', '${PMU_FILE}.elf:True') - d.setVarFlag('do_deploy', 'file-checksums', '${PMU_FILE}.elf:True ${PMU_FILE}.bin:True') + d.setVarFlag('do_deploy', 'file-checksums', '${PMU_FILE}.elf:True') -- cgit v1.2.3-54-g00ecf