diff options
| author | Mark Hatle <mark.hatle@xilinx.com> | 2021-12-18 14:31:28 -0800 |
|---|---|---|
| committer | Mark Hatle <mark.hatle@xilinx.com> | 2021-12-22 08:19:01 -0800 |
| commit | bf738f3461a6ff9bc375ca013e129cd00f3c8992 (patch) | |
| tree | 5b320a241b2b9655a2d537f1392bb9f0d81b5212 /meta-xilinx-core/conf/machine/versal-generic.conf | |
| parent | 4adaf83d38d0b7b743909f2eded91d5629c15ffd (diff) | |
| download | meta-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.conf | 8 |
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") | |||
| 7 | require ${USE_BOARD} | 7 | require ${USE_BOARD} |
| 8 | unset USE_BOARD | 8 | unset USE_BOARD |
| 9 | 9 | ||
| 10 | #### Preamble | ||
| 11 | MACHINEOVERRIDES =. "${@['', 'versal-generic:']['versal-generic' != '${MACHINE}']}" | ||
| 12 | #### Regular settings follow | ||
| 13 | |||
| 10 | require conf/machine/include/soc-versal.inc | 14 | require conf/machine/include/soc-versal.inc |
| 11 | require conf/machine/include/machine-xilinx-default.inc | 15 | require conf/machine/include/machine-xilinx-default.inc |
| 12 | require conf/machine/include/machine-xilinx-qemu.inc | 16 | require conf/machine/include/machine-xilinx-qemu.inc |
| @@ -89,6 +93,10 @@ QB_PLM_OPT = " \ | |||
| 89 | " | 93 | " |
| 90 | QB_OPT_APPEND:append:qemuboot-xilinx = " -plm-args '${QB_PLM_OPT}'" | 94 | QB_OPT_APPEND:append:qemuboot-xilinx = " -plm-args '${QB_PLM_OPT}'" |
| 91 | 95 | ||
| 96 | #### No additional settings should be after the Postamble | ||
| 97 | #### Postamble | ||
| 98 | PACKAGE_EXTRA_ARCHS:append = "${@['', ' versal_generic']['versal-generic' != "${MACHINE}"]}" | ||
| 99 | |||
| 92 | # Deprecated board config | 100 | # Deprecated board config |
| 93 | USE_BOARD = "${@"conf/machine/include/xilinx-board-post.inc" if d.getVar("BOARD") or d.getVar("BOARD_VARIANT") else ""}" | 101 | USE_BOARD = "${@"conf/machine/include/xilinx-board-post.inc" if d.getVar("BOARD") or d.getVar("BOARD_VARIANT") else ""}" |
| 94 | require ${USE_BOARD} | 102 | require ${USE_BOARD} |
