diff options
Diffstat (limited to 'meta-xilinx-standalone')
7 files changed, 64 insertions, 19 deletions
diff --git a/meta-xilinx-standalone/conf/multiconfig/versal-fw.conf b/meta-xilinx-standalone/conf/multiconfig/versal-fw.conf new file mode 100644 index 00000000..329d7e08 --- /dev/null +++ b/meta-xilinx-standalone/conf/multiconfig/versal-fw.conf @@ -0,0 +1,9 @@ +# To be used with a zynqmp machine +# Re-use the main machine, which SHOULD allow us to override the default tune! +DEFAULTTUNE = "microblaze" +TUNE_FEATURES_tune-microblaze = "microblaze v10.0 barrel-shift pattern-compare" +#LINKER_HASH_STYLE_microblaze = "" + +DISTRO = "xilinx-standalone" + +TMPDIR = "${TOPDIR}/tmp-microblaze-versal-fw" diff --git a/meta-xilinx-standalone/conf/multiconfig/zynqmp-pmufw.conf b/meta-xilinx-standalone/conf/multiconfig/zynqmp-pmufw.conf new file mode 100644 index 00000000..e678e7c2 --- /dev/null +++ b/meta-xilinx-standalone/conf/multiconfig/zynqmp-pmufw.conf @@ -0,0 +1,9 @@ +# To be used with a zynqmp machine +# Re-use the main machine, which SHOULD allow us to override the default tune! +DEFAULTTUNE = "microblaze" +TUNE_FEATURES_tune-microblaze = "microblaze v9.2 barrel-shift pattern-compare" +#LINKER_HASH_STYLE_microblaze = "" + +DISTRO = "xilinx-standalone" + +TMPDIR = "${TOPDIR}/tmp-microblaze-zynqmp-pmufw" diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/plm-firmware.inc b/meta-xilinx-standalone/recipes-bsp/embeddedsw/plm-firmware.inc index 57e577ea..e4feba31 100644 --- a/meta-xilinx-standalone/recipes-bsp/embeddedsw/plm-firmware.inc +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/plm-firmware.inc @@ -1,8 +1,6 @@ DESCRIPTION = "Platform Loader and Manager" SUMMARY = "Platform Loader and Manager for Versal devices" -PROVIDES = "virtual/plm" - inherit xlnx-embeddedsw deploy COMPATIBLE_HOST = "microblaze.*-elf" @@ -50,20 +48,28 @@ do_compile() { 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 +} + do_install() { : } -PLM_BASE_NAME ?= "${BPN}-${PKGE}-${PKGV}-${PKGR}-${MACHINE}-${DATETIME}" +PACKAGES = "" + +# This is the default in most BSPs. A MACHINE.conf can override this! +PLM_IMAGE_NAME ??= "plm-versal-mb" + +PLM_BASE_NAME ?= "${PLM_IMAGE_NAME}-${PKGE}-${PKGV}-${PKGR}-${MACHINE}-${DATETIME}" PLM_BASE_NAME[vardepsexclude] = "DATETIME" do_deploy() { install -Dm 0644 ${B}/plm.elf ${DEPLOYDIR}/${PLM_BASE_NAME}.elf - ln -sf ${PLM_BASE_NAME}.elf ${DEPLOYDIR}/${BPN}-${MACHINE}.elf - ${OBJCOPY} -O binary ${B}/plm.elf ${B}/plm.bin + ln -sf ${PLM_BASE_NAME}.elf ${DEPLOYDIR}/${PLM_IMAGE_NAME}.elf install -m 0644 ${B}/plm.bin ${DEPLOYDIR}/${PLM_BASE_NAME}.bin - ln -sf ${PLM_BASE_NAME}.bin ${DEPLOYDIR}/${BPN}-${MACHINE}.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/pmu-firmware.inc b/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware.inc index 01d05a9b..e8674b12 100644 --- a/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware.inc +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware.inc @@ -1,7 +1,5 @@ DESCRIPTION = "PMU Firmware" -PROVIDES = "virtual/pmu-firmware" - inherit xlnx-embeddedsw deploy COMPATIBLE_HOST = "microblaze.*-elf" @@ -20,6 +18,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" @@ -47,21 +51,27 @@ 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}/executable.elf ${B}/executable.bin } do_install() { : } -PMU_FIRMWARE_BASE_NAME ?= "${BPN}-${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}" +PACKAGES = "" + +# This is the default in most BSPs. A MACHINE.conf can override this! +PMU_FIRMWARE_IMAGE_NAME ??= "pmu-firmware-zynqmp-pmu" + +PMU_FIRMWARE_BASE_NAME ?= "${PMU_FIRMWARE_IMAGE_NAME}-${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}" PMU_FIRMWARE_BASE_NAME[vardepsexclude] = "DATETIME" do_deploy() { install -Dm 0644 ${B}/executable.elf ${DEPLOYDIR}/${PMU_FIRMWARE_BASE_NAME}.elf - ln -sf ${PMU_FIRMWARE_BASE_NAME}.elf ${DEPLOYDIR}/${BPN}-${MACHINE}.elf - ${OBJCOPY} -O binary ${B}/executable.elf ${B}/executable.bin + ln -sf ${PMU_FIRMWARE_BASE_NAME}.elf ${DEPLOYDIR}/${PMU_FIRMWARE_IMAGE_NAME}.elf install -m 0644 ${B}/executable.bin ${DEPLOYDIR}/${PMU_FIRMWARE_BASE_NAME}.bin - ln -sf ${PMU_FIRMWARE_BASE_NAME}.bin ${DEPLOYDIR}/${BPN}-${MACHINE}.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_2020.2.bb b/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware_2020.2.bb index 93c8bafc..047f97d9 100644 --- a/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware_2020.2.bb +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware_2020.2.bb @@ -45,4 +45,6 @@ do_compile() { # Again, recipe-systoot include is necessary echo Construct: executable oe_runmake executable.elf CC_FLAGS="-MMD -MP -Wl,--build-id=none -I${STAGING_DIR_TARGET}/usr/include" + + ${MB_OBJCOPY} -O binary ${B}/executable.elf ${B}/executable.bin } diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware_git.bb b/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware_git.bb index 2fc69cbe..cdf569c3 100644 --- a/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware_git.bb +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware_git.bb @@ -48,4 +48,6 @@ do_compile() { # Again, recipe-systoot include is necessary echo Construct: executable oe_runmake executable.elf CC_FLAGS="-MMD -MP -Wl,--build-id=none -I${STAGING_DIR_TARGET}/usr/include" + + ${MB_OBJCOPY} -O binary ${B}/executable.elf ${B}/executable.bin } diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/psm-firmware.inc b/meta-xilinx-standalone/recipes-bsp/embeddedsw/psm-firmware.inc index 05b9a9b5..11e8981b 100644 --- a/meta-xilinx-standalone/recipes-bsp/embeddedsw/psm-firmware.inc +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/psm-firmware.inc @@ -1,8 +1,6 @@ ESCRIPTION = "PSM Firmware" SUMMARY = "PSM firmware for versal devices" -PROVIDES = "virtual/psm-firmware" - inherit xlnx-embeddedsw deploy COMPATIBLE_HOST = "microblaze.*-elf" @@ -50,19 +48,28 @@ do_compile() { 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 +} + do_install() { : } -PSM_FIRMWARE_BASE_NAME ?= "${BPN}-${PKGE}-${PKGV}-${PKGR}-${MACHINE}-${DATETIME}" +PACKAGES = "" + +# This is the default in most BSPs. A MACHINE.conf can override this! +PSM_FIRMWARE_IMAGE_NAME ??= "psm-firmware-versal-mb" + +PSM_FIRMWARE_BASE_NAME ?= "${PSM_FIRMWARE_IMAGE_NAME}-${PKGE}-${PKGV}-${PKGR}-${MACHINE}-${DATETIME}" PSM_FIRMWARE_BASE_NAME[vardepsexclude] = "DATETIME" do_deploy() { install -Dm 0644 ${B}/psmfw.elf ${DEPLOYDIR}/${PSM_FIRMWARE_BASE_NAME}.elf - ln -sf ${PSM_FIRMWARE_BASE_NAME}.elf ${DEPLOYDIR}/${BPN}-${MACHINE}.elf - ${OBJCOPY} -O binary ${B}/psmfw.elf ${B}/psmfw.bin + ln -sf ${PSM_FIRMWARE_BASE_NAME}.elf ${DEPLOYDIR}/${PSM_FIRMWARE_IMAGE_NAME}.elf install -m 0644 ${B}/psmfw.bin ${DEPLOYDIR}/${PSM_FIRMWARE_BASE_NAME}.bin - ln -sf ${PSM_FIRMWARE_BASE_NAME}.bin ${DEPLOYDIR}/${BPN}-${MACHINE}.bin + ln -sf ${PSM_FIRMWARE_BASE_NAME}.bin ${DEPLOYDIR}/${PSM_FIRMWARE_IMAGE_NAME}.bin } addtask deploy before do_build after do_install |