# meta-xilinx-standalone-sdt This layer contains System Device Tree items that are related to the meta-xilinx-standalone layer. ## Build Instructions The Yocto Project setup for the System Device Tree (SDT) workflow is as follows. Be sure to read everything below. > **Pre-requisites:** > * To use this layer you must REMOVE meta-xilinx-tools from your project. meta-xilinx-tools is not compatible with this SDT approach. You may also have to remove other layers that depend on meta-xilinx-tools, such as meta-kria and meta-system-controller. > * Follow [System Device Tree Instructions](https://github.com/Xilinx/system-device-tree-xlnx/blob/master/README.md) > to generate the SDT output. > * To use the SDT version of the embedded software (firmware) as well as system configuration, you must build through gen-machineconf tool. This tool is passed a output of system device tree directory. 1. Follow [Building Instructions](../README.building.md) upto step 2. 2. Clone the meta-openamp repository. ``` $ git clone -b https://github.com/Xilinx/meta-openamp ``` 3. Continue [Building Instructions](https://github.com/Xilinx/meta-xilinx/blob/master/README.building.md) from step 3 to step 4. 4. Remove meta-xilinx-tools and meta-xilinx-tools dependency layers(such as meta-kria and meta-system-controller if included in bblayers.conf), then add the meta-xilinx-standalone-sdt and meta-openamp layer. > **Note:** SDT builds for following devices are not supported in 2024.2 release. > * MicroBlaze ``` $ bitbake-layers remove-layer meta-xilinx-tools $ bitbake-layers add-layer .//meta-xilinx/meta-xilinx-standalone-sdt $ bitbake-layers add-layer .//meta-openamp ``` 1. Export gen-machineconf tool. ``` $ export PATH=$PATH:/gen-machine-conf ``` 1. Run the script from the build or ${TOPDIR} directory. This step describes System Device Tree (SDT) with and without pl overlays. Configruations are same for both SDT with and without pl overlays except for linux dts content. > **Note:** > 1. The -l option will automatically add the necessary parameters to the local.conf file. If you need to re-run this comment, you just clear the parameters from the end of the file. Without the -l option the items are printed to the screen and must be manually added to your conf/local.conf > 2. The --soc-family argument is an optional argument and user can skip this. > 3. By default minimal set of multiconfigs are generated by gen-machineconf tool. > To enable full multiconfig(APU/RPU baremetal or FreeRTOS) then use > `--multiconfigfull` option. a. Without SDT pl overlay: ``` $ gen-machineconf --hw-description -c -l conf/local.conf ``` b. With SDT pl overlay: To generate SDT pl overlay run gen-machineconf command with `-g {full|dfx}` option. Once SDT pl overlay command is executed successfully pl.dtsi will be generated under /dts/${MACHINE}/pl-overlay-{full|dfx} directory. User can use this pl.dtsi as input to full or dfx static firmware recipes. > **Note:** DFx partial dtsi is not processed by gen-machineconf(lopper) tool, User > needs to use the *_partial.dtsi and *_partial.pdi/bit from sdtgen output > artifacts to DFx partial firmware recipes. * Zynq-700 or ZynqMP Full bitstream or Versal Segmented Configuration: ``` $ gen-machineconf parse-sdt --hw-description -c -l conf/local.conf -g full ``` * ZynqMP or Versal DFx: ``` $ gen-machineconf parse-sdt --hw-description -c -l conf/local.conf -g dfx ``` For example, Zynq-7000: ``` $ gen-machineconf parse-sdt --hw-description -c conf/ -l conf/local.conf ``` The following will be written to the end of the conf/local.conf file: ``` # Use the newly generated MACHINE MACHINE = "xlnx-zynq-zc702" # Avoid errors in some baremetal configs as these layers may be present # but are not used. Note the following lines are optional and can be # safetly disabled. SKIP_META_VIRT_SANITY_CHECK = "1" SKIP_META_SECURITY_SANITY_CHECK = "1" SKIP_META_TPM_SANITY_CHECK = "1" ``` For example, ZynqMP: ``` $ gen-machineconf parse-sdt --hw-description -c conf/ -l conf/local.conf ``` The following will be written to the end of the conf/local.conf file: ``` # Use the newly generated MACHINE MACHINE = "xlnx-zynqmp-zcu102-rev1-0" # Avoid errors in some baremetal configs as these layers may be present # but are not used. Note the following lines are optional and can be # safetly disabled. SKIP_META_VIRT_SANITY_CHECK = "1" SKIP_META_SECURITY_SANITY_CHECK = "1" SKIP_META_TPM_SANITY_CHECK = "1" ``` For example, Versal: ``` $ gen-machineconf parse-sdt --hw-description -c conf/ -l conf/local.conf ``` The following will be written to the end of the conf/local.conf file: ``` # Use the newly generated MACHINE MACHINE = "xlnx-versal-vmk180-rev1-1-x-ebm-01-reva" # Avoid errors in some baremetal configs as these layers may be present # but are not used. Note the following lines are optional and can be # safetly disabled. SKIP_META_VIRT_SANITY_CHECK = "1" SKIP_META_SECURITY_SANITY_CHECK = "1" SKIP_META_TPM_SANITY_CHECK = "1" ``` > **Bitbake Performance Note:** Each BBMULTICONFIG value requires all of the recipes to be parsed for that configuration. Thus each multiconfig will add more parsing time. A long list can lead to a very slow parse (many minutes). To speed up parsing, it is suggested that you trim this down to only the configurations you require. A minimum configuration is included with the generated configuration. 7. Build your project, You should now be able to build your project normally. See the Yocto Project documentation if you have questions on how to work with the multiconfig recipes. The following is a simple build for testing. 8. Continue [Building Instructions](https://github.com/Xilinx/meta-xilinx/blob/master/README.building.md) from step 6. ## Dependencies This layer depends on: URI: https://git.yoctoproject.org/poky layers: meta, meta-poky branch: scarthgap URI: https://git.openembedded.org/meta-openembedded layers: meta-oe branch: scarthgap URI: https://git.yoctoproject.org/meta-xilinx (official version) https://github.com/Xilinx/meta-xilinx (development and amd xilinx release) layers: meta-xilinx-core, meta-xilinx-bsp, meta-xilinx-standalone branch: scarthgap or amd xilinx release version (e.g. rel-v2024.2) URI: https://git.yoctoproject.org/meta-virtualization (official version) https://github.com/Xilinx/meta-virtualization (development and amd xilinx release) branch: scarthgap or amd xilinx release version (e.g. rel-v2024.2) URI: https://github.com/OpenAMP/meta-openamp (official version) https://github.com/Xilinx/meta-openamp (development and amd xilinx release) branch: scarthgap or amd xilinx release version (e.g. rel-v2024.2)