From 02242301c6f9f5a6e440a29dc0ac456882e9c7cf Mon Sep 17 00:00:00 2001 From: Raju Kumar Pothuraju Date: Tue, 7 Jan 2025 15:06:34 +0530 Subject: plmfw: Remove plmfw.bin support We are using plmfw.elf in all flows to build and boot. Remove the plmfw.bin dependency or support from plmfw recipe. Use below command to generate the .bin from .elf. objcopy -O binary plm-$MACHINE.elf plm.bin Signed-off-by: Raju Kumar Pothuraju Signed-off-by: Mark Hatle --- meta-xilinx-core/recipes-bsp/embeddedsw/plmfw.bb | 15 ++++----------- .../recipes-bsp/embeddedsw/plm-firmware_sdt.inc | 6 ------ .../recipes-bsp/embeddedsw/plm-firmware_generic.inc | 3 --- .../embeddedsw/plmfw-meta-xilinx-standalone.inc | 10 ++-------- 4 files changed, 6 insertions(+), 28 deletions(-) diff --git a/meta-xilinx-core/recipes-bsp/embeddedsw/plmfw.bb b/meta-xilinx-core/recipes-bsp/embeddedsw/plmfw.bb index 80063f85..c3c595b2 100644 --- a/meta-xilinx-core/recipes-bsp/embeddedsw/plmfw.bb +++ b/meta-xilinx-core/recipes-bsp/embeddedsw/plmfw.bb @@ -17,7 +17,7 @@ COMPATIBLE_HOST = ".*" PACKAGE_ARCH = "${MACHINE_ARCH}" # Default expects the user to provide the plm-firmware in the deploy -# directory, named "plm-${MACHINE}.elf" and "plm-${MACHINE}.bin" +# directory, named "plm-${MACHINE}.elf" # A machine, multiconfig, or local.conf should override this PLM_DEPENDS ??= "" PLM_MCDEPENDS ??= "" @@ -25,7 +25,7 @@ PLM_DEPLOY_DIR ??= "${DEPLOY_DIR_IMAGE}" PLM_DEPLOY_DIR[vardepsexclude] += "TOPDIR" PLM_IMAGE_NAME ??= "plm-${MACHINE}" -# Default is for the multilib case (without the extension .elf/.bin) +# Default is for the multilib case (without the extension .elf) PLM_FILE ??= "${PLM_DEPLOY_DIR}/${PLM_IMAGE_NAME}" PLM_FILE[vardepsexclude] = "PLM_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 ${PLM_FILE}.elf ${DEPLOYDIR}/${PLM_IMAGE_NAME}.elf - install -Dm 0644 ${PLM_FILE}.bin ${DEPLOYDIR}/${PLM_IMAGE_NAME}.bin fi } @@ -71,21 +70,15 @@ def check_plm_vars(d): d.setVar('BB_DONT_CACHE', '1') msg = "" - fail = False if not os.path.exists(d.getVar('PLM_FILE') + ".elf"): msg = msg + "The expected file %s.elf is not available. " % d.getVar('PLM_FILE') - fail = True - if not os.path.exists(d.getVar('PLM_FILE') + ".bin"): - msg = msg + "The expected file %s.bin is not available. " % d.getVar('PLM_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://${PLM_FILE}.elf file://${PLM_FILE}.bin') + d.setVar('SRC_URI', 'file://${PLM_FILE}.elf') d.setVarFlag('do_install', 'file-checksums', '${PLM_FILE}.elf:True') - d.setVarFlag('do_deploy', 'file-checksums', '${PLM_FILE}.elf:True ${PLM_FILE}.bin:True') + d.setVarFlag('do_deploy', 'file-checksums', '${PLM_FILE}.elf:True') python() { # Need to allow bbappends to change the check diff --git a/meta-xilinx-standalone-sdt/recipes-bsp/embeddedsw/plm-firmware_sdt.inc b/meta-xilinx-standalone-sdt/recipes-bsp/embeddedsw/plm-firmware_sdt.inc index 75580ba3..58164b70 100644 --- a/meta-xilinx-standalone-sdt/recipes-bsp/embeddedsw/plm-firmware_sdt.inc +++ b/meta-xilinx-standalone-sdt/recipes-bsp/embeddedsw/plm-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_plm.elf" do_deploy() { install -Dm 0644 ${B}/${ESW_COMPONENT} ${DEPLOYDIR}/${PLM_BASE_NAME}.elf ln -sf ${PLM_BASE_NAME}.elf ${DEPLOYDIR}/${PLM_IMAGE_NAME}.elf - install -m 0644 ${B}/${ESW_COMPONENT}.bin ${DEPLOYDIR}/${PLM_BASE_NAME}.bin - ln -sf ${PLM_BASE_NAME}.bin ${DEPLOYDIR}/${PLM_IMAGE_NAME}.bin } addtask deploy before do_build after do_install diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/plm-firmware_generic.inc b/meta-xilinx-standalone/recipes-bsp/embeddedsw/plm-firmware_generic.inc index 0a00984f..fd64b603 100644 --- a/meta-xilinx-standalone/recipes-bsp/embeddedsw/plm-firmware_generic.inc +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/plm-firmware_generic.inc @@ -43,7 +43,6 @@ do_compile() { # 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 +56,6 @@ ESW_COMPONENT = "plm.elf" do_deploy() { install -Dm 0644 ${B}/${ESW_COMPONENT} ${DEPLOYDIR}/${PLM_BASE_NAME}.elf ln -sf ${PLM_BASE_NAME}.elf ${DEPLOYDIR}/${PLM_IMAGE_NAME}.elf - install -m 0644 ${B}/${ESW_COMPONENT}.bin ${DEPLOYDIR}/${PLM_BASE_NAME}.bin - ln -sf ${PLM_BASE_NAME}.bin ${DEPLOYDIR}/${PLM_IMAGE_NAME}.bin } addtask deploy before do_build after do_install diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/plmfw-meta-xilinx-standalone.inc b/meta-xilinx-standalone/recipes-bsp/embeddedsw/plmfw-meta-xilinx-standalone.inc index 49c897e1..12bb93e3 100644 --- a/meta-xilinx-standalone/recipes-bsp/embeddedsw/plmfw-meta-xilinx-standalone.inc +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/plmfw-meta-xilinx-standalone.inc @@ -9,18 +9,12 @@ def check_plm_vars(d): d.setVar('BB_DONT_CACHE', '1') msg = "" - fail = False if not os.path.exists(d.getVar('PLM_FILE') + ".elf"): msg = msg + "The expected file %s.elf is not available. " % d.getVar('PLM_FILE') - fail = True - if not os.path.exists(d.getVar('PLM_FILE') + ".bin"): - msg = msg + "The expected file %s.bin is not available. " % d.getVar('PLM_FILE') - fail = True - if fail: 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.setVar('SRC_URI', 'file://${PLM_FILE}.elf') d.setVarFlag('do_install', 'file-checksums', '${PLM_FILE}.elf:True') - d.setVarFlag('do_deploy', 'file-checksums', '${PLM_FILE}.elf:True ${PLM_FILE}.bin:True') + d.setVarFlag('do_deploy', 'file-checksums', '${PLM_FILE}.elf:True') -- cgit v1.2.3-54-g00ecf