diff options
5 files changed, 19 insertions, 9 deletions
diff --git a/meta-xilinx-bsp/recipes-bsp/embeddedsw/plmfw.bb b/meta-xilinx-bsp/recipes-bsp/embeddedsw/plmfw.bb index 33c50953..b4135a83 100644 --- a/meta-xilinx-bsp/recipes-bsp/embeddedsw/plmfw.bb +++ b/meta-xilinx-bsp/recipes-bsp/embeddedsw/plmfw.bb @@ -24,7 +24,7 @@ PLM_IMAGE_NAME ??= "plm-versal-mb" PLM_DEPLOY_DIR ??= "${TOPDIR}/tmp-microblaze-versal-fw/deploy/images/${MACHINE}" # Default is for the multilib case (without the extension .elf/.bin) -PLM_FILE ??= "${PLM_DEPLOY_DIR/${PLM_IMAGE_NAME}" +PLM_FILE ??= "${PLM_DEPLOY_DIR}/${PLM_IMAGE_NAME}" do_fetch[depends] += "${PLM_DEPENDS}" do_fetch[mcdepends] += "${PLM_MCDEPENDS}" diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/plm-firmware.inc b/meta-xilinx-standalone/recipes-bsp/embeddedsw/plm-firmware.inc index e4feba31..bedb0685 100644 --- a/meta-xilinx-standalone/recipes-bsp/embeddedsw/plm-firmware.inc +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/plm-firmware.inc @@ -19,6 +19,12 @@ do_configure() { ${B}/../misc/copy_bsp.sh } +# All do_compiles need this, even if it's overriden +MB_OBJCOPY ??= "${OBJCOPY}" + +# Only add a dependency if we need to use OUR binutils +DEPENDS .= "${@' virtual/${TARGET_PREFIX}binutils' if d.getVar('MB_OBJCOPY') == d.getVar('OBJCOPY') else ''}" + COMPILER = "${CC}" COMPILER_FLAGS = "-O2 -c" EXTRA_COMPILER_FLAGS = "-g -Wall -Wextra -Os -flto -ffat-lto-objects" @@ -46,11 +52,8 @@ 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" -} -# All do_compiles need this, even if the base is overriden -do_compile_append() { - ${OBJCOPY} -O binary ${B}/plm.elf ${B}/plm.bin + ${MB_OBJCOPY} -O binary ${B}/plm.elf ${B}/plm.bin } do_install() { diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/plm-firmware_2020.2.bb b/meta-xilinx-standalone/recipes-bsp/embeddedsw/plm-firmware_2020.2.bb index a1b4aa00..a1d1c504 100644 --- a/meta-xilinx-standalone/recipes-bsp/embeddedsw/plm-firmware_2020.2.bb +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/plm-firmware_2020.2.bb @@ -53,4 +53,6 @@ do_compile() { # Again, recipe-systoot include is necessary echo Construct: executable oe_runmake plm.elf ${@bsp_make_vars(d)} CC_FLAGS="-MMD -MP -Wl,--build-id=none -I${STAGING_DIR_TARGET}/usr/include" + + ${MB_OBJCOPY} -O binary ${B}/plm.elf ${B}/plm.bin } diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/psm-firmware.inc b/meta-xilinx-standalone/recipes-bsp/embeddedsw/psm-firmware.inc index 11e8981b..da76fedf 100644 --- a/meta-xilinx-standalone/recipes-bsp/embeddedsw/psm-firmware.inc +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/psm-firmware.inc @@ -19,6 +19,12 @@ do_configure() { ${B}/../misc/copy_bsp.sh } +# All do_compiles need this, even if it's overriden +MB_OBJCOPY ??= "${OBJCOPY}" + +# Only add a dependency if we need to use OUR binutils +DEPENDS .= "${@' virtual/${TARGET_PREFIX}binutils' if d.getVar('MB_OBJCOPY') == d.getVar('OBJCOPY') else ''}" + COMPILER = "${CC}" COMPILER_FLAGS = "-O2 -c" EXTRA_COMPILER_FLAGS = "-g -Wall -Wextra -Os -flto -ffat-lto-objects" @@ -46,11 +52,8 @@ 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" -} -# All do compiles need this, even if the base is overriden -do_compile_append() { - ${OBJCOPY} -O binary ${B}/psmfw.elf ${B}/psmfw.bin + ${MB_OBJCOPY} -O binary ${B}/psmfw.elf ${B}/psmfw.bin } do_install() { diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/psm-firmware_2020.2.bb b/meta-xilinx-standalone/recipes-bsp/embeddedsw/psm-firmware_2020.2.bb index 9603e53f..2506ba7b 100644 --- a/meta-xilinx-standalone/recipes-bsp/embeddedsw/psm-firmware_2020.2.bb +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/psm-firmware_2020.2.bb @@ -53,4 +53,6 @@ do_compile() { # Again, recipe-systoot include is necessary echo Construct: executable oe_runmake psmfw.elf ${@bsp_make_vars(d)} CC_FLAGS="-MMD -MP -Wl,--build-id=none -I${STAGING_DIR_TARGET}/usr/include" + + ${MB_OBJCOPY} -O binary ${B}/psmfw.elf ${B}/psmfw.bin } |