Setup PetaLinux environment
source <petaLinux_tool_install_dir>/settings.sh
Create a PetaLinux project named zcu104_petalinux and configure the hw option with the XSA file:
cd workspace petalinux-create --type project --template zynqMP --name zcu104_petalinux cd zcu104_petalinux petalinux-config --get-hw-description=xilinx_zcu104_base_202320_1/hw/hw.xsa # After you extract the base platform, you can find hw.xsa or hw_emu.xsa under <xilinx_zcu104_base_202320_1> directory. If you want to do emulation you can choose hw_emu.xsa
Note:
--template
option specifies the chipset. zcu104 board adopts the ZYNQMP™ series chip. Therefore, we specify this option aszynqMP
. If your platform is using Versal™ chipset, set this option toversal
.Note: If the user is customizing Linux image for VCK190 board, ensure the XSA file is exported from a normal project (not a Vitis extensible project) and includes the device image.
Note: PetaLinux will use XSA to generate the device tree. Since hardware XSA and hardware emulation XSA have identical peripherals, providing either of them to PetaLinux is acceptable. When simplifying the hardware design for hardware emulation, it is recommended to keep all the peripherals that need device tree and drivers so that the auto-generated device tree can be reused. If the two designs have different addressable peripherals, you will need to create two sets of device trees for hardware running and hardware emulation, separately.
A petalinux-config menu is launched. Set it to use ZCU104 device tree in the configuration window.
Select DTG Settings->MACHINE_NAME
Modify it to
zcu104-revc
.Select OK -> Exit -> Exit -> Yes to close this window.
Note:
If you are using an AMD development board, it is recommended to modify the machine name so that the board configurations would be involved in the DTS auto-generation. You can check the UG1144 document for the corresponding machine name.
If you are using a custom board, you would need to configure the associated settings (e.g. the PHY information DTS node) in system-user.dtsi manually.
Device tree is a generic technology in embedded Linux. Search on Google for more information.