diff options
| author | Mark Hatle <mark.hatle@xilinx.com> | 2021-03-09 19:32:45 -0800 |
|---|---|---|
| committer | Sai Hari Chandana Kalluri <chandana.kalluri@xilinx.com> | 2021-07-14 14:49:19 -0700 |
| commit | 453ba3b622e0dce7834209b453c01412028799fa (patch) | |
| tree | 39414dc5b55c42739b48608a83fc4959467d20fe /meta-xilinx-bsp | |
| parent | 7a5a5b46899fc3630749ee32d48f29b49c6ae322 (diff) | |
| download | meta-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-bsp')
19 files changed, 215 insertions, 52 deletions
diff --git a/meta-xilinx-bsp/conf/machine/include/soc-versal.inc b/meta-xilinx-bsp/conf/machine/include/soc-versal.inc index a9a94848..abf5f08e 100644 --- a/meta-xilinx-bsp/conf/machine/include/soc-versal.inc +++ b/meta-xilinx-bsp/conf/machine/include/soc-versal.inc | |||
| @@ -17,3 +17,15 @@ KERNEL_IMAGETYPE ?= "Image" | |||
| 17 | WIC_DEPENDS ?= "virtual/kernel virtual/bootloader virtual/boot-bin virtual/arm-trusted-firmware" | 17 | WIC_DEPENDS ?= "virtual/kernel virtual/bootloader virtual/boot-bin virtual/arm-trusted-firmware" |
| 18 | 18 | ||
| 19 | UBOOT_ELF ?= "u-boot.elf" | 19 | UBOOT_ELF ?= "u-boot.elf" |
| 20 | |||
| 21 | # Default, if multiconfig is off, call plm/psm-firmware directly, otherwise call the versal-fw multiconfig version | ||
| 22 | # The Linux compatible plm/psm-firmware though requires meta-xilinx-tools | ||
| 23 | PLM_DEPENDS ?= "${@bb.utils.contains('BBMULTICONFIG', 'versal-fw', '', 'plm-firmware:do_deploy', d)}" | ||
| 24 | PLM_MCDEPENDS ?= "${@bb.utils.contains('BBMULTICONFIG', 'versal-fw', 'mc::versal-fw:plm-firmware:do_deploy', '', d)}" | ||
| 25 | PLM_DEPLOY_DIR ?= "${@bb.utils.contains('BBMULTICONFIG', 'versal-fw', '${TOPDIR}/tmp-microblaze-versal-fw/deploy/images/${MACHINE}', '${DEPLOY_DIR_IMAGE}', d)}" | ||
| 26 | PLM_IMAGE_NAME ?= "${@bb.utils.contains('BBMULTICONFIG', 'versal-fw', 'plm-versal-mb', 'plm-${MACHINE}', d)}" | ||
| 27 | |||
| 28 | PSM_DEPENDS ?= "${@bb.utils.contains('BBMULTICONFIG', 'versal-fw', '', 'psm-firmware:do_deploy', d)}" | ||
| 29 | PSM_MCDEPENDS ?= "${@bb.utils.contains('BBMULTICONFIG', 'versal-fw', 'mc::versal-fw:psm-firmware:do_deploy', '', d)}" | ||
| 30 | PSM_FIRMWARE_DEPLOY_DIR ?= "${@bb.utils.contains('BBMULTICONFIG', 'versal-fw', '${TOPDIR}/tmp-microblaze-versal-fw/deploy/images/${MACHINE}', '${DEPLOY_DIR_IMAGE}', d)}" | ||
| 31 | PSM_FIRMWARE_IMAGE_NAME ?= "${@bb.utils.contains('BBMULTICONFIG', 'versal-fw', 'psm-firmware-versal-mb', 'psm-${MACHINE}', d)}" | ||
diff --git a/meta-xilinx-bsp/conf/machine/include/soc-zynqmp.inc b/meta-xilinx-bsp/conf/machine/include/soc-zynqmp.inc index fb45b73f..9849efd2 100644 --- a/meta-xilinx-bsp/conf/machine/include/soc-zynqmp.inc +++ b/meta-xilinx-bsp/conf/machine/include/soc-zynqmp.inc | |||
| @@ -26,3 +26,14 @@ WIC_DEPENDS ?= "virtual/kernel virtual/bootloader virtual/boot-bin virtual/arm-t | |||
| 26 | UBOOT_SUFFIX ?= "bin" | 26 | UBOOT_SUFFIX ?= "bin" |
| 27 | 27 | ||
| 28 | XSERVER_EXT_zynqmp ?= "xf86-video-armsoc" | 28 | XSERVER_EXT_zynqmp ?= "xf86-video-armsoc" |
| 29 | |||
| 30 | # Default PMU ROM | ||
| 31 | PMU_ROM ?= "${DEPLOY_DIR_IMAGE}/pmu-rom.elf" | ||
| 32 | |||
| 33 | # Default, if multiconfig is off, call pmu-firmware directly, otherwise call the zynqmp-pmufw multiconfig version | ||
| 34 | # The Linux compatible pmu-firmware though requires meta-xilinx-tools | ||
| 35 | PMU_DEPENDS ?= "${@bb.utils.contains('BBMULTICONFIG', 'zynqmp-pmufw', '', 'pmu-firmware:do_deploy', d)}" | ||
| 36 | PMU_MCDEPENDS ?= "${@bb.utils.contains('BBMULTICONFIG', 'zynqmp-pmufw', 'mc::zynqmp-pmufw:pmu-firmware:do_deploy', '', d)}" | ||
| 37 | PMU_FIRMWARE_DEPLOY_DIR ?= "${@bb.utils.contains('BBMULTICONFIG', 'zynqmp-pmufw', '${TOPDIR}/tmp-microblaze-zynqmp-pmufw/deploy/images/${MACHINE}', '${DEPLOY_DIR_IMAGE}', d)}" | ||
| 38 | PMU_FIRMWARE_IMAGE_NAME ?= "${@bb.utils.contains('BBMULTICONFIG', 'zynqmp-pmufw', 'pmu-firmware-zynqmp-pmu', 'pmu-${MACHINE}', d)}" | ||
| 39 | |||
diff --git a/meta-xilinx-bsp/conf/machine/ultra96-zynqmp.conf b/meta-xilinx-bsp/conf/machine/ultra96-zynqmp.conf index f31c10cf..ad65087c 100644 --- a/meta-xilinx-bsp/conf/machine/ultra96-zynqmp.conf +++ b/meta-xilinx-bsp/conf/machine/ultra96-zynqmp.conf | |||
| @@ -19,9 +19,6 @@ SERIAL_CONSOLES ?= "115200;ttyPS0" | |||
| 19 | 19 | ||
| 20 | KERNEL_DEVICETREE = "xilinx/zynqmp-zcu100-revC.dtb" | 20 | KERNEL_DEVICETREE = "xilinx/zynqmp-zcu100-revC.dtb" |
| 21 | 21 | ||
| 22 | PMU_FIRMWARE_IMAGE_NAME ?= "pmu-firmware-zynqmp-pmu" | ||
| 23 | PMU_FIRMWARE_DEPLOY_DIR ?= "${TOPDIR}/pmutmp/deploy/images/zynqmp-pmu" | ||
| 24 | |||
| 25 | EXTRA_IMAGEDEPENDS += " \ | 22 | EXTRA_IMAGEDEPENDS += " \ |
| 26 | u-boot-zynq-uenv \ | 23 | u-boot-zynq-uenv \ |
| 27 | arm-trusted-firmware \ | 24 | arm-trusted-firmware \ |
diff --git a/meta-xilinx-bsp/conf/machine/vck-sc-zynqmp.conf b/meta-xilinx-bsp/conf/machine/vck-sc-zynqmp.conf index 6a453a2c..6e4f2872 100644 --- a/meta-xilinx-bsp/conf/machine/vck-sc-zynqmp.conf +++ b/meta-xilinx-bsp/conf/machine/vck-sc-zynqmp.conf | |||
| @@ -13,10 +13,6 @@ SPL_BINARY ?= "spl/boot.bin" | |||
| 13 | 13 | ||
| 14 | SERIAL_CONSOLES ?= "115200;ttyPS0" | 14 | SERIAL_CONSOLES ?= "115200;ttyPS0" |
| 15 | 15 | ||
| 16 | # PMU instance args | ||
| 17 | PMU_FIRMWARE_DEPLOY_DIR ?= "${TOPDIR}/pmutmp/deploy/images/zynqmp-pmu" | ||
| 18 | PMU_FIRMWARE_IMAGE_NAME ?= "pmu-firmware-zynqmp-pmu" | ||
| 19 | |||
| 20 | EXTRA_IMAGEDEPENDS += " \ | 16 | EXTRA_IMAGEDEPENDS += " \ |
| 21 | u-boot-zynq-uenv \ | 17 | u-boot-zynq-uenv \ |
| 22 | arm-trusted-firmware \ | 18 | arm-trusted-firmware \ |
diff --git a/meta-xilinx-bsp/conf/machine/vck190-versal.conf b/meta-xilinx-bsp/conf/machine/vck190-versal.conf index 647a6b5b..28a07eb4 100644 --- a/meta-xilinx-bsp/conf/machine/vck190-versal.conf +++ b/meta-xilinx-bsp/conf/machine/vck190-versal.conf | |||
| @@ -36,11 +36,6 @@ IMAGE_BOOT_FILES += " \ | |||
| 36 | Image \ | 36 | Image \ |
| 37 | boot.scr \ | 37 | boot.scr \ |
| 38 | " | 38 | " |
| 39 | PLM_DEPLOY_DIR ?= "{TOPDIR}/versalmbtmp/deploy/images/versal-mb" | ||
| 40 | PLM_IMAGE_NAME ?= "plm-versal-mb" | ||
| 41 | PSM_FIRMWARE_DEPLOY_DIR ?= "{TOPDIR}/versalmbtmp/deploy/images/versal-mb" | ||
| 42 | PSM_FIRMWARE_IMAGE_NAME ?= "psm-firmware-versal-mb" | ||
| 43 | |||
| 44 | 39 | ||
| 45 | # This machine has a QEMU model, runqemu setup: | 40 | # This machine has a QEMU model, runqemu setup: |
| 46 | QB_MEM = "-m 8G" | 41 | QB_MEM = "-m 8G" |
diff --git a/meta-xilinx-bsp/conf/machine/versal-generic.conf b/meta-xilinx-bsp/conf/machine/versal-generic.conf index 57c7166d..de0d909d 100644 --- a/meta-xilinx-bsp/conf/machine/versal-generic.conf +++ b/meta-xilinx-bsp/conf/machine/versal-generic.conf | |||
| @@ -41,10 +41,6 @@ IMAGE_BOOT_FILES += " \ | |||
| 41 | Image \ | 41 | Image \ |
| 42 | boot.scr \ | 42 | boot.scr \ |
| 43 | " | 43 | " |
| 44 | PLM_DEPLOY_DIR ?= "{TOPDIR}/versalmbtmp/deploy/images/versal-mb" | ||
| 45 | PLM_IMAGE_NAME ?= "plm-versal-mb" | ||
| 46 | PSM_FIRMWARE_DEPLOY_DIR ?= "{TOPDIR}/versalmbtmp/deploy/images/versal-mb" | ||
| 47 | PSM_FIRMWARE_IMAGE_NAME ?= "psm-firmware-versal-mb" | ||
| 48 | 44 | ||
| 49 | 45 | ||
| 50 | # This machine has a QEMU model, runqemu setup: | 46 | # This machine has a QEMU model, runqemu setup: |
diff --git a/meta-xilinx-bsp/conf/machine/zc1254-zynqmp.conf b/meta-xilinx-bsp/conf/machine/zc1254-zynqmp.conf index 3bdb215d..0d45a7b3 100644 --- a/meta-xilinx-bsp/conf/machine/zc1254-zynqmp.conf +++ b/meta-xilinx-bsp/conf/machine/zc1254-zynqmp.conf | |||
| @@ -18,9 +18,6 @@ SERIAL_CONSOLES ?= "115200;ttyPS0" | |||
| 18 | 18 | ||
| 19 | KERNEL_DEVICETREE = "xilinx/zynqmp-zc1254-revA.dtb" | 19 | KERNEL_DEVICETREE = "xilinx/zynqmp-zc1254-revA.dtb" |
| 20 | 20 | ||
| 21 | PMU_FIRMWARE_IMAGE_NAME ?= "pmu-firmware-zynqmp-pmu" | ||
| 22 | PMU_FIRMWARE_DEPLOY_DIR ?= "${TOPDIR}/pmutmp/deploy/images/zynqmp-pmu" | ||
| 23 | |||
| 24 | EXTRA_IMAGEDEPENDS += " \ | 21 | EXTRA_IMAGEDEPENDS += " \ |
| 25 | u-boot-zynq-uenv \ | 22 | u-boot-zynq-uenv \ |
| 26 | arm-trusted-firmware \ | 23 | arm-trusted-firmware \ |
diff --git a/meta-xilinx-bsp/conf/machine/zcu102-zynqmp.conf b/meta-xilinx-bsp/conf/machine/zcu102-zynqmp.conf index 2c890cfb..0add656f 100644 --- a/meta-xilinx-bsp/conf/machine/zcu102-zynqmp.conf +++ b/meta-xilinx-bsp/conf/machine/zcu102-zynqmp.conf | |||
| @@ -55,11 +55,6 @@ QB_DEFAULT_FSTYPE_qemuboot-xilinx = "wic.qemu-sd" | |||
| 55 | QB_OPT_APPEND_append_qemuboot-xilinx = " -boot mode=5" | 55 | QB_OPT_APPEND_append_qemuboot-xilinx = " -boot mode=5" |
| 56 | QB_ROOTFS_OPT_qemuboot-xilinx = " -drive if=sd,index=1,file=@ROOTFS@,format=raw" | 56 | QB_ROOTFS_OPT_qemuboot-xilinx = " -drive if=sd,index=1,file=@ROOTFS@,format=raw" |
| 57 | 57 | ||
| 58 | # PMU instance args | ||
| 59 | PMU_ROM ?= "${DEPLOY_DIR_IMAGE}/pmu-rom.elf" | ||
| 60 | PMU_FIRMWARE_DEPLOY_DIR ?= "${@ '${TOPDIR}/pmutmp/deploy/images/microblaze-pmu' if d.getVar('BBMULTICONFIG') == 'pmu' else '${TOPDIR}/tmp/deploy/images/${MACHINE}'}" | ||
| 61 | PMU_FIRMWARE_IMAGE_NAME ?= "${@ 'pmu-firmware-microblaze-pmu' if d.getVar('BBMULTICONFIG') == 'pmu' else 'pmu-zcu102-zynqmp'}" | ||
| 62 | |||
| 63 | QB_PMU_OPT = " \ | 58 | QB_PMU_OPT = " \ |
| 64 | -M microblaze-fdt \ | 59 | -M microblaze-fdt \ |
| 65 | -display none \ | 60 | -display none \ |
diff --git a/meta-xilinx-bsp/conf/machine/zcu104-zynqmp.conf b/meta-xilinx-bsp/conf/machine/zcu104-zynqmp.conf index 17a677fe..f97ffa37 100644 --- a/meta-xilinx-bsp/conf/machine/zcu104-zynqmp.conf +++ b/meta-xilinx-bsp/conf/machine/zcu104-zynqmp.conf | |||
| @@ -18,9 +18,6 @@ SERIAL_CONSOLES ?= "115200;ttyPS0" | |||
| 18 | 18 | ||
| 19 | KERNEL_DEVICETREE = "xilinx/zynqmp-zcu104-revC.dtb" | 19 | KERNEL_DEVICETREE = "xilinx/zynqmp-zcu104-revC.dtb" |
| 20 | 20 | ||
| 21 | PMU_FIRMWARE_IMAGE_NAME ?= "pmu-firmware-zynqmp-pmu" | ||
| 22 | PMU_FIRMWARE_DEPLOY_DIR ?= "${TOPDIR}/pmutmp/deploy/images/zynqmp-pmu" | ||
| 23 | |||
| 24 | EXTRA_IMAGEDEPENDS += " \ | 21 | EXTRA_IMAGEDEPENDS += " \ |
| 25 | u-boot-zynq-uenv \ | 22 | u-boot-zynq-uenv \ |
| 26 | arm-trusted-firmware \ | 23 | arm-trusted-firmware \ |
diff --git a/meta-xilinx-bsp/conf/machine/zcu106-zynqmp.conf b/meta-xilinx-bsp/conf/machine/zcu106-zynqmp.conf index 27ab2a98..045d6f6c 100644 --- a/meta-xilinx-bsp/conf/machine/zcu106-zynqmp.conf +++ b/meta-xilinx-bsp/conf/machine/zcu106-zynqmp.conf | |||
| @@ -16,9 +16,6 @@ SERIAL_CONSOLES ?= "115200;ttyPS0" | |||
| 16 | 16 | ||
| 17 | KERNEL_DEVICETREE = "xilinx/zynqmp-zcu106-revA.dtb" | 17 | KERNEL_DEVICETREE = "xilinx/zynqmp-zcu106-revA.dtb" |
| 18 | 18 | ||
| 19 | PMU_FIRMWARE_IMAGE_NAME ?= "pmu-firmware-zynqmp-pmu" | ||
| 20 | PMU_FIRMWARE_DEPLOY_DIR ?= "${TOPDIR}/pmutmp/deploy/images/zynqmp-pmu" | ||
| 21 | |||
| 22 | EXTRA_IMAGEDEPENDS += " \ | 19 | EXTRA_IMAGEDEPENDS += " \ |
| 23 | u-boot-zynq-uenv \ | 20 | u-boot-zynq-uenv \ |
| 24 | arm-trusted-firmware \ | 21 | arm-trusted-firmware \ |
diff --git a/meta-xilinx-bsp/conf/machine/zcu111-zynqmp.conf b/meta-xilinx-bsp/conf/machine/zcu111-zynqmp.conf index 24e96ad6..813f7453 100644 --- a/meta-xilinx-bsp/conf/machine/zcu111-zynqmp.conf +++ b/meta-xilinx-bsp/conf/machine/zcu111-zynqmp.conf | |||
| @@ -18,9 +18,6 @@ SERIAL_CONSOLES ?= "115200;ttyPS0" | |||
| 18 | 18 | ||
| 19 | KERNEL_DEVICETREE = "xilinx/zynqmp-zcu111-revA.dtb" | 19 | KERNEL_DEVICETREE = "xilinx/zynqmp-zcu111-revA.dtb" |
| 20 | 20 | ||
| 21 | PMU_FIRMWARE_IMAGE_NAME ?= "pmu-firmware-zynqmp-pmu" | ||
| 22 | PMU_FIRMWARE_DEPLOY_DIR ?= "${TOPDIR}/pmutmp/deploy/images/zynqmp-pmu" | ||
| 23 | |||
| 24 | EXTRA_IMAGEDEPENDS += " \ | 21 | EXTRA_IMAGEDEPENDS += " \ |
| 25 | u-boot-zynq-uenv \ | 22 | u-boot-zynq-uenv \ |
| 26 | arm-trusted-firmware \ | 23 | arm-trusted-firmware \ |
diff --git a/meta-xilinx-bsp/conf/machine/zcu1275-zynqmp.conf b/meta-xilinx-bsp/conf/machine/zcu1275-zynqmp.conf index 2ac4004f..91d2761c 100644 --- a/meta-xilinx-bsp/conf/machine/zcu1275-zynqmp.conf +++ b/meta-xilinx-bsp/conf/machine/zcu1275-zynqmp.conf | |||
| @@ -18,9 +18,6 @@ SERIAL_CONSOLES ?= "115200;ttyPS0" | |||
| 18 | 18 | ||
| 19 | KERNEL_DEVICETREE = "xilinx/zynqmp-zcu1275-revB.dtb" | 19 | KERNEL_DEVICETREE = "xilinx/zynqmp-zcu1275-revB.dtb" |
| 20 | 20 | ||
| 21 | PMU_FIRMWARE_IMAGE_NAME ?= "pmu-firmware-zynqmp-pmu" | ||
| 22 | PMU_FIRMWARE_DEPLOY_DIR ?= "${TOPDIR}/pmutmp/deploy/images/zynqmp-pmu" | ||
| 23 | |||
| 24 | EXTRA_IMAGEDEPENDS += " \ | 21 | EXTRA_IMAGEDEPENDS += " \ |
| 25 | u-boot-zynq-uenv \ | 22 | u-boot-zynq-uenv \ |
| 26 | arm-trusted-firmware \ | 23 | arm-trusted-firmware \ |
diff --git a/meta-xilinx-bsp/conf/machine/zcu1285-zynqmp.conf b/meta-xilinx-bsp/conf/machine/zcu1285-zynqmp.conf index d7d41d4d..254974e8 100644 --- a/meta-xilinx-bsp/conf/machine/zcu1285-zynqmp.conf +++ b/meta-xilinx-bsp/conf/machine/zcu1285-zynqmp.conf | |||
| @@ -18,9 +18,6 @@ SERIAL_CONSOLES ?= "115200;ttyPS0" | |||
| 18 | 18 | ||
| 19 | KERNEL_DEVICETREE = "xilinx/zynqmp-zcu1285-revA.dtb" | 19 | KERNEL_DEVICETREE = "xilinx/zynqmp-zcu1285-revA.dtb" |
| 20 | 20 | ||
| 21 | PMU_FIRMWARE_IMAGE_NAME ?= "pmu-firmware-zynqmp-pmu" | ||
| 22 | PMU_FIRMWARE_DEPLOY_DIR ?= "${TOPDIR}/pmutmp/deploy/images/zynqmp-pmu" | ||
| 23 | |||
| 24 | EXTRA_IMAGEDEPENDS += " \ | 21 | EXTRA_IMAGEDEPENDS += " \ |
| 25 | u-boot-zynq-uenv \ | 22 | u-boot-zynq-uenv \ |
| 26 | arm-trusted-firmware \ | 23 | arm-trusted-firmware \ |
diff --git a/meta-xilinx-bsp/conf/machine/zcu208-zynqmp.conf b/meta-xilinx-bsp/conf/machine/zcu208-zynqmp.conf index c69b5f35..673ab9e4 100644 --- a/meta-xilinx-bsp/conf/machine/zcu208-zynqmp.conf +++ b/meta-xilinx-bsp/conf/machine/zcu208-zynqmp.conf | |||
| @@ -15,10 +15,6 @@ SPL_BINARY ?= "spl/boot.bin" | |||
| 15 | 15 | ||
| 16 | SERIAL_CONSOLES ?= "115200;ttyPS0" | 16 | SERIAL_CONSOLES ?= "115200;ttyPS0" |
| 17 | 17 | ||
| 18 | |||
| 19 | PMU_FIRMWARE_IMAGE_NAME ?= "pmu-firmware-zynqmp-pmu" | ||
| 20 | PMU_FIRMWARE_DEPLOY_DIR ?= "${TOPDIR}/pmutmp/deploy/images/zynqmp-pmu" | ||
| 21 | |||
| 22 | EXTRA_IMAGEDEPENDS += " \ | 18 | EXTRA_IMAGEDEPENDS += " \ |
| 23 | u-boot-zynq-uenv \ | 19 | u-boot-zynq-uenv \ |
| 24 | arm-trusted-firmware \ | 20 | arm-trusted-firmware \ |
diff --git a/meta-xilinx-bsp/conf/machine/zcu216-zynqmp.conf b/meta-xilinx-bsp/conf/machine/zcu216-zynqmp.conf index 4f07e0ea..53cb31ae 100644 --- a/meta-xilinx-bsp/conf/machine/zcu216-zynqmp.conf +++ b/meta-xilinx-bsp/conf/machine/zcu216-zynqmp.conf | |||
| @@ -15,10 +15,6 @@ SPL_BINARY ?= "spl/boot.bin" | |||
| 15 | 15 | ||
| 16 | SERIAL_CONSOLES ?= "115200;ttyPS0" | 16 | SERIAL_CONSOLES ?= "115200;ttyPS0" |
| 17 | 17 | ||
| 18 | |||
| 19 | PMU_FIRMWARE_IMAGE_NAME ?= "pmu-firmware-zynqmp-pmu" | ||
| 20 | PMU_FIRMWARE_DEPLOY_DIR ?= "${TOPDIR}/pmutmp/deploy/images/zynqmp-pmu" | ||
| 21 | |||
| 22 | EXTRA_IMAGEDEPENDS += " \ | 18 | EXTRA_IMAGEDEPENDS += " \ |
| 23 | u-boot-zynq-uenv \ | 19 | u-boot-zynq-uenv \ |
| 24 | arm-trusted-firmware \ | 20 | arm-trusted-firmware \ |
diff --git a/meta-xilinx-bsp/conf/machine/zynqmp-generic.conf b/meta-xilinx-bsp/conf/machine/zynqmp-generic.conf index 9c7dbe83..b2860b0c 100644 --- a/meta-xilinx-bsp/conf/machine/zynqmp-generic.conf +++ b/meta-xilinx-bsp/conf/machine/zynqmp-generic.conf | |||
| @@ -65,11 +65,6 @@ QB_DEFAULT_FSTYPE_qemuboot-xilinx = "wic.qemu-sd" | |||
| 65 | QB_OPT_APPEND_append_qemuboot-xilinx = " -boot mode=5" | 65 | QB_OPT_APPEND_append_qemuboot-xilinx = " -boot mode=5" |
| 66 | QB_ROOTFS_OPT_qemuboot-xilinx = " -drive if=sd,index=1,file=@ROOTFS@,format=raw" | 66 | QB_ROOTFS_OPT_qemuboot-xilinx = " -drive if=sd,index=1,file=@ROOTFS@,format=raw" |
| 67 | 67 | ||
| 68 | # PMU instance args | ||
| 69 | PMU_ROM ?= "${DEPLOY_DIR_IMAGE}/pmu-rom.elf" | ||
| 70 | PMU_FIRMWARE_DEPLOY_DIR ?= "${@ '${TOPDIR}/pmutmp/deploy/images/zynqmp-pmu' if d.getVar('BMULTICONFIG') == 'pmu' else '${TOPDIR}/tmp/deploy/images/${MACHINE}'}" | ||
| 71 | PMU_FIRMWARE_IMAGE_NAME ?= "${@ 'pmu-firmware-zynqmp-pmu' if d.getVar('BBMULTICONFIG') == 'pmu' else 'pmu-${MACHINE}'}" | ||
| 72 | |||
| 73 | QB_PMU_OPT = " \ | 68 | QB_PMU_OPT = " \ |
| 74 | -M microblaze-fdt \ | 69 | -M microblaze-fdt \ |
| 75 | -display none \ | 70 | -display none \ |
diff --git a/meta-xilinx-bsp/recipes-bsp/embeddedsw/plmfw.bb b/meta-xilinx-bsp/recipes-bsp/embeddedsw/plmfw.bb new file mode 100644 index 00000000..33c50953 --- /dev/null +++ b/meta-xilinx-bsp/recipes-bsp/embeddedsw/plmfw.bb | |||
| @@ -0,0 +1,64 @@ | |||
| 1 | DESCRIPTION = "Platform Loader and Manager" | ||
| 2 | SUMMARY = "Platform Loader and Manager for Versal devices" | ||
| 3 | |||
| 4 | LICENSE = "MIT" | ||
| 5 | |||
| 6 | PROVIDES = "virtual/plm" | ||
| 7 | |||
| 8 | INHERIT_DEFAULT_DEPENDS = "1" | ||
| 9 | |||
| 10 | COMPATIBLE_MACHINE = "^$" | ||
| 11 | COMPATIBLE_MACHINE_versal = "versal" | ||
| 12 | |||
| 13 | # This is really BOARD specific, but we'll set it MACHINE for now. | ||
| 14 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
| 15 | |||
| 16 | # Default would be a multiconfig (versal) build | ||
| 17 | # For this to work, BBMULTICONFIG += "versal-fw" must be in the user's local.conf! | ||
| 18 | PLM_DEPENDS ??= "" | ||
| 19 | PLM_MCDEPENDS ??= "mc::versal-fw:plm-firmware:do_deploy" | ||
| 20 | |||
| 21 | # This must be defined to the file output by whatever is providing the plm-firmware | ||
| 22 | # The following sets the default, but the BSP may select a different name | ||
| 23 | PLM_IMAGE_NAME ??= "plm-versal-mb" | ||
| 24 | PLM_DEPLOY_DIR ??= "${TOPDIR}/tmp-microblaze-versal-fw/deploy/images/${MACHINE}" | ||
| 25 | |||
| 26 | # Default is for the multilib case (without the extension .elf/.bin) | ||
| 27 | PLM_FILE ??= "${PLM_DEPLOY_DIR/${PLM_IMAGE_NAME}" | ||
| 28 | |||
| 29 | do_fetch[depends] += "${PLM_DEPENDS}" | ||
| 30 | do_fetch[mcdepends] += "${PLM_MCDEPENDS}" | ||
| 31 | |||
| 32 | inherit update-alternatives deploy | ||
| 33 | |||
| 34 | BINARY_NAME = "${PN}" | ||
| 35 | BINARY_EXT = ".elf" | ||
| 36 | BINARY_ID = "${@d.getVar('SRCPV') if d.getVar('SRCPV') else d.getVar('PR') }" | ||
| 37 | |||
| 38 | do_install() { | ||
| 39 | if [ ! -e ${PLM_FILE}${BINARY_EXT} ]; then | ||
| 40 | echo "Unable to find PLM_FILE (${PLM_FILE}${BINARY_EXT})" | ||
| 41 | exit 1 | ||
| 42 | fi | ||
| 43 | |||
| 44 | install -Dm 0644 ${PLM_FILE}${BINARY_EXT} ${D}/boot/${BINARY_NAME}-${BINARY_ID}${BINARY_EXT} | ||
| 45 | } | ||
| 46 | |||
| 47 | do_deploy() { | ||
| 48 | # If the item is already in OUR deploy_image_dir, nothing to deploy! | ||
| 49 | if [ "x${@'' if d.getVar('PLM_FILE').startswith(d.getVar('DEPLOY_IMAGE_DIR')) else 'copy'}" != "x" ]; then | ||
| 50 | install -Dm 0644 ${PLM_FILE}.elf ${DEPLOYDIR}/${PLM_IMAGE_NAME}.elf | ||
| 51 | install -Dm 0644 ${PLM_FILE}.bin ${DEPLOYDIR}/${PLM_IMAGE_NAME}.bin | ||
| 52 | fi | ||
| 53 | } | ||
| 54 | |||
| 55 | |||
| 56 | ALTERNATIVE_${PN} = "plmfw" | ||
| 57 | ALTERNATIVE_TARGET[plmfw] = "/boot/${BINARY_NAME}-${BINARY_ID}${BINARY_EXT}" | ||
| 58 | ALTERNATIVE_LINK_NAME[plmfw] = "/boot/${BINARY_NAME}${BINARY_EXT}" | ||
| 59 | |||
| 60 | INSANE_SKIP_${PN} = "arch" | ||
| 61 | INSANE_SKIP_${PN}-dbg = "arch" | ||
| 62 | |||
| 63 | SYSROOT_DIRS += "/boot" | ||
| 64 | FILES_${PN} = "/boot/${BINARY_NAME}-${BINARY_ID}${BINARY_EXT}" | ||
diff --git a/meta-xilinx-bsp/recipes-bsp/embeddedsw/pmufw.bb b/meta-xilinx-bsp/recipes-bsp/embeddedsw/pmufw.bb new file mode 100644 index 00000000..3af12cfe --- /dev/null +++ b/meta-xilinx-bsp/recipes-bsp/embeddedsw/pmufw.bb | |||
| @@ -0,0 +1,65 @@ | |||
| 1 | DESCRIPTION = "PMU Firmware" | ||
| 2 | |||
| 3 | LICENSE = "MIT" | ||
| 4 | |||
| 5 | PROVIDES = "virtual/pmu-firmware" | ||
| 6 | |||
| 7 | INHERIT_DEFAULT_DEPENDS = "1" | ||
| 8 | |||
| 9 | COMPATIBLE_MACHINE = "^$" | ||
| 10 | COMPATIBLE_MACHINE_zynqmp = "zynqmp" | ||
| 11 | |||
| 12 | # This is really BOARD specific, but we'll set it MACHINE for now. | ||
| 13 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
| 14 | |||
| 15 | # Default would be a multiconfig (zynqmp-pmufw) build | ||
| 16 | # For this to work, BBMULTICONFIG += "zynqmp-pmufw" must be in the user's local.conf! | ||
| 17 | PMU_DEPENDS ??= "" | ||
| 18 | PMU_MCDEPENDS ??= "mc::zynqmp-pmufw:pmu-firmware:do_deploy" | ||
| 19 | |||
| 20 | # This must be defined to the file output by whatever is providing the pmu-firmware | ||
| 21 | # The following sets the default, but the BSP may select a different name | ||
| 22 | PMU_FIRMWARE_IMAGE_NAME ??= "pmu-firmware-zynqmp-pmu" | ||
| 23 | PMU_FIRMWARE_DEPLOY_DIR ??= "${TOPDIR}/tmp-microblaze-zynqmp-pmufw/deploy/images/${MACHINE}" | ||
| 24 | |||
| 25 | # Default is for the multilib case (without the extension .elf/.bin) | ||
| 26 | PMU_FILE ??= "${PMU_FIRMWARE_DEPLOY_DIR}/${PMU_FIRMWARE_IMAGE_NAME}" | ||
| 27 | |||
| 28 | do_fetch[depends] += "${PMU_DEPENDS}" | ||
| 29 | do_fetch[mcdepends] += "${PMU_MCDEPENDS}" | ||
| 30 | |||
| 31 | inherit deploy update-alternatives | ||
| 32 | |||
| 33 | BINARY_NAME = "${PN}" | ||
| 34 | BINARY_EXT = ".elf" | ||
| 35 | BINARY_ID = "${@d.getVar('SRCPV') if d.getVar('SRCPV') else d.getVar('PR') }" | ||
| 36 | |||
| 37 | do_install() { | ||
| 38 | if [ ! -e ${PMU_FILE}${BINARY_EXT} ]; then | ||
| 39 | echo "Unable to find PMU_FILE (${PMU_FILE}${BINARY_EXT})" | ||
| 40 | exit 1 | ||
| 41 | fi | ||
| 42 | |||
| 43 | install -Dm 0644 ${PMU_FILE}${BINARY_EXT} ${D}/boot/${BINARY_NAME}-${BINARY_ID}${BINARY_EXT} | ||
| 44 | } | ||
| 45 | |||
| 46 | # If the item is already in OUR deploy_image_dir, nothing to deploy! | ||
| 47 | SHOULD_DEPLOY = "${@'false' if (d.getVar('PMU_FILE')).startswith(d.getVar('DEPLOY_DIR_IMAGE')) else 'true'}" | ||
| 48 | do_deploy() { | ||
| 49 | if ${SHOULD_DEPLOY}; then | ||
| 50 | install -Dm 0644 ${PMU_FILE}.elf ${DEPLOYDIR}/${PMU_FIRMWARE_IMAGE_NAME}.elf | ||
| 51 | install -Dm 0644 ${PMU_FILE}.bin ${DEPLOYDIR}/${PMU_FIRMWARE_IMAGE_NAME}.bin | ||
| 52 | fi | ||
| 53 | } | ||
| 54 | |||
| 55 | addtask deploy before do_build after do_install | ||
| 56 | |||
| 57 | ALTERNATIVE_${PN} = "pmufw" | ||
| 58 | ALTERNATIVE_TARGET[pmufw] = "/boot/${BINARY_NAME}-${BINARY_ID}${BINARY_EXT}" | ||
| 59 | ALTERNATIVE_LINK_NAME[pmufw] = "/boot/${BINARY_NAME}${BINARY_EXT}" | ||
| 60 | |||
| 61 | INSANE_SKIP_${PN} = "arch" | ||
| 62 | INSANE_SKIP_${PN}-dbg = "arch" | ||
| 63 | |||
| 64 | SYSROOT_DIRS += "/boot" | ||
| 65 | FILES_${PN} = "/boot/${BINARY_NAME}-${BINARY_ID}${BINARY_EXT}" | ||
diff --git a/meta-xilinx-bsp/recipes-bsp/embeddedsw/psmfw.bb b/meta-xilinx-bsp/recipes-bsp/embeddedsw/psmfw.bb new file mode 100644 index 00000000..24044f77 --- /dev/null +++ b/meta-xilinx-bsp/recipes-bsp/embeddedsw/psmfw.bb | |||
| @@ -0,0 +1,63 @@ | |||
| 1 | DESCRIPTION = "PSM Firmware" | ||
| 2 | SUMMARY = "PSM firmware for versal devices" | ||
| 3 | |||
| 4 | LICENSE = "MIT" | ||
| 5 | |||
| 6 | PROVIDES = "virtual/psm-firmware" | ||
| 7 | |||
| 8 | INHERIT_DEFAULT_DEPENDS = "1" | ||
| 9 | |||
| 10 | COMPATIBLE_MACHINE = "^$" | ||
| 11 | COMPATIBLE_MACHINE_versal = "versal" | ||
| 12 | |||
| 13 | # This is really BOARD specific, but we'll set it MACHINE for now. | ||
| 14 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
| 15 | |||
| 16 | # Default would be a multiconfig (versal) build | ||
| 17 | # For this to work, BBMULTICONFIG += "versal-fw" must be in the user's local.conf! | ||
| 18 | PSM_DEPENDS ??= "" | ||
| 19 | PSM_MCDEPENDS ??= "mc::versal-fw:psm-firmware:do_deploy" | ||
| 20 | |||
| 21 | # This must be defined to the file output by whatever is providing the psm-firmware | ||
| 22 | # The following sets the default, but the BSP may select a different name | ||
| 23 | PSM_FIRMWARE_IMAGE_NAME ??= "psm-firmware-versal-mb" | ||
| 24 | PSM_FIRMWARE_DEPLOY_DIR ??= "${TOPDIR}/tmp-microblaze-versal-fw/deploy/images/${MACHINE}" | ||
| 25 | |||
| 26 | # Default is for the multilib case (without the extension .elf/.bin) | ||
| 27 | PSM_FILE ??= "${PSM_FIRMWARE_DEPLOY_DIR}/${PSM_FIRMWARE_IMAGE_NAME}" | ||
| 28 | |||
| 29 | do_fetch[depends] += "${PSM_DEPENDS}" | ||
| 30 | do_fetch[mcdepends] += "${PSM_MCDEPENDS}" | ||
| 31 | |||
| 32 | inherit update-alternatives deploy | ||
| 33 | |||
| 34 | BINARY_NAME = "${PN}" | ||
| 35 | BINARY_EXT = ".elf" | ||
| 36 | BINARY_ID = "${@d.getVar('SRCPV') if d.getVar('SRCPV') else d.getVar('PR') }" | ||
| 37 | |||
| 38 | do_install() { | ||
| 39 | if [ ! -e ${PSM_FILE}${BINARY_EXT} ]; then | ||
| 40 | echo "Unable to find PSM_FILE (${PSM_FILE}${BINARY_EXT})" | ||
| 41 | exit 1 | ||
| 42 | fi | ||
| 43 | |||
| 44 | install -Dm 0644 ${PSM_FILE}${BINARY_EXT} ${D}/boot/${BINARY_NAME}-${BINARY_ID}${BINARY_EXT} | ||
| 45 | } | ||
| 46 | |||
| 47 | do_deploy() { | ||
| 48 | # If the item is already in OUR deploy_image_dir, nothing to deploy! | ||
| 49 | if [ "x${@'' if d.getVar('PSM_FILE').startswith(d.getVar('DEPLOY_IMAGE_DIR')) else 'copy'}" != "x" ]; then | ||
| 50 | install -Dm 0644 ${PSM_FILE}.elf ${DEPLOYDIR}/${PSM_FIRMWARE_IMAGE_NAME}.elf | ||
| 51 | install -Dm 0644 ${PSM_FILE}.bin ${DEPLOYDIR}/${PSM_FIRMWARE_IMAGE_NAME}.bin | ||
| 52 | fi | ||
| 53 | } | ||
| 54 | |||
| 55 | ALTERNATIVE_${PN} = "psmfw" | ||
| 56 | ALTERNATIVE_TARGET[psmfw] = "/boot/${BINARY_NAME}-${BINARY_ID}${BINARY_EXT}" | ||
| 57 | ALTERNATIVE_LINK_NAME[psmfw] = "/boot/${BINARY_NAME}${BINARY_EXT}" | ||
| 58 | |||
| 59 | INSANE_SKIP_${PN} = "arch" | ||
| 60 | INSANE_SKIP_${PN}-dbg = "arch" | ||
| 61 | |||
| 62 | SYSROOT_DIRS += "/boot" | ||
| 63 | FILES_${PN} = "/boot/${BINARY_NAME}-${BINARY_ID}${BINARY_EXT}" | ||
