summaryrefslogtreecommitdiffstats
path: root/meta-xilinx-standalone/recipes-bsp
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@xilinx.com>2021-03-09 19:32:45 -0800
committerSai Hari Chandana Kalluri <chandana.kalluri@xilinx.com>2021-07-14 14:49:19 -0700
commit453ba3b622e0dce7834209b453c01412028799fa (patch)
tree39414dc5b55c42739b48608a83fc4959467d20fe /meta-xilinx-standalone/recipes-bsp
parent7a5a5b46899fc3630749ee32d48f29b49c6ae322 (diff)
downloadmeta-xilinx-453ba3b622e0dce7834209b453c01412028799fa.tar.gz
embeddedsw: Rework plm/pmu/psm firmware and Linux packaging
In order to allow standalone (meta-xilinx-standalone), XSCT (meta-xilinx-tools), and future items to work in the same way the recipes have been restructured. A *-firmware recipe will generate the firmware and stage it to do_deploy. A *fw recipe will take the deployed version and package it for the Linux side of things. This allows the firmware generation to be easily extended without requiring packaging knowledge. Similarly packaging can be extended for alternative boot/upgrade mechanisms as required. In all cases, the MACHINE configuration will specify the default way the components are to be built, along with the names of the item in the deploy directory. The PLM/PSM/PMU_IMAGE_NAME is the name for the generated firmware. PLM/PSM/PMU_DEPLOY_DIR is the path to the constructed firmware. This along with the IMAGE_NAME above can be used to specify the location of an externally generated set of firmware. Addtionally the dependencies for building the plmfw/psmfw/pmufw can be changed easily using PLM/PSM/PMU_DEPENDS and PLM/PSM/PMU_MCDEPENDS. The former specifies dependencies in the same multiconfig, while the later allows the component to require another multiconfig to have finihed. The system has a referenced default, if multiconfig is enabled it will automatically use it, otherwise it will try to use the recipe in the main configuration. (This will fail unless meta-xilinx-tools is available.) Also two multiconfigs hve been implemented: versal-fw and zynqmp-pmufw They can be enabled using BBMULITCONFIG += "zynqmp-pmufw" or versal-fw. Signed-off-by: Mark Hatle <mark.hatle@xilinx.com>
Diffstat (limited to 'meta-xilinx-standalone/recipes-bsp')
-rw-r--r--meta-xilinx-standalone/recipes-bsp/embeddedsw/plm-firmware.inc20
-rw-r--r--meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware.inc22
-rw-r--r--meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware_2020.2.bb2
-rw-r--r--meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware_git.bb2
-rw-r--r--meta-xilinx-standalone/recipes-bsp/embeddedsw/psm-firmware.inc19
5 files changed, 46 insertions, 19 deletions
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 @@
1DESCRIPTION = "Platform Loader and Manager" 1DESCRIPTION = "Platform Loader and Manager"
2SUMMARY = "Platform Loader and Manager for Versal devices" 2SUMMARY = "Platform Loader and Manager for Versal devices"
3 3
4PROVIDES = "virtual/plm"
5
6inherit xlnx-embeddedsw deploy 4inherit xlnx-embeddedsw deploy
7 5
8COMPATIBLE_HOST = "microblaze.*-elf" 6COMPATIBLE_HOST = "microblaze.*-elf"
@@ -50,20 +48,28 @@ do_compile() {
50 oe_runmake CC_FLAGS="-MMD -MP -Wl,--build-id=none -I${STAGING_DIR_TARGET}/usr/include" 48 oe_runmake CC_FLAGS="-MMD -MP -Wl,--build-id=none -I${STAGING_DIR_TARGET}/usr/include"
51} 49}
52 50
51# All do_compiles need this, even if the base is overriden
52do_compile_append() {
53 ${OBJCOPY} -O binary ${B}/plm.elf ${B}/plm.bin
54}
55
53do_install() { 56do_install() {
54 : 57 :
55} 58}
56 59
57PLM_BASE_NAME ?= "${BPN}-${PKGE}-${PKGV}-${PKGR}-${MACHINE}-${DATETIME}" 60PACKAGES = ""
61
62# This is the default in most BSPs. A MACHINE.conf can override this!
63PLM_IMAGE_NAME ??= "plm-versal-mb"
64
65PLM_BASE_NAME ?= "${PLM_IMAGE_NAME}-${PKGE}-${PKGV}-${PKGR}-${MACHINE}-${DATETIME}"
58PLM_BASE_NAME[vardepsexclude] = "DATETIME" 66PLM_BASE_NAME[vardepsexclude] = "DATETIME"
59 67
60do_deploy() { 68do_deploy() {
61 install -Dm 0644 ${B}/plm.elf ${DEPLOYDIR}/${PLM_BASE_NAME}.elf 69 install -Dm 0644 ${B}/plm.elf ${DEPLOYDIR}/${PLM_BASE_NAME}.elf
62 ln -sf ${PLM_BASE_NAME}.elf ${DEPLOYDIR}/${BPN}-${MACHINE}.elf 70 ln -sf ${PLM_BASE_NAME}.elf ${DEPLOYDIR}/${PLM_IMAGE_NAME}.elf
63 ${OBJCOPY} -O binary ${B}/plm.elf ${B}/plm.bin
64 install -m 0644 ${B}/plm.bin ${DEPLOYDIR}/${PLM_BASE_NAME}.bin 71 install -m 0644 ${B}/plm.bin ${DEPLOYDIR}/${PLM_BASE_NAME}.bin
65 ln -sf ${PLM_BASE_NAME}.bin ${DEPLOYDIR}/${BPN}-${MACHINE}.bin 72 ln -sf ${PLM_BASE_NAME}.bin ${DEPLOYDIR}/${PLM_IMAGE_NAME}.bin
66} 73}
67 74
68addtask deploy before do_build after do_install 75addtask deploy before do_build after do_install
69
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 @@
1DESCRIPTION = "PMU Firmware" 1DESCRIPTION = "PMU Firmware"
2 2
3PROVIDES = "virtual/pmu-firmware"
4
5inherit xlnx-embeddedsw deploy 3inherit xlnx-embeddedsw deploy
6 4
7COMPATIBLE_HOST = "microblaze.*-elf" 5COMPATIBLE_HOST = "microblaze.*-elf"
@@ -20,6 +18,12 @@ do_configure() {
20 ${B}/../misc/copy_bsp.sh 18 ${B}/../misc/copy_bsp.sh
21} 19}
22 20
21# All do_compiles need this, even if it's overriden
22MB_OBJCOPY ??= "${OBJCOPY}"
23
24# Only add a dependency if we need to use OUR binutils
25DEPENDS .= "${@' virtual/${TARGET_PREFIX}binutils' if d.getVar('MB_OBJCOPY') == d.getVar('OBJCOPY') else ''}"
26
23COMPILER = "${CC}" 27COMPILER = "${CC}"
24COMPILER_FLAGS = "-O2 -c" 28COMPILER_FLAGS = "-O2 -c"
25EXTRA_COMPILER_FLAGS = "-g -Wall -Wextra -Os -flto -ffat-lto-objects" 29EXTRA_COMPILER_FLAGS = "-g -Wall -Wextra -Os -flto -ffat-lto-objects"
@@ -47,21 +51,27 @@ do_compile() {
47 # --build-id=none is required due to linker script not defining a location for it. 51 # --build-id=none is required due to linker script not defining a location for it.
48 # Again, recipe-systoot include is necessary 52 # Again, recipe-systoot include is necessary
49 oe_runmake CC_FLAGS="-MMD -MP -Wl,--build-id=none -I${STAGING_DIR_TARGET}/usr/include" 53 oe_runmake CC_FLAGS="-MMD -MP -Wl,--build-id=none -I${STAGING_DIR_TARGET}/usr/include"
54
55 ${MB_OBJCOPY} -O binary ${B}/executable.elf ${B}/executable.bin
50} 56}
51 57
52do_install() { 58do_install() {
53 : 59 :
54} 60}
55 61
56PMU_FIRMWARE_BASE_NAME ?= "${BPN}-${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}" 62PACKAGES = ""
63
64# This is the default in most BSPs. A MACHINE.conf can override this!
65PMU_FIRMWARE_IMAGE_NAME ??= "pmu-firmware-zynqmp-pmu"
66
67PMU_FIRMWARE_BASE_NAME ?= "${PMU_FIRMWARE_IMAGE_NAME}-${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
57PMU_FIRMWARE_BASE_NAME[vardepsexclude] = "DATETIME" 68PMU_FIRMWARE_BASE_NAME[vardepsexclude] = "DATETIME"
58 69
59do_deploy() { 70do_deploy() {
60 install -Dm 0644 ${B}/executable.elf ${DEPLOYDIR}/${PMU_FIRMWARE_BASE_NAME}.elf 71 install -Dm 0644 ${B}/executable.elf ${DEPLOYDIR}/${PMU_FIRMWARE_BASE_NAME}.elf
61 ln -sf ${PMU_FIRMWARE_BASE_NAME}.elf ${DEPLOYDIR}/${BPN}-${MACHINE}.elf 72 ln -sf ${PMU_FIRMWARE_BASE_NAME}.elf ${DEPLOYDIR}/${PMU_FIRMWARE_IMAGE_NAME}.elf
62 ${OBJCOPY} -O binary ${B}/executable.elf ${B}/executable.bin
63 install -m 0644 ${B}/executable.bin ${DEPLOYDIR}/${PMU_FIRMWARE_BASE_NAME}.bin 73 install -m 0644 ${B}/executable.bin ${DEPLOYDIR}/${PMU_FIRMWARE_BASE_NAME}.bin
64 ln -sf ${PMU_FIRMWARE_BASE_NAME}.bin ${DEPLOYDIR}/${BPN}-${MACHINE}.bin 74 ln -sf ${PMU_FIRMWARE_BASE_NAME}.bin ${DEPLOYDIR}/${PMU_FIRMWARE_IMAGE_NAME}.bin
65} 75}
66 76
67addtask deploy before do_build after do_install 77addtask 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() {
45 # Again, recipe-systoot include is necessary 45 # Again, recipe-systoot include is necessary
46 echo Construct: executable 46 echo Construct: executable
47 oe_runmake executable.elf CC_FLAGS="-MMD -MP -Wl,--build-id=none -I${STAGING_DIR_TARGET}/usr/include" 47 oe_runmake executable.elf CC_FLAGS="-MMD -MP -Wl,--build-id=none -I${STAGING_DIR_TARGET}/usr/include"
48
49 ${MB_OBJCOPY} -O binary ${B}/executable.elf ${B}/executable.bin
48} 50}
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() {
48 # Again, recipe-systoot include is necessary 48 # Again, recipe-systoot include is necessary
49 echo Construct: executable 49 echo Construct: executable
50 oe_runmake executable.elf CC_FLAGS="-MMD -MP -Wl,--build-id=none -I${STAGING_DIR_TARGET}/usr/include" 50 oe_runmake executable.elf CC_FLAGS="-MMD -MP -Wl,--build-id=none -I${STAGING_DIR_TARGET}/usr/include"
51
52 ${MB_OBJCOPY} -O binary ${B}/executable.elf ${B}/executable.bin
51} 53}
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 @@
1ESCRIPTION = "PSM Firmware" 1ESCRIPTION = "PSM Firmware"
2SUMMARY = "PSM firmware for versal devices" 2SUMMARY = "PSM firmware for versal devices"
3 3
4PROVIDES = "virtual/psm-firmware"
5
6inherit xlnx-embeddedsw deploy 4inherit xlnx-embeddedsw deploy
7 5
8COMPATIBLE_HOST = "microblaze.*-elf" 6COMPATIBLE_HOST = "microblaze.*-elf"
@@ -50,19 +48,28 @@ do_compile() {
50 oe_runmake CC_FLAGS="-MMD -MP -Wl,--build-id=none -I${STAGING_DIR_TARGET}/usr/include" 48 oe_runmake CC_FLAGS="-MMD -MP -Wl,--build-id=none -I${STAGING_DIR_TARGET}/usr/include"
51} 49}
52 50
51# All do compiles need this, even if the base is overriden
52do_compile_append() {
53 ${OBJCOPY} -O binary ${B}/psmfw.elf ${B}/psmfw.bin
54}
55
53do_install() { 56do_install() {
54 : 57 :
55} 58}
56 59
57PSM_FIRMWARE_BASE_NAME ?= "${BPN}-${PKGE}-${PKGV}-${PKGR}-${MACHINE}-${DATETIME}" 60PACKAGES = ""
61
62# This is the default in most BSPs. A MACHINE.conf can override this!
63PSM_FIRMWARE_IMAGE_NAME ??= "psm-firmware-versal-mb"
64
65PSM_FIRMWARE_BASE_NAME ?= "${PSM_FIRMWARE_IMAGE_NAME}-${PKGE}-${PKGV}-${PKGR}-${MACHINE}-${DATETIME}"
58PSM_FIRMWARE_BASE_NAME[vardepsexclude] = "DATETIME" 66PSM_FIRMWARE_BASE_NAME[vardepsexclude] = "DATETIME"
59 67
60do_deploy() { 68do_deploy() {
61 install -Dm 0644 ${B}/psmfw.elf ${DEPLOYDIR}/${PSM_FIRMWARE_BASE_NAME}.elf 69 install -Dm 0644 ${B}/psmfw.elf ${DEPLOYDIR}/${PSM_FIRMWARE_BASE_NAME}.elf
62 ln -sf ${PSM_FIRMWARE_BASE_NAME}.elf ${DEPLOYDIR}/${BPN}-${MACHINE}.elf 70 ln -sf ${PSM_FIRMWARE_BASE_NAME}.elf ${DEPLOYDIR}/${PSM_FIRMWARE_IMAGE_NAME}.elf
63 ${OBJCOPY} -O binary ${B}/psmfw.elf ${B}/psmfw.bin
64 install -m 0644 ${B}/psmfw.bin ${DEPLOYDIR}/${PSM_FIRMWARE_BASE_NAME}.bin 71 install -m 0644 ${B}/psmfw.bin ${DEPLOYDIR}/${PSM_FIRMWARE_BASE_NAME}.bin
65 ln -sf ${PSM_FIRMWARE_BASE_NAME}.bin ${DEPLOYDIR}/${BPN}-${MACHINE}.bin 72 ln -sf ${PSM_FIRMWARE_BASE_NAME}.bin ${DEPLOYDIR}/${PSM_FIRMWARE_IMAGE_NAME}.bin
66} 73}
67 74
68addtask deploy before do_build after do_install 75addtask deploy before do_build after do_install