summaryrefslogtreecommitdiffstats
path: root/meta-xilinx-core/conf/machine/versal-generic.conf
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@xilinx.com>2021-12-18 14:31:28 -0800
committerMark Hatle <mark.hatle@xilinx.com>2021-12-22 08:19:01 -0800
commitbf738f3461a6ff9bc375ca013e129cd00f3c8992 (patch)
tree5b320a241b2b9655a2d537f1392bb9f0d81b5212 /meta-xilinx-core/conf/machine/versal-generic.conf
parent4adaf83d38d0b7b743909f2eded91d5629c15ffd (diff)
downloadmeta-xilinx-bf738f3461a6ff9bc375ca013e129cd00f3c8992.tar.gz
Adjust generic BSPs to support the inheritance model
Each inherited BSP must set a MACHINEOVERRIDES and PACKAGE_EXTRA_ARCHS to ensure that various overrides can be set along the way. The general format for this is (in the caller): require conf/machine/<inherited machine>.conf The callee is responsible for adding to the MACHINEOVERRIDES and PACKAGE_EXTRA_ARCHS. It does this by setting the following at the beginning and end of the file, respectively. MACHINEOVERRIDES =. "${@['', '<machine>:']['<machine>' != '${MACHINE}']}" ... ... PACKAGE_EXTRA_ARCHS_append = "${@['', ' <machine_arch>']['<machine>' != '${MACHINE}']}" where <machine> is the <machine>.conf file the line appears in; <machine_arch> is the <machine>.replace('-', '_') (matching MACHINE_ARCH) if the machine file was used by itself. The MACHINEOVERRIDES uses =. or .= everywhere in the Yocto Project. Doing it via =. in the load order ensures in order evaluation. PACKAGE_EXTRA_ARCHS is set via 'append', but needs to be the last operation to ensure that we are always added AFTER anything we include along the way. Effectively this is a late binding evaluation. Signed-off-by: Mark Hatle <mark.hatle@xilinx.com>
Diffstat (limited to 'meta-xilinx-core/conf/machine/versal-generic.conf')
-rw-r--r--meta-xilinx-core/conf/machine/versal-generic.conf8
1 files changed, 8 insertions, 0 deletions
diff --git a/meta-xilinx-core/conf/machine/versal-generic.conf b/meta-xilinx-core/conf/machine/versal-generic.conf
index a5d99b75..3509d8c4 100644
--- a/meta-xilinx-core/conf/machine/versal-generic.conf
+++ b/meta-xilinx-core/conf/machine/versal-generic.conf
@@ -7,6 +7,10 @@ USE_BOARD = "${@"conf/machine/include/xilinx-board-pre.inc" if d.getVar("BOARD")
7require ${USE_BOARD} 7require ${USE_BOARD}
8unset USE_BOARD 8unset USE_BOARD
9 9
10#### Preamble
11MACHINEOVERRIDES =. "${@['', 'versal-generic:']['versal-generic' != '${MACHINE}']}"
12#### Regular settings follow
13
10require conf/machine/include/soc-versal.inc 14require conf/machine/include/soc-versal.inc
11require conf/machine/include/machine-xilinx-default.inc 15require conf/machine/include/machine-xilinx-default.inc
12require conf/machine/include/machine-xilinx-qemu.inc 16require conf/machine/include/machine-xilinx-qemu.inc
@@ -89,6 +93,10 @@ QB_PLM_OPT = " \
89 " 93 "
90QB_OPT_APPEND:append:qemuboot-xilinx = " -plm-args '${QB_PLM_OPT}'" 94QB_OPT_APPEND:append:qemuboot-xilinx = " -plm-args '${QB_PLM_OPT}'"
91 95
96#### No additional settings should be after the Postamble
97#### Postamble
98PACKAGE_EXTRA_ARCHS:append = "${@['', ' versal_generic']['versal-generic' != "${MACHINE}"]}"
99
92# Deprecated board config 100# Deprecated board config
93USE_BOARD = "${@"conf/machine/include/xilinx-board-post.inc" if d.getVar("BOARD") or d.getVar("BOARD_VARIANT") else ""}" 101USE_BOARD = "${@"conf/machine/include/xilinx-board-post.inc" if d.getVar("BOARD") or d.getVar("BOARD_VARIANT") else ""}"
94require ${USE_BOARD} 102require ${USE_BOARD}