summaryrefslogtreecommitdiffstats
path: root/meta-xilinx-core/conf/machine
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@amd.com>2022-11-15 11:51:14 -0800
committerMark Hatle <mark.hatle@amd.com>2022-11-15 11:51:14 -0800
commit398f4afbe0d8d063f368dd5d8f7bd1a14af28f35 (patch)
treeb178eb780b425cdba18cb4d9ebad4110b6b28810 /meta-xilinx-core/conf/machine
parent1feb581fd2784d176e6e3847e0db0c5fedea7fe0 (diff)
parentfb27f36ad989478bde5896b70886dd264975bd21 (diff)
downloadmeta-xilinx-398f4afbe0d8d063f368dd5d8f7bd1a14af28f35.tar.gz
Merge remote-tracking branch 'langdale' into 2023
Signed-off-by: Mark Hatle <mark.hatle@amd.com>
Diffstat (limited to 'meta-xilinx-core/conf/machine')
-rw-r--r--meta-xilinx-core/conf/machine/README98
-rw-r--r--meta-xilinx-core/conf/machine/include/machine-xilinx-default.inc3
-rw-r--r--meta-xilinx-core/conf/machine/include/soc-tune-include.inc3
-rw-r--r--meta-xilinx-core/conf/machine/include/soc-zynqmp.inc4
-rw-r--r--meta-xilinx-core/conf/machine/versal-ai-core-generic.conf12
-rw-r--r--meta-xilinx-core/conf/machine/versal-ai-edge-generic.conf12
-rw-r--r--meta-xilinx-core/conf/machine/versal-hbm-generic.conf12
-rw-r--r--meta-xilinx-core/conf/machine/versal-net-generic.conf8
-rw-r--r--meta-xilinx-core/conf/machine/versal-premium-generic.conf12
-rw-r--r--meta-xilinx-core/conf/machine/versal-prime-generic.conf12
-rw-r--r--meta-xilinx-core/conf/machine/zynqmp-cg-generic.conf12
-rw-r--r--meta-xilinx-core/conf/machine/zynqmp-dr-generic.conf12
-rw-r--r--meta-xilinx-core/conf/machine/zynqmp-eg-generic.conf12
-rw-r--r--meta-xilinx-core/conf/machine/zynqmp-ev-generic.conf12
-rw-r--r--meta-xilinx-core/conf/machine/zynqmp-generic.conf3
15 files changed, 206 insertions, 21 deletions
diff --git a/meta-xilinx-core/conf/machine/README b/meta-xilinx-core/conf/machine/README
index f455eb84..5361dc81 100644
--- a/meta-xilinx-core/conf/machine/README
+++ b/meta-xilinx-core/conf/machine/README
@@ -11,8 +11,12 @@ can be implements as:
11k26_kv -> k26 -> zynqmp-ev-generic -> zynqmp-generic 11k26_kv -> k26 -> zynqmp-ev-generic -> zynqmp-generic
12 12
13The above needs to result MACHINEOVERRIDES and PACKAGE_ARCHS that include 13The above needs to result MACHINEOVERRIDES and PACKAGE_ARCHS that include
14all 4 machines. To accomplish this, each machine.conf file should contain 14all 4 machines. This facilitates sstate-cache and binary distribution
15the following preamble and postamble. 15package re-use.
16
17To accomplish this, each machine.conf file should contain the following
18preamble and postamble. This ensures that the machine overrides and
19package archs can be extended by another machine configuration file.
16 20
17#### Preamble 21#### Preamble
18MACHINEOVERRIDES =. "${@['', '<machine>:']['<machine>' != '${MACHINE}']}" 22MACHINEOVERRIDES =. "${@['', '<machine>:']['<machine>' != '${MACHINE}']}"
@@ -24,10 +28,13 @@ MACHINEOVERRIDES =. "${@['', '<machine>:']['<machine>' != '${MACHINE}']}"
24PACKAGE_EXTRA_ARCHS:append = "${@['', ' <machine_arch>']['<machine>' != "${MACHINE}"]}" 28PACKAGE_EXTRA_ARCHS:append = "${@['', ' <machine_arch>']['<machine>' != "${MACHINE}"]}"
25 29
26 30
27Typically the first thing after the preamble will be a requires of the machine 31Between the Preamble and Postamble, you should "require" the machine
28configuration that we depend on. After the machine would be changes to various 32configuration that your machine is based on. After the 'require' is where
29defaults. The exception is when a different microblaze tune and/or defaulttune 33most variables should be defined. (See variable requirements at the end
30is desired; these must be set before require of the inherited machine. 34of this document.) This will allow you to extend other configurations
35to match your specific requirements. Values should be set using = and
36+=, but not :append or :prepend. This allows a machine inheriting your
37machine file to add or overwrite the value easily. Such as:
31 38
32Typical case example (my-example.conf): 39Typical case example (my-example.conf):
33 40
@@ -35,7 +42,7 @@ Typical case example (my-example.conf):
35MACHINEOVERRIDES =. "${@['', 'my-example:']['my-example' != '${MACHINE}']}" 42MACHINEOVERRIDES =. "${@['', 'my-example:']['my-example' != '${MACHINE}']}"
36#### Regular settings follow 43#### Regular settings follow
37 44
38require conf/machine/zynqmp-ev-generic.conf 45require conf/machine/zynqmp-generic.conf
39 46
40HDF_MACHINE = "zcu102-zynqmp" 47HDF_MACHINE = "zcu102-zynqmp"
41MACHINE_FEATURES += "pci" 48MACHINE_FEATURES += "pci"
@@ -45,15 +52,20 @@ MACHINE_FEATURES += "pci"
45PACKAGE_EXTRA_ARCHS:append = "${@['', ' my_example']['my-example' != "${MACHINE}"]}" 52PACKAGE_EXTRA_ARCHS:append = "${@['', ' my_example']['my-example' != "${MACHINE}"]}"
46 53
47 54
55A few variable must be set BEFORE the requires, DEFAULTTUNE for example.
56(See variable requirements at the end of this document.) Usually ?= is the
57correct way to set these, as the machine inheriting your machine may need
58to override the value.
59
48Example of defaulttune override: 60Example of defaulttune override:
49 61
50#### Preamble 62#### Preamble
51MACHINEOVERRIDES =. "${@['', 'my-example:']['my-example' != '${MACHINE}']}" 63MACHINEOVERRIDES =. "${@['', 'my-example:']['my-example' != '${MACHINE}']}"
52#### Regular settings follow 64#### Regular settings follow
53 65
54DEFAULTTUNE = "aarch64" 66DEFAULTTUNE ?= "aarch64"
55 67
56require conf/machine/zynqmp-ev-generic.conf 68require conf/machine/zynqmp-generic.conf
57 69
58HDF_MACHINE = "zcu102-zynqmp" 70HDF_MACHINE = "zcu102-zynqmp"
59MACHINE_FEATURES += "pci" 71MACHINE_FEATURES += "pci"
@@ -63,6 +75,9 @@ MACHINE_FEATURES += "pci"
63PACKAGE_EXTRA_ARCHS:append = "${@['', ' my_example']['my-example' != "${MACHINE}"]}" 75PACKAGE_EXTRA_ARCHS:append = "${@['', ' my_example']['my-example' != "${MACHINE}"]}"
64 76
65 77
78Additionally, for microblaze you may need to define a specific microblaze
79tune-features. Like DEFAULTTUNE, this needs to be set before the require line.
80
66Example of microblaze tune override: 81Example of microblaze tune override:
67 82
68#### Preamble 83#### Preamble
@@ -79,3 +94,68 @@ SERIAL_CONSOLE = "115200,ttyUL0"
79#### No additional settings should be after the Postamble 94#### No additional settings should be after the Postamble
80#### Postamble 95#### Postamble
81PACKAGE_EXTRA_ARCHS:append = "${@['', ' my_example']['my-example' != "${MACHINE}"]}" 96PACKAGE_EXTRA_ARCHS:append = "${@['', ' my_example']['my-example' != "${MACHINE}"]}"
97
98
99Variable Requirements
100=====================
101
102The question has been raised why we don't use ?= or ??= for all default
103values, instead we rely on specific ordering of the override components?
104
105This is done intentionally, as it forces the user to create a new machine
106configuration file to extend their system. In the past, it was common
107for people to just set values in their local.conf file, but this lead to
108problems reproducing success and failures, as well as trying to support
109the overall configuration. Moving to a model where most variables must
110be added to, or replaced after the require has simplified this model.
111There are a few exception, these will be covered first.
112
113The following variables must be set using ?= BEFORE the 'require' line
114of the inherited base machine .conf file. This is due to them being
115used to control inclusion of tune data.
116
117DEFAULTTUNE - Default Tune for this machine
118
119TUNEFILE[<tune>] - The tune file, based on DEFAULTTUNE, to load
120
121For DEFAULTTUNE, see the Yocto Project documentation. For
122TUNEFILE[<tune>] see include/soc-tune-include.inc for the defined ones.
123
124
125The following variables should be set using ?= BEFORE the 'require' line
126of the inherited base machine .conf file, if the user may override them.
127If the values are fixed, then it should be set after the requires per
128the next section.
129
130These are common values a user may want to override and will let the user
131easiy make a local change, if allowed by the machine .conf:
132
133UBOOT_MACHINE - The defconfig for u-boot. (Note, this may be an error TBD).
134
135SOC_VARIANT - See include/soc-*.inc (Note, most machines this is fixed).
136
137
138The following variables must be set AFTER the 'require' line, using '='
139or '+='/'=+' as required. Using ':append', ':prepend', or ':remove' will
140prevent an inheriting machine from overriding that value. Similarly
141you should not use :<machine> override values for the same reason. Note,
142not every machine file will have all of these variables, only the ones
143you need to override should be set.
144
145System wide setting:
146TUNE_FEATURES:tune-<tune> - Specific tune features
147
148external-hdf recipe from meta-xilinx-tools:
149HDF_MACHINE - Used by the recipe to find the correct XSA
150HDF_EXT - only xsa is supported, legacy variable
151HDF_BASE - protocol if not using the default external-hdf repository
152HDF_PATH - path to the repository or XSA file
153
154device-tree recipe from meta-xilinx-tools:
155YAML_DT_BOARD_FLAGS - flags used for dtgen
156
157u-boot-xlnx recipe from meta-xilinx-core:
158UBOOT_MACHINE - Name of the defconfig to use
159HAS_PLATFORM_INIT - List of defconfig files available for u-boot
160
161...and more...
diff --git a/meta-xilinx-core/conf/machine/include/machine-xilinx-default.inc b/meta-xilinx-core/conf/machine/include/machine-xilinx-default.inc
index 7d3d45f3..06203985 100644
--- a/meta-xilinx-core/conf/machine/include/machine-xilinx-default.inc
+++ b/meta-xilinx-core/conf/machine/include/machine-xilinx-default.inc
@@ -1,3 +1,6 @@
1# HDF_MACHINE should be set _AFTER_ this has been loaded
2HDF_MACHINE_PRIOR := "${HDF_MACHINE}"
3INHERIT += "xilinx-vars"
1INHERIT += "xilinx-deprecated" 4INHERIT += "xilinx-deprecated"
2 5
3# Default Xilinx BSP Machine settings 6# Default Xilinx BSP Machine settings
diff --git a/meta-xilinx-core/conf/machine/include/soc-tune-include.inc b/meta-xilinx-core/conf/machine/include/soc-tune-include.inc
index 539879d4..ad58cf92 100644
--- a/meta-xilinx-core/conf/machine/include/soc-tune-include.inc
+++ b/meta-xilinx-core/conf/machine/include/soc-tune-include.inc
@@ -10,6 +10,9 @@ TUNEFILE[cortexa72] = "conf/machine/include/arm/armv8a/tune-cortexa72.inc"
10TUNEFILE[cortexa72-cortexa53] = "conf/machine/include/arm/armv8a/tune-cortexa72-cortexa53.inc" 10TUNEFILE[cortexa72-cortexa53] = "conf/machine/include/arm/armv8a/tune-cortexa72-cortexa53.inc"
11TUNEFILE[microblaze] = "conf/machine/include/xilinx-microblaze.inc" 11TUNEFILE[microblaze] = "conf/machine/include/xilinx-microblaze.inc"
12 12
13# Capture the defaulttune, to make sure it's been modified in the right order
14DEFAULTTUNE_PRIOR := "${DEFAULTTUNE}"
15
13# Default to arch-armv8a.inc 16# Default to arch-armv8a.inc
14TUNEFILE = "${@ d.getVarFlag('TUNEFILE', d.getVar('DEFAULTTUNE')) or 'conf/machine/include/arm/arch-armv8a.inc'}" 17TUNEFILE = "${@ d.getVarFlag('TUNEFILE', d.getVar('DEFAULTTUNE')) or 'conf/machine/include/arm/arch-armv8a.inc'}"
15 18
diff --git a/meta-xilinx-core/conf/machine/include/soc-zynqmp.inc b/meta-xilinx-core/conf/machine/include/soc-zynqmp.inc
index 0ae23b01..bdb72194 100644
--- a/meta-xilinx-core/conf/machine/include/soc-zynqmp.inc
+++ b/meta-xilinx-core/conf/machine/include/soc-zynqmp.inc
@@ -2,12 +2,12 @@ DEFAULTTUNE ?= "cortexa72-cortexa53"
2SOC_FAMILY ?= "zynqmp" 2SOC_FAMILY ?= "zynqmp"
3 3
4# Available SOC_VARIANT's for zynqmp: 4# Available SOC_VARIANT's for zynqmp:
5# "cg" - Zynq UltraScale+ CG Devices 5# "cg" - Zynq UltraScale+ CG Devices (default lowest common denominator)
6# "eg" - Zynq UltraScale+ EG Devices 6# "eg" - Zynq UltraScale+ EG Devices
7# "ev" - Zynq UltraScale+ EV Devices 7# "ev" - Zynq UltraScale+ EV Devices
8# "dr" - Zynq UltraScale+ DR Devices 8# "dr" - Zynq UltraScale+ DR Devices
9 9
10SOC_VARIANT ?= "eg" 10SOC_VARIANT ?= "cg"
11 11
12GRAPHICSOVERRIDES = "" 12GRAPHICSOVERRIDES = ""
13VCUOVERRIDES = "" 13VCUOVERRIDES = ""
diff --git a/meta-xilinx-core/conf/machine/versal-ai-core-generic.conf b/meta-xilinx-core/conf/machine/versal-ai-core-generic.conf
new file mode 100644
index 00000000..34f57691
--- /dev/null
+++ b/meta-xilinx-core/conf/machine/versal-ai-core-generic.conf
@@ -0,0 +1,12 @@
1#### Preamble
2MACHINEOVERRIDES =. "${@['', 'versal-ai-core-generic:']['versal-ai-core-generic' != '${MACHINE}']}"
3#### Regular settings follow
4
5require conf/machine/versal-generic.conf
6
7SOC_VARIANT = "ai-core"
8
9#### No additional settings should be after the Postamble
10#### Postamble
11PACKAGE_EXTRA_ARCHS:append = "${@['', ' versal_ai_core_generic']['versal-ai-core-generic' != "${MACHINE}"]}"
12
diff --git a/meta-xilinx-core/conf/machine/versal-ai-edge-generic.conf b/meta-xilinx-core/conf/machine/versal-ai-edge-generic.conf
new file mode 100644
index 00000000..bf5523ed
--- /dev/null
+++ b/meta-xilinx-core/conf/machine/versal-ai-edge-generic.conf
@@ -0,0 +1,12 @@
1#### Preamble
2MACHINEOVERRIDES =. "${@['', 'versal-ai-edge-generic:']['versal-ai-edge-generic' != '${MACHINE}']}"
3#### Regular settings follow
4
5require conf/machine/versal-generic.conf
6
7SOC_VARIANT = "ai-edge"
8
9#### No additional settings should be after the Postamble
10#### Postamble
11PACKAGE_EXTRA_ARCHS:append = "${@['', ' versal_ai_edge_generic']['versal-ai-edge-generic' != "${MACHINE}"]}"
12
diff --git a/meta-xilinx-core/conf/machine/versal-hbm-generic.conf b/meta-xilinx-core/conf/machine/versal-hbm-generic.conf
new file mode 100644
index 00000000..23fffcb9
--- /dev/null
+++ b/meta-xilinx-core/conf/machine/versal-hbm-generic.conf
@@ -0,0 +1,12 @@
1#### Preamble
2MACHINEOVERRIDES =. "${@['', 'versal-hbm-generic:']['versal-hbm-generic' != '${MACHINE}']}"
3#### Regular settings follow
4
5require conf/machine/versal-generic.conf
6
7SOC_VARIANT = "hbm"
8
9#### No additional settings should be after the Postamble
10#### Postamble
11PACKAGE_EXTRA_ARCHS:append = "${@['', ' versal_hbm_generic']['versal-hbm-generic' != "${MACHINE}"]}"
12
diff --git a/meta-xilinx-core/conf/machine/versal-net-generic.conf b/meta-xilinx-core/conf/machine/versal-net-generic.conf
index 1941235a..7b410aaa 100644
--- a/meta-xilinx-core/conf/machine/versal-net-generic.conf
+++ b/meta-xilinx-core/conf/machine/versal-net-generic.conf
@@ -6,18 +6,12 @@
6MACHINEOVERRIDES =. "${@['', 'versal-net-generic:']['versal-net-generic' != '${MACHINE}']}" 6MACHINEOVERRIDES =. "${@['', 'versal-net-generic:']['versal-net-generic' != '${MACHINE}']}"
7#### Regular settings follow 7#### Regular settings follow
8 8
9SOC_VARIANT = "net"
10
11# Must be set first, or versal-generic will set it 9# Must be set first, or versal-generic will set it
12UBOOT_MACHINE ?= "xilinx_versal_net_virt_defconfig" 10UBOOT_MACHINE ?= "xilinx_versal_net_virt_defconfig"
13 11
14require conf/machine/versal-generic.conf 12require conf/machine/versal-generic.conf
15 13
16#### REMOVE THE FOLLOWING WHEN BOOTGEN IS SYNCED 14SOC_VARIANT = "net"
17# required for bootgen native/nativesdk
18MACHINEOVERRIDES:class-native = "versal-net"
19MACHINEOVERRIDES:class-nativesdk = "versal-net"
20#### REMOVE THE ABOVE
21 15
22HDF_MACHINE = "versal-net-generic" 16HDF_MACHINE = "versal-net-generic"
23 17
diff --git a/meta-xilinx-core/conf/machine/versal-premium-generic.conf b/meta-xilinx-core/conf/machine/versal-premium-generic.conf
new file mode 100644
index 00000000..d785edff
--- /dev/null
+++ b/meta-xilinx-core/conf/machine/versal-premium-generic.conf
@@ -0,0 +1,12 @@
1#### Preamble
2MACHINEOVERRIDES =. "${@['', 'versal-premium-generic:']['versal-premium-generic' != '${MACHINE}']}"
3#### Regular settings follow
4
5require conf/machine/versal-generic.conf
6
7SOC_VARIANT = "premium"
8
9#### No additional settings should be after the Postamble
10#### Postamble
11PACKAGE_EXTRA_ARCHS:append = "${@['', ' versal_premium_generic']['versal-premium-generic' != "${MACHINE}"]}"
12
diff --git a/meta-xilinx-core/conf/machine/versal-prime-generic.conf b/meta-xilinx-core/conf/machine/versal-prime-generic.conf
new file mode 100644
index 00000000..94e9b05e
--- /dev/null
+++ b/meta-xilinx-core/conf/machine/versal-prime-generic.conf
@@ -0,0 +1,12 @@
1#### Preamble
2MACHINEOVERRIDES =. "${@['', 'versal-prime-generic:']['versal-prime-generic' != '${MACHINE}']}"
3#### Regular settings follow
4
5require conf/machine/versal-generic.conf
6
7SOC_VARIANT = "prime"
8
9#### No additional settings should be after the Postamble
10#### Postamble
11PACKAGE_EXTRA_ARCHS:append = "${@['', ' versal_prime_generic']['versal-prime-generic' != "${MACHINE}"]}"
12
diff --git a/meta-xilinx-core/conf/machine/zynqmp-cg-generic.conf b/meta-xilinx-core/conf/machine/zynqmp-cg-generic.conf
new file mode 100644
index 00000000..38c9126f
--- /dev/null
+++ b/meta-xilinx-core/conf/machine/zynqmp-cg-generic.conf
@@ -0,0 +1,12 @@
1#### Preamble
2MACHINEOVERRIDES =. "${@['', 'zynqmp-cg-generic:']['zynqmp-cg-generic' != '${MACHINE}']}"
3#### Regular settings follow
4
5require conf/machine/zynqmp-generic.conf
6
7SOC_VARIANT = "cg"
8
9#### No additional settings should be after the Postamble
10#### Postamble
11PACKAGE_EXTRA_ARCHS:append = "${@['', ' zynqmp_cg_generic']['zynqmp-cg-generic' != "${MACHINE}"]}"
12
diff --git a/meta-xilinx-core/conf/machine/zynqmp-dr-generic.conf b/meta-xilinx-core/conf/machine/zynqmp-dr-generic.conf
new file mode 100644
index 00000000..fbe445aa
--- /dev/null
+++ b/meta-xilinx-core/conf/machine/zynqmp-dr-generic.conf
@@ -0,0 +1,12 @@
1#### Preamble
2MACHINEOVERRIDES =. "${@['', 'zynqmp-dr-generic:']['zynqmp-dr-generic' != '${MACHINE}']}"
3#### Regular settings follow
4
5require conf/machine/zynqmp-generic.conf
6
7SOC_VARIANT = "dr"
8
9#### No additional settings should be after the Postamble
10#### Postamble
11PACKAGE_EXTRA_ARCHS:append = "${@['', ' zynqmp_dr_generic']['zynqmp-dr-generic' != "${MACHINE}"]}"
12
diff --git a/meta-xilinx-core/conf/machine/zynqmp-eg-generic.conf b/meta-xilinx-core/conf/machine/zynqmp-eg-generic.conf
new file mode 100644
index 00000000..33375b46
--- /dev/null
+++ b/meta-xilinx-core/conf/machine/zynqmp-eg-generic.conf
@@ -0,0 +1,12 @@
1#### Preamble
2MACHINEOVERRIDES =. "${@['', 'zynqmp-eg-generic:']['zynqmp-eg-generic' != '${MACHINE}']}"
3#### Regular settings follow
4
5require conf/machine/zynqmp-generic.conf
6
7SOC_VARIANT = "eg"
8
9#### No additional settings should be after the Postamble
10#### Postamble
11PACKAGE_EXTRA_ARCHS:append = "${@['', ' zynqmp_eg_generic']['zynqmp-eg-generic' != "${MACHINE}"]}"
12
diff --git a/meta-xilinx-core/conf/machine/zynqmp-ev-generic.conf b/meta-xilinx-core/conf/machine/zynqmp-ev-generic.conf
new file mode 100644
index 00000000..f2ffe40f
--- /dev/null
+++ b/meta-xilinx-core/conf/machine/zynqmp-ev-generic.conf
@@ -0,0 +1,12 @@
1#### Preamble
2MACHINEOVERRIDES =. "${@['', 'zynqmp-ev-generic:']['zynqmp-ev-generic' != '${MACHINE}']}"
3#### Regular settings follow
4
5require conf/machine/zynqmp-generic.conf
6
7SOC_VARIANT = "ev"
8
9#### No additional settings should be after the Postamble
10#### Postamble
11PACKAGE_EXTRA_ARCHS:append = "${@['', ' zynqmp_ev_generic']['zynqmp-ev-generic' != "${MACHINE}"]}"
12
diff --git a/meta-xilinx-core/conf/machine/zynqmp-generic.conf b/meta-xilinx-core/conf/machine/zynqmp-generic.conf
index 32de4d50..c375d8e5 100644
--- a/meta-xilinx-core/conf/machine/zynqmp-generic.conf
+++ b/meta-xilinx-core/conf/machine/zynqmp-generic.conf
@@ -11,9 +11,6 @@ unset USE_BOARD
11MACHINEOVERRIDES =. "${@['', 'zynqmp-generic:']['zynqmp-generic' != '${MACHINE}']}" 11MACHINEOVERRIDES =. "${@['', 'zynqmp-generic:']['zynqmp-generic' != '${MACHINE}']}"
12#### Regular settings follow 12#### Regular settings follow
13 13
14# CG is the lowest common demoninator, so use this by default
15SOC_VARIANT ?= "cg"
16
17require conf/machine/include/soc-zynqmp.inc 14require conf/machine/include/soc-zynqmp.inc
18require conf/machine/include/machine-xilinx-default.inc 15require conf/machine/include/machine-xilinx-default.inc
19require conf/machine/include/machine-xilinx-qemu.inc 16require conf/machine/include/machine-xilinx-qemu.inc