summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@xilinx.com>2021-12-18 14:31:28 -0800
committerMark Hatle <mark.hatle@xilinx.com>2022-01-14 15:37:05 -0800
commit81a6bfd7943bafb4b26db650ad2af453868d60f0 (patch)
treec8d3e0a9e7a3869e2cb7d19823681cbdb2f3591c
parent4501eaa3c6eac161ec0aaec87d7b648361552912 (diff)
downloadmeta-xilinx-81a6bfd7943bafb4b26db650ad2af453868d60f0.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>
-rw-r--r--meta-xilinx-core/conf/machine/microblaze-generic.conf8
-rw-r--r--meta-xilinx-core/conf/machine/versal-generic.conf8
-rw-r--r--meta-xilinx-core/conf/machine/zynq-generic.conf8
-rw-r--r--meta-xilinx-core/conf/machine/zynqmp-generic.conf8
4 files changed, 32 insertions, 0 deletions
diff --git a/meta-xilinx-core/conf/machine/microblaze-generic.conf b/meta-xilinx-core/conf/machine/microblaze-generic.conf
index 0ba5b80a..9004282a 100644
--- a/meta-xilinx-core/conf/machine/microblaze-generic.conf
+++ b/meta-xilinx-core/conf/machine/microblaze-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 =. "${@['', 'microblaze-generic:']['microblaze-generic' != '${MACHINE}']}"
12#### Regular settings follow
13
10# Set the default for a modern full feature microblaze... 14# Set the default for a modern full feature microblaze...
11TUNE_FEATURES:tune-microblaze ?= "microblaze v11.0 barrel-shift pattern-compare reorder divide-hard multiply-high" 15TUNE_FEATURES:tune-microblaze ?= "microblaze v11.0 barrel-shift pattern-compare reorder divide-hard multiply-high"
12DEFAULTTUNE ?= "microblaze" 16DEFAULTTUNE ?= "microblaze"
@@ -35,6 +39,10 @@ EXTRA_IMAGEDEPENDS += "libyaml-native python3-cython-native python3-pyyaml-nativ
35UBOOT_MACHINE ?= "microblaze-generic_defconfig" 39UBOOT_MACHINE ?= "microblaze-generic_defconfig"
36UBOOT_INITIAL_ENV = "" 40UBOOT_INITIAL_ENV = ""
37 41
42#### No additional settings should be after the Postamble
43#### Postamble
44PACKAGE_EXTRA_ARCHS:append = "${@['', ' ${MB_MACHINE_ARCH}']['microblaze-generic' != "${MACHINE}"]}"
45
38# Deprecated board config 46# Deprecated board config
39USE_BOARD = "${@"conf/machine/include/xilinx-board-post.inc" if d.getVar("BOARD") or d.getVar("BOARD_VARIANT") else ""}" 47USE_BOARD = "${@"conf/machine/include/xilinx-board-post.inc" if d.getVar("BOARD") or d.getVar("BOARD_VARIANT") else ""}"
40require ${USE_BOARD} 48require ${USE_BOARD}
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}
diff --git a/meta-xilinx-core/conf/machine/zynq-generic.conf b/meta-xilinx-core/conf/machine/zynq-generic.conf
index 4a903282..3271051d 100644
--- a/meta-xilinx-core/conf/machine/zynq-generic.conf
+++ b/meta-xilinx-core/conf/machine/zynq-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 =. "${@['', 'zynq-generic:']['zynq-generic' != '${MACHINE}']}"
12#### Regular settings follow
13
10require conf/machine/include/soc-zynq.inc 14require conf/machine/include/soc-zynq.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
@@ -44,6 +48,10 @@ QB_OPT_APPEND = " \
44 -device loader,addr=0xF8000910,data=0xF,data-len=0x4 \ 48 -device loader,addr=0xF8000910,data=0xF,data-len=0x4 \
45 " 49 "
46 50
51#### No additional settings should be after the Postamble
52#### Postamble
53PACKAGE_EXTRA_ARCHS:append = "${@['', ' zynq_generic']['zynq-generic' != "${MACHINE}"]}"
54
47# Deprecated board config 55# Deprecated board config
48USE_BOARD = "${@"conf/machine/include/xilinx-board-post.inc" if d.getVar("BOARD") or d.getVar("BOARD_VARIANT") else ""}" 56USE_BOARD = "${@"conf/machine/include/xilinx-board-post.inc" if d.getVar("BOARD") or d.getVar("BOARD_VARIANT") else ""}"
49require ${USE_BOARD} 57require ${USE_BOARD}
diff --git a/meta-xilinx-core/conf/machine/zynqmp-generic.conf b/meta-xilinx-core/conf/machine/zynqmp-generic.conf
index 317b3fc7..7f89b958 100644
--- a/meta-xilinx-core/conf/machine/zynqmp-generic.conf
+++ b/meta-xilinx-core/conf/machine/zynqmp-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 =. "${@['', 'zynqmp-generic:']['zynqmp-generic' != '${MACHINE}']}"
12#### Regular settings follow
13
10# CG is the lowest common demoninator, so use this by default 14# CG is the lowest common demoninator, so use this by default
11SOC_VARIANT ?= "cg" 15SOC_VARIANT ?= "cg"
12 16
@@ -85,6 +89,10 @@ QB_OPT_APPEND:append:qemuboot-xilinx = " -pmu-args '${QB_PMU_OPT}'"
85 89
86do_write_qemuboot_conf[depends] += "u-boot-zynq-uenv:do_deploy" 90do_write_qemuboot_conf[depends] += "u-boot-zynq-uenv:do_deploy"
87 91
92#### No additional settings should be after the Postamble
93#### Postamble
94PACKAGE_EXTRA_ARCHS:append = "${@['', ' zynqmp_generic']['zynqmp-generic' != "${MACHINE}"]}"
95
88# Deprecated board config 96# Deprecated board config
89USE_BOARD = "${@"conf/machine/include/xilinx-board-post.inc" if d.getVar("BOARD") or d.getVar("BOARD_VARIANT") else ""}" 97USE_BOARD = "${@"conf/machine/include/xilinx-board-post.inc" if d.getVar("BOARD") or d.getVar("BOARD_VARIANT") else ""}"
90require ${USE_BOARD} 98require ${USE_BOARD}