summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-xilinx-core/conf/machine/include/soc-versal.inc16
-rw-r--r--meta-xilinx-core/conf/machine/include/soc-zynqmp.inc22
-rw-r--r--meta-xilinx-core/recipes-bsp/embeddedsw/fsbl.bb41
-rw-r--r--meta-xilinx-core/recipes-bsp/embeddedsw/plmfw.bb50
-rw-r--r--meta-xilinx-core/recipes-bsp/embeddedsw/pmufw.bb50
-rw-r--r--meta-xilinx-core/recipes-bsp/embeddedsw/psmfw.bb51
-rw-r--r--meta-xilinx-standalone/recipes-bsp/embeddedsw/fsbl-fw-cfg.inc7
-rw-r--r--meta-xilinx-standalone/recipes-bsp/embeddedsw/fsbl.bbappend9
-rw-r--r--meta-xilinx-standalone/recipes-bsp/embeddedsw/plm-firmware.inc2
-rw-r--r--meta-xilinx-standalone/recipes-bsp/embeddedsw/plmfw.bbappend17
-rw-r--r--meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware.inc2
-rw-r--r--meta-xilinx-standalone/recipes-bsp/embeddedsw/pmufw.bbappend17
-rw-r--r--meta-xilinx-standalone/recipes-bsp/embeddedsw/psm-firmware.inc2
-rw-r--r--meta-xilinx-standalone/recipes-bsp/embeddedsw/psmfw.bbappend17
-rw-r--r--meta-xilinx-standalone/recipes-bsp/embeddedsw/versal-fw-cfg.inc13
-rw-r--r--meta-xilinx-standalone/recipes-bsp/embeddedsw/zynqmp-pmufw-cfg.inc7
16 files changed, 258 insertions, 65 deletions
diff --git a/meta-xilinx-core/conf/machine/include/soc-versal.inc b/meta-xilinx-core/conf/machine/include/soc-versal.inc
index f2a033ad..40145963 100644
--- a/meta-xilinx-core/conf/machine/include/soc-versal.inc
+++ b/meta-xilinx-core/conf/machine/include/soc-versal.inc
@@ -22,14 +22,14 @@ UBOOT_ELF ?= "u-boot.elf"
22 22
23# Default, if multiconfig is off, call plm/psm-firmware directly, otherwise call the versal-fw multiconfig version 23# Default, if multiconfig is off, call plm/psm-firmware directly, otherwise call the versal-fw multiconfig version
24# The Linux compatible plm/psm-firmware though requires meta-xilinx-tools 24# The Linux compatible plm/psm-firmware though requires meta-xilinx-tools
25PLM_DEPENDS ?= "${@bb.utils.contains('BBMULTICONFIG', 'versal-fw', '', 'plm-firmware:do_deploy', d)}" 25PLM_DEPENDS ??= ""
26PLM_MCDEPENDS ?= "${@bb.utils.contains('BBMULTICONFIG', 'versal-fw', 'mc::versal-fw:plm-firmware:do_deploy', '', d)}" 26PLM_MCDEPENDS ??= ""
27PLM_DEPLOY_DIR ?= "${@bb.utils.contains('BBMULTICONFIG', 'versal-fw', '${TOPDIR}/tmp-microblaze-versal-fw/deploy/images/${MACHINE}', '${DEPLOY_DIR_IMAGE}', d)}" 27PLM_DEPLOY_DIR ??= "${DEPLOY_DIR_IMAGE}"
28PLM_IMAGE_NAME ??= "plm-${MACHINE}"
28PLM_DEPLOY_DIR[vardepsexclude] += "TOPDIR" 29PLM_DEPLOY_DIR[vardepsexclude] += "TOPDIR"
29PLM_IMAGE_NAME ?= "${@bb.utils.contains('BBMULTICONFIG', 'versal-fw', 'plm-versal-mb', 'plm-${MACHINE}', d)}"
30 30
31PSM_DEPENDS ?= "${@bb.utils.contains('BBMULTICONFIG', 'versal-fw', '', 'psm-firmware:do_deploy', d)}" 31PSM_DEPENDS ??= ""
32PSM_MCDEPENDS ?= "${@bb.utils.contains('BBMULTICONFIG', 'versal-fw', 'mc::versal-fw:psm-firmware:do_deploy', '', d)}" 32PSM_MCDEPENDS ??= ""
33PSM_FIRMWARE_DEPLOY_DIR ?= "${@bb.utils.contains('BBMULTICONFIG', 'versal-fw', '${TOPDIR}/tmp-microblaze-versal-fw/deploy/images/${MACHINE}', '${DEPLOY_DIR_IMAGE}', d)}" 33PSM_FIRMWARE_DEPLOY_DIR ??= "${DEPLOY_DIR_IMAGE}"
34PSM_FIRMWARE_IMAGE_NAME ??= "psm-firmware-${MACHINE}"
34PSM_DEPLOY_DIR[vardepsexclude] += "TOPDIR" 35PSM_DEPLOY_DIR[vardepsexclude] += "TOPDIR"
35PSM_FIRMWARE_IMAGE_NAME ?= "${@bb.utils.contains('BBMULTICONFIG', 'versal-fw', 'psm-firmware-versal-mb', 'psm-firmware-${MACHINE}', d)}"
diff --git a/meta-xilinx-core/conf/machine/include/soc-zynqmp.inc b/meta-xilinx-core/conf/machine/include/soc-zynqmp.inc
index e32fd617..d67fa95d 100644
--- a/meta-xilinx-core/conf/machine/include/soc-zynqmp.inc
+++ b/meta-xilinx-core/conf/machine/include/soc-zynqmp.inc
@@ -34,18 +34,12 @@ XSERVER_EXT:zynqmp ?= "xf86-video-armsoc"
34# Default PMU ROM 34# Default PMU ROM
35PMU_ROM ?= "${DEPLOY_DIR_IMAGE}/pmu-rom.elf" 35PMU_ROM ?= "${DEPLOY_DIR_IMAGE}/pmu-rom.elf"
36 36
37# Default, if multiconfig is off, call pmu-firmware directly, otherwise call the zynqmp-pmufw multiconfig version 37
38# The Linux compatible pmu-firmware though requires meta-xilinx-tools 38# Default expects the user to provide a specific pmu-firwmare in the deploy
39PMU_DEPENDS ?= "${@bb.utils.contains('BBMULTICONFIG', 'zynqmp-pmufw', '', 'pmu-firmware:do_deploy', d)}" 39# directory, named "pmu-firmware-${MACHINE}.elf" and "pmu-firmware-${MACHINE}.bin"
40PMU_MCDEPENDS ?= "${@bb.utils.contains('BBMULTICONFIG', 'zynqmp-pmufw', 'mc::zynqmp-pmufw:pmu-firmware:do_deploy', '', d)}" 40PMU_DEPENDS ??= ""
41PMU_FIRMWARE_DEPLOY_DIR ?= "${@bb.utils.contains('BBMULTICONFIG', 'zynqmp-pmufw', '${TOPDIR}/tmp-microblaze-zynqmp-pmufw/deploy/images/${MACHINE}', '${DEPLOY_DIR_IMAGE}', d)}" 41PMU_MCDEPENDS ??= ""
42PMU_FIRMWARE_DEPLOY_DIR ??= "${DEPLOY_DIR_IMAGE}"
43PMU_FIRMWARE_IMAGE_NAME ??= "pmu-firmware-${MACHINE}"
44
42PMU_FIRMWARE_DEPLOY_DIR[vardepsexclude] += "TOPDIR" 45PMU_FIRMWARE_DEPLOY_DIR[vardepsexclude] += "TOPDIR"
43PMU_FIRMWARE_IMAGE_NAME ?= "${@bb.utils.contains('BBMULTICONFIG', 'zynqmp-pmufw', 'pmu-firmware-zynqmp-pmu', 'pmu-firmware-${MACHINE}', d)}"
44
45# Default, if multiconfig is off, the fsbl is in the regular deploydir, otherwise
46# it is located under a multiconfig specific deploydir
47FSBL_DEPENDS ?= "${@bb.utils.contains('BBMULTICONFIG', 'fsbl-fw', '', 'fsbl-firmware:do_deploy', d)}"
48FSBL_MCDEPENDS ?= "${@bb.utils.contains('BBMULTICONFIG', 'fsbl-fw', 'mc::fsbl-fw:fsbl-firmware:do_deploy', '', d)}"
49FSBL_DEPLOY_DIR ?= "${@bb.utils.contains('BBMULTICONFIG', 'fsbl-fw', '${TOPDIR}/tmp-fsbl-fw/deploy/images/${MACHINE}', '${DEPLOY_DIR_IMAGE}', d)}"
50FSBL_DEPLOY_DIR[vardepsexclude] += "TOPDIR"
51FSBL_IMAGE_NAME ?= "fsbl-${MACHINE}"
diff --git a/meta-xilinx-core/recipes-bsp/embeddedsw/fsbl.bb b/meta-xilinx-core/recipes-bsp/embeddedsw/fsbl.bb
index ae2123e7..f8679f0e 100644
--- a/meta-xilinx-core/recipes-bsp/embeddedsw/fsbl.bb
+++ b/meta-xilinx-core/recipes-bsp/embeddedsw/fsbl.bb
@@ -1,6 +1,6 @@
1DESCRIPTION = "Xilinx First Stage Boot Loader" 1DESCRIPTION = "Xilinx First Stage Boot Loader"
2 2
3LICENSE = "MIT" 3LICENSE = "CLOSED"
4 4
5PROVIDES = "virtual/fsbl" 5PROVIDES = "virtual/fsbl"
6 6
@@ -10,19 +10,21 @@ COMPATIBLE_MACHINE = "^$"
10COMPATIBLE_MACHINE:zynq = "zynq" 10COMPATIBLE_MACHINE:zynq = "zynq"
11COMPATIBLE_MACHINE:zynqmp = "zynqmp" 11COMPATIBLE_MACHINE:zynqmp = "zynqmp"
12 12
13# Since we're just copying, we can run any config
14COMPATIBLE_HOST = ".*"
15
13PACKAGE_ARCH = "${MACHINE_ARCH}" 16PACKAGE_ARCH = "${MACHINE_ARCH}"
14 17
15# Default would be a multiconfig (versal) build 18# Default expects the user to provide the fsbl in the deploy
16# For this to work, BBMULTICONFIG += "fsbl-fw" must be in the user's local.conf! 19# directory, named "fsbl.elf"
20# A machine, multiconfig, or local.conf should override this
17FSBL_DEPENDS ??= "" 21FSBL_DEPENDS ??= ""
18FSBL_MCDEPENDS ??= "mc::fsbl-fw:fsbl-firmware:do_deploy" 22FSBL_MCDEPENDS ??= ""
19 23FSBL_DEPLOY_DIR ??= "${DEPLOY_DIR_IMAGE}"
20# This must be defined to the file output by whatever is providing the fsbl-firmware 24FSBL_DEPLOY_DIR[vardepsexclude] += "TOPDIR"
21# The following sets the default, but the BSP may select a different name 25FSBL_IMAGE_NAME ??= "fsbl-${MACHINE}"
22FSBL_IMAGE_NAME ??= "fsbl"
23FSBL_DEPLOY_DIR ??= "${TOPDIR}/tmp-fsbl-fw/deploy/images/${MACHINE}"
24 26
25# Default is for the multilib case (without the extension .elf/.bin) 27# Default is for the multilib case (without the extension .elf)
26FSBL_FILE ??= "${FSBL_DEPLOY_DIR}/${FSBL_IMAGE_NAME}" 28FSBL_FILE ??= "${FSBL_DEPLOY_DIR}/${FSBL_IMAGE_NAME}"
27FSBL_FILE[vardepsexclude] = "FSBL_DEPLOY_DIR" 29FSBL_FILE[vardepsexclude] = "FSBL_DEPLOY_DIR"
28 30
@@ -56,3 +58,22 @@ INSANE_SKIP:${PN}-dbg = "arch"
56 58
57SYSROOT_DIRS += "/boot" 59SYSROOT_DIRS += "/boot"
58FILES:${PN} = "/boot/${PN}.elf" 60FILES:${PN} = "/boot/${PN}.elf"
61
62def check_fsbl_variables(d):
63 # If both are blank, the user MUST pass in the path to the firmware!
64 if not d.getVar('FSBL_DEPENDS') and not d.getVar('FSBL_MCDEPENDS'):
65 # Don't cache this, as the items on disk can change!
66 d.setVar('BB_DONT_CACHE', '1')
67
68 if not os.path.exists(d.getVar('FSBL_FILE') + ".elf"):
69 raise bb.parse.SkipRecipe("The expect file %s.elf is not available.\nSet FSBL_FILE to the path with a precompiled FSBL binary. See the meta-xilinx-core README for more information." % d.getVar('FSBL_FILE'))
70 else:
71 # We found the file, so be sure to track it
72 d.setVar('SRC_URI', 'file://${FSBL_FILE}.elf')
73 d.setVarFlag('do_install', 'file-checksums', '${FSBL_FILE}.elf:True')
74 d.setVarFlag('do_deploy', 'file-checksums', '${FSBL_FILE}.elf:True')
75
76python() {
77 # Need to allow bbappends to change the check
78 check_fsbl_variables(d)
79}
diff --git a/meta-xilinx-core/recipes-bsp/embeddedsw/plmfw.bb b/meta-xilinx-core/recipes-bsp/embeddedsw/plmfw.bb
index 6a2a5172..0306ef46 100644
--- a/meta-xilinx-core/recipes-bsp/embeddedsw/plmfw.bb
+++ b/meta-xilinx-core/recipes-bsp/embeddedsw/plmfw.bb
@@ -1,26 +1,28 @@
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
4LICENSE = "MIT" 4LICENSE = "CLOSED"
5 5
6PROVIDES = "virtual/plm" 6PROVIDES = "virtual/plm"
7 7
8INHERIT_DEFAULT_DEPENDS = "1" 8INHERIT_DEFAULT_DEPENDS = "1"
9 9
10COMPATIBLE_MACHINE = "^$" 10COMPATIBLE_MACHINE = "^$"
11COMPATIBLE_MACHINE:versal = "versal" 11COMPATIBLE_MACHINE:versal = ".*"
12
13# Since we're just copying, we can run any config
14COMPATIBLE_HOST = ".*"
12 15
13PACKAGE_ARCH = "${MACHINE_ARCH}" 16PACKAGE_ARCH = "${MACHINE_ARCH}"
14 17
15# Default would be a multiconfig (versal) build 18# Default expects the user to provide the plm-firmware in the deploy
16# For this to work, BBMULTICONFIG += "versal-fw" must be in the user's local.conf! 19# directory, named "plm-${MACHINE}.elf" and "plm-${MACHINE}.bin"
20# A machine, multiconfig, or local.conf should override this
17PLM_DEPENDS ??= "" 21PLM_DEPENDS ??= ""
18PLM_MCDEPENDS ??= "mc::versal-fw:plm-firmware:do_deploy" 22PLM_MCDEPENDS ??= ""
19 23PLM_DEPLOY_DIR ??= "${DEPLOY_DIR_IMAGE}"
20# This must be defined to the file output by whatever is providing the plm-firmware 24PLM_DEPLOY_DIR[vardepsexclude] += "TOPDIR"
21# The following sets the default, but the BSP may select a different name 25PLM_IMAGE_NAME ??= "plm-${MACHINE}"
22PLM_IMAGE_NAME ??= "plm-versal-mb"
23PLM_DEPLOY_DIR ??= "${TOPDIR}/tmp-microblaze-versal-fw/deploy/images/${MACHINE}"
24 26
25# Default is for the multilib case (without the extension .elf/.bin) 27# Default is for the multilib case (without the extension .elf/.bin)
26PLM_FILE ??= "${PLM_DEPLOY_DIR}/${PLM_IMAGE_NAME}" 28PLM_FILE ??= "${PLM_DEPLOY_DIR}/${PLM_IMAGE_NAME}"
@@ -57,3 +59,31 @@ INSANE_SKIP:${PN}-dbg = "arch"
57 59
58SYSROOT_DIRS += "/boot" 60SYSROOT_DIRS += "/boot"
59FILES:${PN} = "/boot/${PN}.elf" 61FILES:${PN} = "/boot/${PN}.elf"
62
63def check_plm_vars(d):
64 # If both are blank, the user MUST pass in the path to the firmware!
65 if not d.getVar('PLM_DEPENDS') and not d.getVar('PLM_MCDEPENDS'):
66 # Don't cache this, as the items on disk can change!
67 d.setVar('BB_DONT_CACHE', '1')
68
69 msg = ""
70 fail = False
71 if not os.path.exists(d.getVar('PLM_FILE') + ".elf"):
72 msg = msg + "The expected file %s.elf is not available. " % d.getVar('PLM_FILE')
73 fail = True
74 if not os.path.exists(d.getVar('PLM_FILE') + ".bin"):
75 msg = msg + "The expected file %s.bin is not available. " % d.getVar('PLM_FILE')
76 fail = True
77 if fail:
78 raise bb.parse.SkipRecipe("%s\nSee the meta-xilinx-core README." % msg)
79 else:
80 # We found the file, so be sure to track it
81 d.setVar('SRC_URI', 'file://${PLM_FILE}.elf file://${PLM_FILE}.bin')
82 d.setVarFlag('do_install', 'file-checksums', '${PLM_FILE}.elf:True')
83 d.setVarFlag('do_deploy', 'file-checksums', '${PLM_FILE}.elf:True ${PLM_FILE}.bin:True')
84
85python() {
86 # Need to allow bbappends to change the check
87 check_plm_vars(d)
88}
89
diff --git a/meta-xilinx-core/recipes-bsp/embeddedsw/pmufw.bb b/meta-xilinx-core/recipes-bsp/embeddedsw/pmufw.bb
index ea0eb5a6..b3f9664e 100644
--- a/meta-xilinx-core/recipes-bsp/embeddedsw/pmufw.bb
+++ b/meta-xilinx-core/recipes-bsp/embeddedsw/pmufw.bb
@@ -1,25 +1,27 @@
1DESCRIPTION = "PMU Firmware" 1DESCRIPTION = "PMU Firmware"
2 2
3LICENSE = "MIT" 3LICENSE = "CLOSED"
4 4
5PROVIDES = "virtual/pmu-firmware" 5PROVIDES = "virtual/pmu-firmware"
6 6
7INHERIT_DEFAULT_DEPENDS = "1" 7INHERIT_DEFAULT_DEPENDS = "1"
8 8
9COMPATIBLE_MACHINE = "^$" 9COMPATIBLE_MACHINE = "^$"
10COMPATIBLE_MACHINE:zynqmp = "zynqmp" 10COMPATIBLE_MACHINE:zynqmp = ".*"
11
12# Since we're just copying, we can run any config
13COMPATIBLE_HOST = ".*"
11 14
12PACKAGE_ARCH = "${MACHINE_ARCH}" 15PACKAGE_ARCH = "${MACHINE_ARCH}"
13 16
14# Default would be a multiconfig (zynqmp-pmufw) build 17# Default expects the user to provide the pmu-firmware in the deploy
15# For this to work, BBMULTICONFIG += "zynqmp-pmufw" must be in the user's local.conf! 18# directory, named "pmu-firmware-${MACHINE}.elf" and "pmu-firmware-${MACHINE}.bin"
19# A machine, multiconfig, or local.conf should override this
16PMU_DEPENDS ??= "" 20PMU_DEPENDS ??= ""
17PMU_MCDEPENDS ??= "mc::zynqmp-pmufw:pmu-firmware:do_deploy" 21PMU_MCDEPENDS ??= ""
18 22PMU_FIRMWARE_DEPLOY_DIR ??= "${DEPLOY_DIR_IMAGE}"
19# This must be defined to the file output by whatever is providing the pmu-firmware 23PMU_FIRMWARE_DEPLOY_DIR[vardepsexclude] += "TOPDIR"
20# The following sets the default, but the BSP may select a different name 24PMU_FIRMWARE_IMAGE_NAME ??= "pmu-firmware-${MACHINE}"
21PMU_FIRMWARE_IMAGE_NAME ??= "pmu-firmware-zynqmp-pmu"
22PMU_FIRMWARE_DEPLOY_DIR ??= "${TOPDIR}/tmp-microblaze-zynqmp-pmufw/deploy/images/${MACHINE}"
23 25
24# Default is for the multilib case (without the extension .elf/.bin) 26# Default is for the multilib case (without the extension .elf/.bin)
25PMU_FILE ??= "${PMU_FIRMWARE_DEPLOY_DIR}/${PMU_FIRMWARE_IMAGE_NAME}" 27PMU_FILE ??= "${PMU_FIRMWARE_DEPLOY_DIR}/${PMU_FIRMWARE_IMAGE_NAME}"
@@ -55,3 +57,31 @@ INSANE_SKIP:${PN}-dbg = "arch"
55 57
56SYSROOT_DIRS += "/boot" 58SYSROOT_DIRS += "/boot"
57FILES:${PN} = "/boot/${PN}.elf" 59FILES:${PN} = "/boot/${PN}.elf"
60
61def check_pmu_vars(d):
62 # If both are blank, the user MUST pass in the path to the firmware!
63 if not d.getVar('PMU_FIRMWARE_DEPENDS') and not d.getVar('PMU_FIRMWARE_MCDEPENDS'):
64 # Don't cache this, as the items on disk can change!
65 d.setVar('BB_DONT_CACHE', '1')
66
67 msg = ""
68 fail = False
69 if not os.path.exists(d.getVar('PMU_FILE') + ".elf"):
70 msg = msg + "The expected file %s.elf is not available. " % d.getVar('PMU_FILE')
71 fail = True
72 if not os.path.exists(d.getVar('PMU_FILE') + ".bin"):
73 msg = msg + "The expected file %s.bin is not available. " % d.getVar('PMU_FILE')
74 fail = True
75 if fail:
76 raise bb.parse.SkipRecipe("%s See the meta-xilinx-core README." % msg)
77 else:
78 # We found the file, so be sure to track it
79 d.setVar('SRC_URI', 'file://${PMU_FILE}.elf file://${PMU_FILE}.bin')
80 d.setVarFlag('do_install', 'file-checksums', '${PMU_FILE}.elf:True')
81 d.setVarFlag('do_deploy', 'file-checksums', '${PMU_FILE}.elf:True ${PMU_FILE}.bin:True')
82
83
84python() {
85 # Need to allow bbappends to change the check
86 check_pmu_vars(d)
87}
diff --git a/meta-xilinx-core/recipes-bsp/embeddedsw/psmfw.bb b/meta-xilinx-core/recipes-bsp/embeddedsw/psmfw.bb
index 89a9e93f..46124591 100644
--- a/meta-xilinx-core/recipes-bsp/embeddedsw/psmfw.bb
+++ b/meta-xilinx-core/recipes-bsp/embeddedsw/psmfw.bb
@@ -1,26 +1,28 @@
1DESCRIPTION = "PSM Firmware" 1DESCRIPTION = "PSM Firmware"
2SUMMARY = "PSM firmware for versal devices" 2SUMMARY = "PSM firmware for versal devices"
3 3
4LICENSE = "MIT" 4LICENSE = "CLOSED"
5 5
6PROVIDES = "virtual/psm-firmware" 6PROVIDES = "virtual/psm-firmware"
7 7
8INHERIT_DEFAULT_DEPENDS = "1" 8INHERIT_DEFAULT_DEPENDS = "1"
9 9
10COMPATIBLE_MACHINE = "^$" 10COMPATIBLE_MACHINE = "^$"
11COMPATIBLE_MACHINE:versal = "versal" 11COMPATIBLE_MACHINE:versal = ".*"
12
13# Since we're just copying, we can run any config
14COMPATIBLE_HOST = ".*"
12 15
13PACKAGE_ARCH = "${MACHINE_ARCH}" 16PACKAGE_ARCH = "${MACHINE_ARCH}"
14 17
15# Default would be a multiconfig (versal) build 18# Default expects the user to provide the psm-firmware in the deploy
16# For this to work, BBMULTICONFIG += "versal-fw" must be in the user's local.conf! 19# directory, named "psm-firmware-${MACHINE}.elf" and "psm-firmware-${MACHINE}.bin"
20# A machine, multiconfig, or local.conf should override this
17PSM_DEPENDS ??= "" 21PSM_DEPENDS ??= ""
18PSM_MCDEPENDS ??= "mc::versal-fw:psm-firmware:do_deploy" 22PSM_MCDEPENDS ??= ""
19 23PSM_DEPLOY_DIR ??= "${DEPLOY_DIR_IMAGE}"
20# This must be defined to the file output by whatever is providing the psm-firmware 24PSM_FIRMWARE_DEPLOY_DIR[vardepsexclude] += "TOPDIR"
21# The following sets the default, but the BSP may select a different name 25PSM_FIRMWARE_IMAGE_NAME ??= "psm-firmware-${MACHINE}"
22PSM_FIRMWARE_IMAGE_NAME ??= "psm-firmware-versal-mb"
23PSM_FIRMWARE_DEPLOY_DIR ??= "${TOPDIR}/tmp-microblaze-versal-fw/deploy/images/${MACHINE}"
24 26
25# Default is for the multilib case (without the extension .elf/.bin) 27# Default is for the multilib case (without the extension .elf/.bin)
26PSM_FILE ??= "${PSM_FIRMWARE_DEPLOY_DIR}/${PSM_FIRMWARE_IMAGE_NAME}" 28PSM_FILE ??= "${PSM_FIRMWARE_DEPLOY_DIR}/${PSM_FIRMWARE_IMAGE_NAME}"
@@ -57,3 +59,32 @@ INSANE_SKIP:${PN}-dbg = "arch"
57 59
58SYSROOT_DIRS += "/boot" 60SYSROOT_DIRS += "/boot"
59FILES:${PN} = "/boot/${PN}.elf" 61FILES:${PN} = "/boot/${PN}.elf"
62
63def check_psm_vars(d):
64 # If both are blank, the user MUST pass in the path to the firmware!
65 if not d.getVar('PSM_DEPENDS') and not d.getVar('PSM_MCDEPENDS'):
66 # Don't cache this, as the items on disk can change!
67 d.setVar('BB_DONT_CACHE', '1')
68
69 msg = ""
70 fail = False
71 if not os.path.exists(d.getVar('PSM_FILE') + ".elf"):
72 msg = msg + "The expected file %s.elf is not available. " % d.getVar('PSM_FILE')
73 fail = True
74 if not os.path.exists(d.getVar('PSM_FILE') + ".bin"):
75 msg = msg + "The expected file %s.bin is not available. " % d.getVar('PSM_FILE')
76 fail = True
77
78 if fail:
79 raise bb.parse.SkipRecipe("%s\nSee the meta-xilinx-core README." % msg)
80 else:
81 # We found the file, so be sure to track it
82 d.setVar('SRC_URI', 'file://${PSM_FILE}.elf file://${PSM_FILE}.bin')
83 d.setVarFlag('do_install', 'file-checksums', '${PSM_FILE}.elf:True')
84 d.setVarFlag('do_deploy', 'file-checksums', '${PSM_FILE}.elf:True ${PSM_FILE}.bin:True')
85
86python() {
87 # Need to allow bbappends to change the check
88 check_psm_vars(d)
89}
90
diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/fsbl-fw-cfg.inc b/meta-xilinx-standalone/recipes-bsp/embeddedsw/fsbl-fw-cfg.inc
new file mode 100644
index 00000000..5499befd
--- /dev/null
+++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/fsbl-fw-cfg.inc
@@ -0,0 +1,7 @@
1# Default fsbl configuration, using fsbl-fw multiconfig
2#
3# This requires MULTICONFIG += "fsbl-fw" to be added to local.conf
4FSBL_DEPENDS ?= ""
5FSBL_MCDEPENDS ?= "mc::fsbl-fw:fsbl-firmware:do_deploy"
6FSBL_DEPLOY_DIR ?= "${TOPDIR}/tmp-fsbl-fw/deploy/images/${MACHINE}"
7FSBL_IMAGE_NAME ?= "fsbl"
diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/fsbl.bbappend b/meta-xilinx-standalone/recipes-bsp/embeddedsw/fsbl.bbappend
new file mode 100644
index 00000000..5b02e3de
--- /dev/null
+++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/fsbl.bbappend
@@ -0,0 +1,9 @@
1# Include the fsbl-fw setting, if it's enabled
2FSBL_INC = "${@bb.utils.contains('BBMULTICONFIG', 'fsbl-fw', 'fsbl-fw-cfg.inc', '', d)}"
3require ${FSBL_INC}
4
5def check_fsbl_variables(d):
6 if not d.getVar('FSBL_DEPENDS') and not d.getVar('FSBL_MCDEPENDS') and not (d.getVar('BBMULTICONFIG') and 'fsbl-fw' in d.getVar('BBMULTICONFIG').split()):
7 if not os.path.exists(d.getVar('FSBL_FILE') + ".elf"):
8 d.setVar('BB_DONT_CACHE', '1')
9 raise bb.parse.SkipRecipe("The expect file %s.elf is not available.\nEither specify FSBL_FILE, or you may need to enable BBMULTICONFIG += 'fsbl-fw' to generate it." % d.getVar('FSBL_FILE'))
diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/plm-firmware.inc b/meta-xilinx-standalone/recipes-bsp/embeddedsw/plm-firmware.inc
index 355a55ed..44e428ff 100644
--- a/meta-xilinx-standalone/recipes-bsp/embeddedsw/plm-firmware.inc
+++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/plm-firmware.inc
@@ -65,7 +65,7 @@ do_install() {
65PACKAGES = "" 65PACKAGES = ""
66 66
67# This is the default in most BSPs. A MACHINE.conf can override this! 67# This is the default in most BSPs. A MACHINE.conf can override this!
68PLM_IMAGE_NAME ??= "plm-versal-mb" 68PLM_IMAGE_NAME ??= "plm-${MACHINE}"
69 69
70inherit image-artifact-names 70inherit image-artifact-names
71 71
diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/plmfw.bbappend b/meta-xilinx-standalone/recipes-bsp/embeddedsw/plmfw.bbappend
new file mode 100644
index 00000000..d63529ff
--- /dev/null
+++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/plmfw.bbappend
@@ -0,0 +1,17 @@
1# Include the versal-fw setting, if it's enabled
2PLMFW_INC = "${@bb.utils.contains('BBMULTICONFIG', 'versal-fw', 'versal-fw-cfg.inc', '', d)}"
3require ${PLMFW_INC}
4
5def check_plm_vars(d):
6 if not d.getVar('PLM_DEPENDS') and not d.getVar('PLM_MCDEPENDS') and not (d.getVar('BBMULTICONFIG') and 'versal-fw' in d.getVar('BBMULTICONFIG').split()):
7 msg = ""
8 fail = False
9 if not os.path.exists(d.getVar('PLM_FILE') + ".elf"):
10 msg = msg + "The expected file %s.elf is not available. " % d.getVar('PLM_FILE')
11 fail = True
12 if not os.path.exists(d.getVar('PLM_FILE') + ".bin"):
13 msg = msg + "The expected file %s.bin is not available. " % d.getVar('PLM_FILE')
14 fail = True
15 if fail:
16 d.setVar('BB_DONT_CACHE', '1')
17 raise bb.parse.SkipRecipe("%s\nEither specify PLM_FILE, or you may need to enable BBMULTICONFIG += 'versal-fw' to generate it." % msg)
diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware.inc b/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware.inc
index 22352fab..b789af5d 100644
--- a/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware.inc
+++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware.inc
@@ -64,7 +64,7 @@ do_install() {
64PACKAGES = "" 64PACKAGES = ""
65 65
66# This is the default in most BSPs. A MACHINE.conf can override this! 66# This is the default in most BSPs. A MACHINE.conf can override this!
67PMU_FIRMWARE_IMAGE_NAME ??= "pmu-firmware-zynqmp-pmu" 67PMU_FIRMWARE_IMAGE_NAME ??= "pmu-firmware-${MACHINE}"
68 68
69inherit image-artifact-names 69inherit image-artifact-names
70 70
diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmufw.bbappend b/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmufw.bbappend
new file mode 100644
index 00000000..947408a1
--- /dev/null
+++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmufw.bbappend
@@ -0,0 +1,17 @@
1# Include the zynqmp-pmufw setting, if it's enabled
2PMUFW_INC = "${@bb.utils.contains('BBMULTICONFIG', 'zynqmp-pmufw', 'zynqmp-pmufw-cfg.inc', '', d)}"
3require ${PMUFW_INC}
4
5def check_pmu_vars(d):
6 if not d.getVar('PMU_DEPENDS') and not d.getVar('PMU_MCDEPENDS') and not (d.getVar('BBMULTICONFIG') and 'zynqmp-pmufw' in d.getVar('BBMULTICONFIG').split()):
7 msg = ""
8 fail = False
9 if not os.path.exists(d.getVar('PMU_FILE') + ".elf"):
10 msg = msg + "The expected file %s.elf is not available. " % d.getVar('PMU_FILE')
11 fail = True
12 if not os.path.exists(d.getVar('PMU_FILE') + ".bin"):
13 msg = msg + "The expected file %s.bin is not available. " % d.getVar('PMU_FILE')
14 fail = True
15 if fail:
16 d.setVar('BB_DONT_CACHE', '1')
17 raise bb.parse.SkipRecipe("%s\nEither specify PMU_FILE, or you may need to enable BBMULTICONFIG += 'zynqmp-pmufw' to generate it." % msg)
diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/psm-firmware.inc b/meta-xilinx-standalone/recipes-bsp/embeddedsw/psm-firmware.inc
index 2bdae284..a7acfbb7 100644
--- a/meta-xilinx-standalone/recipes-bsp/embeddedsw/psm-firmware.inc
+++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/psm-firmware.inc
@@ -65,7 +65,7 @@ do_install() {
65PACKAGES = "" 65PACKAGES = ""
66 66
67# This is the default in most BSPs. A MACHINE.conf can override this! 67# This is the default in most BSPs. A MACHINE.conf can override this!
68PSM_FIRMWARE_IMAGE_NAME ??= "psm-firmware-versal-mb" 68PSM_FIRMWARE_IMAGE_NAME ??= "psm-firmware-${MACHINE}"
69 69
70inherit image-artifact-names 70inherit image-artifact-names
71 71
diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/psmfw.bbappend b/meta-xilinx-standalone/recipes-bsp/embeddedsw/psmfw.bbappend
new file mode 100644
index 00000000..8944152d
--- /dev/null
+++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/psmfw.bbappend
@@ -0,0 +1,17 @@
1# Include the versal-fw setting, if it's enabled
2PSMFW_INC = "${@bb.utils.contains('BBMULTICONFIG', 'versal-fw', 'versal-fw-cfg.inc', '', d)}"
3require ${PSMFW_INC}
4
5def check_psm_vars(d):
6 if not d.getVar('PSM_DEPENDS') and not d.getVar('PSM_MCDEPENDS') and not (d.getVar('BBMULTICONFIG') and 'versal-fw' in d.getVar('BBMULTICONFIG').split()):
7 msg = ""
8 fail = False
9 if not os.path.exists(d.getVar('PSM_FILE') + ".elf"):
10 msg = msg + "The expected file %s.elf is not available. " % d.getVar('PSM_FILE')
11 fail = True
12 if not os.path.exists(d.getVar('PSM_FILE') + ".bin"):
13 msg = msg + "The expected file %s.bin is not available. " % d.getVar('PSM_FILE')
14 fail = True
15 if fail:
16 d.setVar('BB_DONT_CACHE', '1')
17 raise bb.parse.SkipRecipe("%s\nEither specify PSM_FILE, or you may need to enable BBMULTICONFIG += 'versal-fw' to generate it." % msg)
diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/versal-fw-cfg.inc b/meta-xilinx-standalone/recipes-bsp/embeddedsw/versal-fw-cfg.inc
new file mode 100644
index 00000000..bae740e2
--- /dev/null
+++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/versal-fw-cfg.inc
@@ -0,0 +1,13 @@
1# Default fsbl configuration, using fsbl-fw multiconfig
2#
3# This requires MULTICONFIG += "versal-fw" to be added to local.conf
4PSM_DEPENDS ?= ""
5PSM_MCDEPENDS ?= "mc::versal-fw:psm-firmware:do_deploy"
6PSM_FIRMWARE_IMAGE_NAME ?= "psm-firmware-${MACHINE}"
7PSM_FIRMWARE_DEPLOY_DIR ?= "${TOPDIR}/tmp-microblaze-versal-fw/deploy/images/${MACHINE}"
8
9PLM_DEPENDS ?= ""
10PLM_MCDEPENDS ?= "mc::versal-fw:plm-firmware:do_deploy"
11PLM_IMAGE_NAME ?= "plm-${MACHINE}"
12PLM_DEPLOY_DIR ?= "${TOPDIR}/tmp-microblaze-versal-fw/deploy/images/${MACHINE}"
13
diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/zynqmp-pmufw-cfg.inc b/meta-xilinx-standalone/recipes-bsp/embeddedsw/zynqmp-pmufw-cfg.inc
new file mode 100644
index 00000000..982c4425
--- /dev/null
+++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/zynqmp-pmufw-cfg.inc
@@ -0,0 +1,7 @@
1# Default fsbl configuration, using fsbl-fw multiconfig
2#
3# This requires MULTICONFIG += "zynqmp-pmufw" to be added to local.conf
4PMU_DEPENDS ?= ""
5PMU_MCDEPENDS ?= "mc::zynqmp-pmufw:pmu-firmware:do_deploy"
6PMU_FIRMWARE_DEPLOY_DIR ?= "${TOPDIR}/tmp-microblaze-zynqmp-pmufw/deploy/images/${MACHINE}"
7PMU_FIRMWARE_IMAGE_NAME ?= "pmu-firmware-${MACHINE}"