Modifying PetaLinux U-Boot - 2024.2 English - UG1209

Zynq UltraScale+ MPSoC Embedded Design Tutorial (UG1209)

Document ID
UG1209
Release Date
2025-03-20
Version
2024.2 English

Modify PetaLinux U-Boot so that it can load the image.ub image. The device tree needs to be modified to set the USB in peripheral mode. The default PetaLinux configuration is set for the USB in host mode. Follow these steps to modify system-user.dtsi in the PetaLinux project:

<PetaLinux-project>/project-spec/meta-user/recipes-bsp/device-tree/files/system-user.dtsi
  1. Add the following to the system-user.dtsi file so that it looks like this:

    /include/ "system-conf.dtsi"
    / {
    gpio-keys { sw19 {
    status = "disabled";
    };
    };
    };
    &uart1
    {
    status = "disabled";
    };
    &dwc3_0 {
    dr_mode = "peripheral"; maximum-speed = "super-speed";
    };
    

    The modified system-user.dtsi file can be found in ref_files/usb_boot released with this tutorial.

  2. Build PetaLinux with the following changes:

    $ petalinux-build
    

The following steps describe how to create a usb_boot.bin comprising rest of the partitions.

Note

Copy the newly generated U-Boot to C:\edt\usb_boot\.

  1. In the Vitis IDE, select Vitis → Create Boot Image.

  2. Select FSBL and rest of the partitions and set them as shown in the following figure. You can also choose to import the BIF file from the SD boot sequence.

    _images/image78.png

    Note

    Ensure that you have set the correct exception levels for the TF-A (EL-3, TrustZone) and U-Boot (EL-2) partitions. These settings can be ignored for other partitions.

    The PMU firmware partition is not required in this image because it will be loaded by the bootROM before this image (usb_boot.bin) is loaded.

  3. Click on Create Image to generate usb_boot.bin.

    Note

    In addition to BOOT.bin and usb_boot.bin, a Linux image such as image.ub is required to boot Linux. This image.ub is loaded by the DFU utility separately.