summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSandeep Gundlupet Raju <sandeep.gundlupet-raju@amd.com>2024-10-18 17:11:37 -0600
committerMark Hatle <mark.hatle@amd.com>2024-10-22 10:06:24 -0500
commitfe63e09cebaa75c330b56270040bd880ad0b0a53 (patch)
treefbdf5c4c59b5202cccd697d3f5f0c770b77d8d89
parent820a2c901df932ff10d0f96615b8a49789ea6d97 (diff)
downloadmeta-xilinx-fe63e09cebaa75c330b56270040bd880ad0b0a53.tar.gz
README.sdt.bsp.md: Add SDT build instructions
1. Move all SDT build instruction from README.md to README.xsct.bsp.md 2. Add instructions for generating SDT machine configuration files for custom board or design sdt files. Signed-off-by: Sandeep Gundlupet Raju <sandeep.gundlupet-raju@amd.com> Signed-off-by: Mark Hatle <mark.hatle@amd.com>
-rw-r--r--meta-xilinx-standalone-sdt/README.sdt.bsp.md204
1 files changed, 165 insertions, 39 deletions
diff --git a/meta-xilinx-standalone-sdt/README.sdt.bsp.md b/meta-xilinx-standalone-sdt/README.sdt.bsp.md
index 2b2ce4b0..eb1f852f 100644
--- a/meta-xilinx-standalone-sdt/README.sdt.bsp.md
+++ b/meta-xilinx-standalone-sdt/README.sdt.bsp.md
@@ -1,46 +1,172 @@
1# SDT BSP 1# AMD SDT BSP Machines files
2 2
3This section describes the SDT BSP settings which must be added to the generated 3This section describes the SDT BSP machine files generation.
4machine configuration file, following [Build Instructions](README.md) step 4, in
5order to use the runqemu command.
6 4
7## SDT BSP settings 5## SDT Build Instructions
8 6
9The following board settings need to be added in sdt machine configuration file 7The Yocto Project setup for the System Device Tree (SDT) workflow is as follows.
10to define which QEMU device trees should be used. 8Be sure to read everything below.
11 9
12> **Variable usage examples:** 10> **Pre-requisites:**
11> * Follow [System Device Tree Instructions](https://github.com/Xilinx/system-device-tree-xlnx/blob/master/README.md)
12> to generate the SDT output.
13> * To use the SDT version of the embedded software (firmware) as well as system
14> configuration, you must build through gen-machineconf tool. This tool is passed
15> a output of system device tree directory.
16
17> **Note:** SDT builds for following devices are not supported in 2024.2 release.
18> * MicroBlaze
19
201. Follow [Building Instructions](../README.building.md) upto step 6.
21
222. Clone the meta-openamp repository.
23```
24$ cd ../sources
25$ git clone -b <rel-version> https://github.com/Xilinx/meta-openamp
26$ cd -
27```
283. Add meta-openamp layer.
29```
30$ bitbake-layers add-layer ./<path-to-layer>/meta-openamp
31```
32
334. Export gen-machineconf tool.
34```
35$ export PATH=$PATH:<ABSOLUTE_PATH>/gen-machine-conf
36```
37
385. Run the script from the build or ${TOPDIR} directory. This step describes
39 System Device Tree (SDT) with and without pl overlays. Configruations are same
40 for both SDT with and without pl overlays except for linux dts content.
41
42> **Note:**
43> 1. The -c option should point either <path-to-machine-bsp-layer>/conf or <path-to-build-directory>/build/conf
44> directory.
45> 2. The -l option will automatically add the necessary parameters to the
46 local.conf file. If you need to re-run this comment, you just clear the
47 parameters from the end of the file. Without the -l option the items are
48 printed to the screen and must be manually added to your conf/local.conf
49> 3. The --soc-family argument is an optional argument and user can skip this.
50> 4. By default minimal set of multiconfigs are generated by gen-machineconf tool.
51> To enable full multiconfig(APU/RPU baremetal or FreeRTOS) then use
52> `--multiconfigfull` option.
53
54> **Recommended SDT Machine nomenclature:**
13> 55>
14> QEMU Device tree deploy directory: `QEMU_HW_DTB_PATH = "${DEPLOY_DIR_IMAGE}/qemu-hw-devicetrees/multiarch"` 56> 1. Machine Configuration file nomenclature: `<soc-family>-<board-name>-sdt-<design-name>`
15> 57> * Example: `MACHINE = "versal-vek280-sdt-seg"`
16> QEMU PMU Device tree: `QEMU_HW_DTB_PMU = "${QEMU_HW_DTB_PATH}/zynqmp-pmu.dtb"`
17>
18> QEMU PS Device tree: `QEMU_HW_DTB_PS = "${QEMU_HW_DTB_PATH}/board-versal-ps-vck190.dtb"`
19> 58>
20> QEMU PMC Board Device tree: `QEMU_HW_DTB_PMC = "${QEMU_HW_DTB_PATH}/board-versal-pmc-virt.dtb"` 59> 2. BSP Reference design name:
60> * `full` - Zynq-7000/ZynqMP full bitstream loading Vivado design.
61> * `dfx` - ZynqMP/Versal full bitstream loading Vivado design.
62> * `seg` - Versal Segmented Configuration Vivado design.
63>
64> **Note:** In machine file nomencalutre `<soc-family>-<board-name>-sdt-<design-name>`
65> If design-name suffix is not set or defined then it is treated as flat design
66> without dynamic PL configuration.
67
68 a. Without SDT pl overlay:
69```
70 $ gen-machineconf parse-sdt --hw-description <path_to_sdtgen_output_directory> -c <conf-directory> -l <path-to-build-directory>/build/conf/local.conf --machine-name <soc-family>-<board-name>-sdt-<design-name>
71```
72
73 b. With SDT pl overlay:
74 To generate SDT pl overlay run gen-machineconf command with
75 `-g {full|dfx}` option. Once SDT pl overlay command is executed successfully
76 pl.dtsi will be generated under <conf-directory>/dts/${MACHINE}/pl-overlay-{full|dfx}
77 directory. User can use this pl.dtsi as input to full or dfx static firmware
78 recipes. See https://github.com/Xilinx/meta-xilinx/blob/master/docs/README.dfx.user.dts.md
79 for more details.
80
81> **Note:** DFx partial dtsi is not processed by gen-machineconf(lopper) tool, User
82> needs to use the *_partial.dtsi and *_partial.pdi/bit from sdtgen output
83> artifacts to DFx partial firmware recipes.
84
85 * Zynq-700 or ZynqMP Full bitstream or Versal Segmented Configuration:
86```
87 $ gen-machineconf parse-sdt --hw-description <path_to_sdtgen_output_directory> -c <conf-directory> -l <path-to-build-directory>/build/conf/local.conf --machine-name <soc-family>-<board-name>-sdt-<design-name> -g full
88```
89
90 * ZynqMP or Versal DFx:
91```
92 $ gen-machineconf parse-sdt --hw-description <path_to_sdtgen_output_directory> -c <conf-directory> -l <path-to-build-directory>/build/conf/local.conf --machine-name <soc-family>-<board-name>-sdt-<design-name> -g dfx
93```
94
95For example, Zynq-7000:
96```
97$ gen-machineconf parse-sdt --hw-description <path_to_sdtgen_output_directory> -c <conf-directory> -l <path-to-build-directory>/build/conf/local.conf --machine-name <soc-family>-<board-name>-sdt-<design-name>
98```
99The following will be written to the end of the <path-to-build-directory>/build/conf/local.conf file:
100
101```
102# Use the newly generated MACHINE
103MACHINE = "zynq-zc702-sdt"
104
105# Avoid errors in some baremetal configs as these layers may be present
106# but are not used. Note the following lines are optional and can be
107# safetly disabled.
108SKIP_META_VIRT_SANITY_CHECK = "1"
109SKIP_META_SECURITY_SANITY_CHECK = "1"
110SKIP_META_TPM_SANITY_CHECK = "1"
111```
112
113For example, ZynqMP:
114```
115$ gen-machineconf parse-sdt --hw-description <path_to_sdtgen_output_directory> -c <conf-directory> -l <path-to-build-directory>/build/conf/local.conf --machine-name <soc-family>-<board-name>-sdt-<design-name>
116```
117The following will be written to the end of the <path-to-build-directory>/conf/local.conf file:
118
119```
120# Use the newly generated MACHINE
121MACHINE = "zynqmp-zcu102-sdt"
122
123# Avoid errors in some baremetal configs as these layers may be present
124# but are not used. Note the following lines are optional and can be
125# safetly disabled.
126SKIP_META_VIRT_SANITY_CHECK = "1"
127SKIP_META_SECURITY_SANITY_CHECK = "1"
128SKIP_META_TPM_SANITY_CHECK = "1"
129```
130
131For example, Versal:
132```
133$ gen-machineconf parse-sdt --hw-description <path_to_sdtgen_output_directory> -c <conf-directory> -l <path-to-build-directory>/build/conf/local.conf --machine-name <soc-family>-<board-name>-sdt-<design-name>
134```
135
136The following will be written to the end of the <path-to-build-directory>/conf/local.conf file:
137
138```
139# Use the newly generated MACHINE
140MACHINE = "versal-vmk180-sdt"
141
142# Avoid errors in some baremetal configs as these layers may be present
143# but are not used. Note the following lines are optional and can be
144# safetly disabled.
145SKIP_META_VIRT_SANITY_CHECK = "1"
146SKIP_META_SECURITY_SANITY_CHECK = "1"
147SKIP_META_TPM_SANITY_CHECK = "1"
148```
149
150> **Bitbake Performance Note:**
151Each BBMULTICONFIG value requires all of the recipes to be parsed for that
152configuration. Thus each multiconfig will add more parsing time. A long list
153can lead to a very slow parse (many minutes). To speed up parsing, it is
154suggested that you trim this down to only the configurations you require.
155A minimum configuration is included with the generated configuration.
156
1576. Build your project, You should now be able to build your project normally.
158 See the Yocto Project documentation if you have questions on how to work with
159 the multiconfig recipes. The following is a simple build for testing.
160
1617. Continue [Building Instructions](https://github.com/Xilinx/meta-xilinx/blob/master/README.building.md)
162 from step 8.
163
164>**Note:** Only AMD eval boards have the dtsi in System Device Tree repo, for custom
165> board user has to follow one of the following methods.
166> 1. Patch System Device Tree to include the custom board dtsi and include the
167> custom board dtsi during sdtgen build step.
168> `% sdtgen set_dt_param -board_dts <custom-board-dtsi-name>`
21> 169>
22> QEMU Memory: Some boards for example VEK280 and VH158 memory configurations are 170> 2. Create a custom board dtsi file and use EXTRA_DT_INCLUDE_FILES variable to
23> different, Hence we need to adjust the same in QB_MEM to match board dtsi files. 171> include the custom board dtsi to final dtb. Here is the example usage.
24> Below are some examples. 172> `EXTRA_DT_INCLUDE_FILES:append = " <path-to-directory>/<custom-board>.dtsi"`
25> * ZynqMP `QB_MEM = "-m 4096"`
26> * Versal VEK280 `QB_MEM = "-m 12G"`
27
28
29| Devices | Evaluation Board | QEMU PMC or PMU DTB file | QEMU PS DTB file | QB Mem |
30|---------|-------------------------------------------------------------------------------|-----------------------------|-------------------------------|--------|
31| ZynqMP | [ZCU102](https://www.xilinx.com/products/boards-and-kits/ek-u1-zcu102-g.html) | `zynqmp-pmu.dtb` | `zcu102-arm.dtb` | 4096 |
32| | [ZCU104](https://www.xilinx.com/products/boards-and-kits/zcu104.html) | `zynqmp-pmu.dtb` | `zcu102-arm.dtb` | 4096 |
33| | [ZCU106](https://www.xilinx.com/products/boards-and-kits/zcu106.html) | `zynqmp-pmu.dtb` | `zcu102-arm.dtb` | 4096 |
34| | [ZCU111](https://www.xilinx.com/products/boards-and-kits/zcu111.html) | `zynqmp-pmu.dtb` | `zcu102-arm.dtb` | 4096 |
35| | [ZCU208](https://www.xilinx.com/products/boards-and-kits/zcu208.html) | `zynqmp-pmu.dtb` | `zcu102-arm.dtb` | 4096 |
36| | [ZCU216](https://www.xilinx.com/products/boards-and-kits/zcu216.html) | `zynqmp-pmu.dtb` | `zcu102-arm.dtb` | 4096 |
37| | [ZCU670](https://www.xilinx.com/products/boards-and-kits/zcu670.html) | `zynqmp-pmu.dtb` | `zcu102-arm.dtb` | 4096 |
38| Versal | [VCK190](https://www.xilinx.com/products/boards-and-kits/vck190.html) | `board-versal-pmc-virt.dtb` | `board-versal-ps-vck190.dtb` | 8G |
39| | [VMK180](https://www.xilinx.com/products/boards-and-kits/vmk180.html) | `board-versal-pmc-virt.dtb` | `board-versal-ps-vmk180.dtb` | 8G |
40| | [VPK120](https://www.xilinx.com/products/boards-and-kits/vpk120.html) | `board-versal-pmc-virt.dtb` | `board-versal-ps-vpk120.dtb` | 8G |
41| | [VPK180](https://www.xilinx.com/products/boards-and-kits/vpk180.html) | `board-versal-pmc-virt.dtb` | `board-versal-ps-vpk180.dtb` | 8G |
42| | [VEK280](https://www.xilinx.com/products/boards-and-kits/vek280.html) | `board-versal-pmc-virt.dtb` | `board-versal-ps-vek280.dtb` | 12G |
43| | [VHK158](https://www.xilinx.com/products/boards-and-kits/vhk158.html) | `board-versal-pmc-virt.dtb` | `board-versal-ps-vhk158.dtb` | 32G |
44
45> **Note:** Additional information on Xilinx architectures can be found at:
46 https://www.xilinx.com/products/silicon-devices.html