5.4.2. Generate Petalinux Image - 5.4.2. Generate Petalinux Image - 2023.1 English - XD339

Versal Restart TRD (XD339)

Document_ID
XD339
Release_Date
2026-01-12
Version
2023.1 English
  1. On Linux, set up the Petalinux environment in a terminal window by sourcing <Petalinux_install_path>/settings.sh

  2. Create a new Petalinux project with versal template. Name it as plnx-vssr-trd

    cd $VSSR_WS
    petalinux-create -t project --template versal -n plnx-vssr-trd
    cd plnx-vssr-trd
    
  3. Petalinux Hardware Configuration.

    • Point to the hardware XSA generated in the Build the Vivado Design section (or provided in the pre-built images). Below command picks the hw XSA from the workspace’s vivado build area:

      petalinux-config --get-hw-description=$VSSR_WS/hw_ws/vivado/versal_restart_trd.runs/impl_1/
      
    • Add The board/machine name in the DTG Settings —> MACHINE_NAME, According to the following table

      Board

      Machine Name

      VCK190

      versal-vck190-reva-x-ebm-01-reva

      VMK180

      versal-vmk180-reva-x-ebm-01-reva

      plnx_config_1
      plnx_config_2
      plnx_config_3
    • Change INITRAMFS/INITRD Image name to petalinux-initramfs-image. This will ensure to switch to rootfs on the sd card after initial boot from initramfs.

      plnx_img_pkg_1
      plnx_img_pkg_2
      plnx_config_3
    • Save and Exit petalinux configuration

  4. Configure Static IP using petalinux config, Petalinux Ethernet IP configuration (Optional. Default=DHCP)

    petalinux-config
    
    • Select Subsystem AUTO Hardware Settings —> Ethernet Settings —> Primary Ethernet —> ethernet_0

    plnx_ip_config_1
    • Unselect Obtain IP address automatically and set the static IP

    plnx_ip_config_2
    • Save and Exit petalinux configuration

  5. Add vssr-trd yocto layer

    # Copy the layer sources
    cp -rf $REPO_SRC/sw/yocto-layers/meta-vssr-trd project-spec/
    # Add Yocto layer in the petalinux configuration
    petalinux-config
    
    • Add new user layer and enter the layer path at Yocto Settings —> User Layers —> user layer 0

      plnx_layer_add_2
      plnx_layer_add_3
    • Save and Exit petalinux configuration

  6. Add layer to include artifacts in the build:

    ./project-spec/meta-vssr-trd/scripts/add-layer.sh
    
  7. Build the Petalinux project:

    petalinux-build
    
  8. Output images are generated in following directory:

    ${VSSR_WS}/plnx-vssr-trd/images/linux