DTG Settings - 2023.1 English

PetaLinux Tools Documentation: Reference Guide (UG1144)

Document ID
UG1144
Release Date
2023-05-16
Version
2023.1 English
Figure 1. DTG Settings

Machine Name

For custom boards, do not change the configuration. For Xilinx evaluation boards, see Table 1.

Extra dts/dtsi file

Provide the extra device tree files path is separated with space. This config should be set with dts/dtsi absolute/full path. Provided dts/dtsi is build as part of the device-tree and deployed into /boot/devicetree.

Note: All dtsi files which are included in the dts file should be added to this config. For example, the zynqmp-test.dts file includes the custom.dtsi and main.dtsi files and you must add all three of them separated by spaces to this config.
{PROOT}/project-spec/dts_dir/zynqmp-test.dts 
{PROOT}/project-spec/dts_dir/custom.dtsi 
{PROOT}/project-spec/dts_dir/main.dtsi

Kernel Bootargs

The Kernel Bootargs submenu allows you to let PetaLinux automatically generate the kernel boot command-line settings in DTS, or pass PetaLinux user defined kernel boot command-line settings. The following are the default bootargs.

Microblaze -- console=ttyS0,115200 earlyprintk

zynq            -- console=ttyPS0,115200 earlyprintk
zynqmp          -- console=ttyPS0,115200 earlycon clk_ignore_unused root=/dev/ram0 rw
versal          -- console=ttyAMA0earlycon=pl011,mmio32,0xFF000000,115200n8 clk_ignore_unused
Note: If you want to see kernel panic prints on the console for Zynq UltraScale+ MPSoCs and Versal devices, add earlycon console=<device>,<baud rate> clk_ignore_unused root=/dev/ram rw. For example, earlycon console=/dev/ttyPS0,115200 clk_ignore_unused root=/dev/ram rw is added in the system_user.dtsi.

For more information, see kernel documentation.

Device Tree Overlay Configuration for Versal Adaptive SoC, Zynq 7000 Devices, and Zynq UltraScale+ MPSoCs

If you want to load PL after Linux boot, select this option to separate PL from base DTB and build the pl.dtsi to generate pl.dtbo. After creating a PetaLinux project follow the steps to add overlay support:

  1. Go to cd <proj root directory>.
  2. In the petalinux-config command, select DTG Settings > Device tree overlay.
  3. Run petalinux-build to generate the pl.dtbo in images/linux directory.

    FPGA manager overrides all options of the device tree overlay. Device Tree Overlay comes into play only when the FPGA manager is not selected.

Converting Bitstream from .bit to .bin

  1. Create a bif file with the following content:
    all: 
    {
            [destination_device = pl] <bitstream in .bit> ( Ex: system.bit ) 
    }
  2. Run following command:
    bootgen -image bitstream.bif -arch zynqmp -process_bitstream bin
    Note: The bit/bin file name should be same as the firmware name specified in pl.dtsi (design_1_wrapper.bit.bin).
  3. Once the target is up, load the dtbo and bit.bin file.
    fpgautil -b design_1_wrapper.bit.bin -o pl.dtbo

Removing PL from the Device Tree

Select this configuration option to skip PL nodes if the user does not depend on the PL IPs. Also, if any PL IP in DTG generates an error, you can simply enable this flag to ensure that the DTG does not generate any PL nodes.

  1. Go to cd <proj root directory>.
  2. In the petalinux-config command, select DTG Settings > Remove PL from device tree.
  3. Run petalinux-build.
Note: FPGA manager overrides all the Remove PL options. Remove PL option comes into play only when the FPGA manager is not selected.
Note: If you select both the device tree overlay and remove the PL from the device tree, the base DTB adds an entry for overlay support but there is no pl.dtbo generated.

Enable openamp dtsi

Earlier, openamp.dtsi file was in <proj>/project-spec/meta-user/device-tree/files/openamp.dtsi and it was included in system-user.dtsi as a part of the system.dtb.

Figure 2. Enable openamp dtsi

In the 2023.1 release, the dtsi files are moved to Yocto layers petalinux-config → DTG Settings → Enable Openamp Dtsi configuration, it can be added to system.dtb or built as an overlay by applying opemamp dtsi nodes as an overlay.

Build openamp dtb in Petalinux flow

There are two ways to build openamp dtb:

Building openamp dtb within system.dtb
Enable the petalinux-config → DTG Settings -> Enable openamp dtsi configuration and add the openamp packages from petalinux-config -c rootfs with in system.dtb

Select the following packages and save:

  • openamp-fw-echo-testd
  • openamp-fw-mat-muld
  • openamp-fw-rpc-demo
  • packagegroup-petalinux-openamp
Note: The above configuration is enabled for all in Zynq, Zynq UltraScale+ MPSoC, and Versal prebuilt images.
Applying opemamp dtsi nodes as an overlay

Disable the petalinux-config -> DTG Settings -> Enable Openamp dtsi configuration and enable the openamp package group through petalinux-config -c rootfs. It builds the openamp.dtbo as part of rootfs and it is available in /boot/devicetree.

Bootscript(boot.scr) auto-loads the openamp.dtbo if it is available in /boot/devicetree.

Enable xen hardware dtsi

Select Enable xen hardware dtsi configuration in petalinux-config → DTG Settings to build the xen hardware dtsi changes as part of system.dtb.

Figure 3. Enable xen hardware dtsi

Enable the Enable xen hardware dtsi configuration to make xen changes part of system.dtb

Earlier, the xen hardware dtsi files were in <plnx-proj>/project-spec/meta-user/recipes-bsp/device-tree/files/xen.dtsi. You have to include these files in system-user.dtsi and build it as a part of system.dtb.

In 2023.1, the xen.dtsi file is moved into the meta-petalinux layer, and by enabling the Enable xen hardware dtsi configuration in petalinux-config, the xen changes are included as part of system.dtb

Enable xen qemu dtsi

Figure 4. Enable xen qemu dtsi

Enable xen qemu dtsi configuration option in petalinux-config builds the xen qemu dtsi changes as part of system.dtb.

Enable the Enable xen qemu dtsi configuration to include the xen qemu changes as a part of system.dtb.

Earlier, the xen qemu dtsi files were in <plnx-proj>/project-spec/meta-user/recipes-bsp/device-tree/files/xen-hw.dtsi. You have to include these in system-user.dtsi and build as a part of system.dtb.

In 2023.1, the xen-qemu.dtsi file is moved into meta-petalinux layer and by enabling the Enable xen qemu dtsi configuration, it is included as a part of system.dtb

Devicetree overlay

Figure 5. Devicetree overlay

If you wants to build pl nodes dtbo files separately, enable the Devicetree overlay configuration to build separate pl.dtbo as an overlay.

Device-tree XSCT workspace

Figure 6. Device-tree XSCT workspace

Select the device tree workspace using the Device-tree XSCT workspace configuration and dtg generates the dtsi files in the configured path.

Enable DTG logs

Figure 7. Enable DTG logs

If you want to enable the debug logs in the device tree generator, enable the Enable dt verbose configuration.

Note: By default, Enable dt verbose is disabled in the tool.

Disable alias generated by DTG

Figure 8. Disable aliases generated by DTG