summaryrefslogtreecommitdiffstats
path: root/meta-xilinx-standalone/recipes-bsp
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@xilinx.com>2022-01-21 12:53:12 -0800
committerMark Hatle <mark.hatle@xilinx.com>2022-01-23 12:19:43 -0800
commitf62aa1a14eb16d9afb06f56cc6297f6e79359471 (patch)
treea93a3845110315e5c75359890589a0ef9fb9a1c5 /meta-xilinx-standalone/recipes-bsp
parentb83d2f39168b680f6bdc95066832204509f3192b (diff)
downloadmeta-xilinx-f62aa1a14eb16d9afb06f56cc6297f6e79359471.tar.gz
embeddedsw: Rework the embeddedsw copy firmware recipes
fsbl, plmfw, pufw, and psmfw are reworked to provide earlier error messages, and better handle multiconfig builds. Also adjust MACHINE specific changes to use .* for compatibility based on the SOC_FAMILY override. The system doesn't always set the SOC_FAMILY as COMPATIBLE_MACHINE, so this avoids an error of incompatible machine. Align all of the expected firmware filenames to be <firmware>-${MACHINE}. The user can override as necessary. The license moves to CLOSED as we don't know the license of the software being provided by the user or other dependencies. It'll be up to the user to reconcile it. 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/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
10 files changed, 90 insertions, 3 deletions
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}"