From 1e27a13557f68a834b5b06e233427c0aaa9d7d78 Mon Sep 17 00:00:00 2001 From: Raju Kumar Pothuraju Date: Fri, 10 Jan 2025 11:01:50 +0530 Subject: psmfw: Remove psmfw.bin support We are using psmfw.elf in all flows to build and boot. Remove the psmfw.bin dependency or support from psmfw recipe. Use below command to generate the .bin from .elf. objcopy -O binary psm-$MACHINE.elf psm.bin Signed-off-by: Raju Kumar Pothuraju Signed-off-by: Mark Hatle --- meta-xilinx-core/recipes-bsp/embeddedsw/psmfw.bb | 16 ++++------------ .../recipes-bsp/embeddedsw/psm-firmware_sdt.inc | 6 ------ .../recipes-bsp/embeddedsw/psm-firmware_generic.inc | 4 ---- .../embeddedsw/psmfw-meta-xilinx-standalone.inc | 11 ++--------- 4 files changed, 6 insertions(+), 31 deletions(-) diff --git a/meta-xilinx-core/recipes-bsp/embeddedsw/psmfw.bb b/meta-xilinx-core/recipes-bsp/embeddedsw/psmfw.bb index 3fa6d98c..0c70a0c5 100644 --- a/meta-xilinx-core/recipes-bsp/embeddedsw/psmfw.bb +++ b/meta-xilinx-core/recipes-bsp/embeddedsw/psmfw.bb @@ -17,7 +17,7 @@ COMPATIBLE_HOST = ".*" PACKAGE_ARCH = "${MACHINE_ARCH}" # Default expects the user to provide the psm-firmware in the deploy -# directory, named "psm-firmware-${MACHINE}.elf" and "psm-firmware-${MACHINE}.bin" +# directory, named "psm-firmware-${MACHINE}.elf" # A machine, multiconfig, or local.conf should override this PSM_DEPENDS ??= "" PSM_MCDEPENDS ??= "" @@ -25,7 +25,7 @@ PSM_DEPLOY_DIR ??= "${DEPLOY_DIR_IMAGE}" PSM_FIRMWARE_DEPLOY_DIR[vardepsexclude] += "TOPDIR" PSM_FIRMWARE_IMAGE_NAME ??= "psm-firmware-${MACHINE}" -# Default is for the multilib case (without the extension .elf/.bin) +# Default is for the multilib case (without the extension .elf) PSM_FILE ??= "${PSM_FIRMWARE_DEPLOY_DIR}/${PSM_FIRMWARE_IMAGE_NAME}" PSM_FILE[vardepsexclude] = "PSM_FIRMWARE_DEPLOY_DIR" @@ -49,7 +49,6 @@ do_deploy() { # If the item is already in OUR deploy_image_dir, nothing to deploy! if ${SHOULD_DEPLOY}; then install -Dm 0644 ${PSM_FILE}.elf ${DEPLOYDIR}/${PSM_FIRMWARE_IMAGE_NAME}.elf - install -Dm 0644 ${PSM_FILE}.bin ${DEPLOYDIR}/${PSM_FIRMWARE_IMAGE_NAME}.bin fi } @@ -71,22 +70,15 @@ def check_psm_vars(d): d.setVar('BB_DONT_CACHE', '1') msg = "" - fail = False if not os.path.exists(d.getVar('PSM_FILE') + ".elf"): msg = msg + "The expected file %s.elf is not available. " % d.getVar('PSM_FILE') - fail = True - 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: if not d.getVar('WITHIN_EXT_SDK'): raise bb.parse.SkipRecipe("%s\nSee the meta-xilinx-core README." % 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.setVar('SRC_URI', 'file://${PSM_FILE}.elf') d.setVarFlag('do_install', 'file-checksums', '${PSM_FILE}.elf:True') - d.setVarFlag('do_deploy', 'file-checksums', '${PSM_FILE}.elf:True ${PSM_FILE}.bin:True') + d.setVarFlag('do_deploy', 'file-checksums', '${PSM_FILE}.elf:True') python() { # Need to allow bbappends to change the check diff --git a/meta-xilinx-standalone-sdt/recipes-bsp/embeddedsw/psm-firmware_sdt.inc b/meta-xilinx-standalone-sdt/recipes-bsp/embeddedsw/psm-firmware_sdt.inc index acd3a82a..edf9793e 100644 --- a/meta-xilinx-standalone-sdt/recipes-bsp/embeddedsw/psm-firmware_sdt.inc +++ b/meta-xilinx-standalone-sdt/recipes-bsp/embeddedsw/psm-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 = "versal_psmfw.elf" do_deploy() { install -Dm 0644 ${B}/${ESW_COMPONENT} ${DEPLOYDIR}/${PSM_FIRMWARE_BASE_NAME}.elf ln -sf ${PSM_FIRMWARE_BASE_NAME}.elf ${DEPLOYDIR}/${PSM_FIRMWARE_IMAGE_NAME}.elf - install -m 0644 ${B}/${ESW_COMPONENT}.bin ${DEPLOYDIR}/${PSM_FIRMWARE_BASE_NAME}.bin - ln -sf ${PSM_FIRMWARE_BASE_NAME}.bin ${DEPLOYDIR}/${PSM_FIRMWARE_IMAGE_NAME}.bin } addtask deploy before do_build after do_install diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/psm-firmware_generic.inc b/meta-xilinx-standalone/recipes-bsp/embeddedsw/psm-firmware_generic.inc index 252425ef..47bde41d 100644 --- a/meta-xilinx-standalone/recipes-bsp/embeddedsw/psm-firmware_generic.inc +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/psm-firmware_generic.inc @@ -42,8 +42,6 @@ do_compile() { # --build-id=none is required due to linker script not defining a location for it. # Again, recipe-systoot include is necessary oe_runmake CC_FLAGS="-MMD -MP -Wl,--build-id=none -I${STAGING_DIR_TARGET}/usr/include" - - ${MB_OBJCOPY} -O binary ${B}/${ESW_COMPONENT} ${B}/${ESW_COMPONENT}.bin } do_install() { @@ -57,8 +55,6 @@ ESW_COMPONENT = "psmfw.elf" do_deploy() { install -Dm 0644 ${B}/${ESW_COMPONENT} ${DEPLOYDIR}/${PSM_FIRMWARE_BASE_NAME}.elf ln -sf ${PSM_FIRMWARE_BASE_NAME}.elf ${DEPLOYDIR}/${PSM_FIRMWARE_IMAGE_NAME}.elf - install -m 0644 ${B}/${ESW_COMPONENT}.bin ${DEPLOYDIR}/${PSM_FIRMWARE_BASE_NAME}.bin - ln -sf ${PSM_FIRMWARE_BASE_NAME}.bin ${DEPLOYDIR}/${PSM_FIRMWARE_IMAGE_NAME}.bin } addtask deploy before do_build after do_install diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/psmfw-meta-xilinx-standalone.inc b/meta-xilinx-standalone/recipes-bsp/embeddedsw/psmfw-meta-xilinx-standalone.inc index dc7c6df6..4d11cbce 100644 --- a/meta-xilinx-standalone/recipes-bsp/embeddedsw/psmfw-meta-xilinx-standalone.inc +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/psmfw-meta-xilinx-standalone.inc @@ -9,19 +9,12 @@ def check_psm_vars(d): d.setVar('BB_DONT_CACHE', '1') msg = "" - fail = False if not os.path.exists(d.getVar('PSM_FILE') + ".elf"): msg = msg + "The expected file %s.elf is not available. " % d.getVar('PSM_FILE') - fail = True - 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: 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.setVar('SRC_URI', 'file://${PSM_FILE}.elf') d.setVarFlag('do_install', 'file-checksums', '${PSM_FILE}.elf:True') - d.setVarFlag('do_deploy', 'file-checksums', '${PSM_FILE}.elf:True ${PSM_FILE}.bin:True') + d.setVarFlag('do_deploy', 'file-checksums', '${PSM_FILE}.elf:True') -- cgit v1.2.3-54-g00ecf