Getting Linux working on Zynq is very simple, following steps are required
This is generic how-to, everything is setup for your by the Vivado->PetaLinux flow. Note, the boot.bin generated by PetaLinux may not always work, in such case it is recommended to make the boot.bin with SDK-GUI or command line tools manually.
There is no need to install anything else, or to fetch anything from any github repos, etc.
Petalinux 2024.2 is under review documentation for 2024.2 can be changed permanently at the moment
(optional) Create new VM with supported Linux OS.
Download PetaLinux from Xilinx Website: http://www.xilinx.com/support/download/index.html/content/xilinx/en/downloadNav/embedded-design-tools.html
Choose a PetaLinux Version, that's corresponding to the installed Vivado and SDK Version.
Example: Use Vitis (SDK+Vivado) 2023.2 with PetaLinux 2023.2
Use UG1144 "PetaLinux Tools Documentation - Reference Guide" that's corresponding with your PetaLinux Version
Use bash as terminal:
$ sudo dpkg-reconfigure dash
→ press no
Check "PetaLinux Tools Installation Requirements" chapter and install missing tool/libraries
Install packages(see https://support.xilinx.com/s/article/000035572?language=en_US → PetaLinux_2023.2_OS_Package_List.xlsx)
Note:
From excel additional to python3 also python was recommended which is not longer possible to install
sudo apt-get install iproute2 gawk python3 build-essential gcc git make net-tools libncurses5-dev tftpd zlib1g-dev libssl-dev flex bison libselinux1 gnupg wget git diffstat chrpath socat xterm autoconf libtool tar unzip texinfo zlib1g-dev gcc-multilib automake zlib1g:i386 screen pax gzip cpio python3-pip python3-pexpect xz-utils debianutils iputils-ping python3-git python3-jinja2 libegl1-mesa libsdl1.2-dev pylint bc libtinfo5 subversion u-boot-tools -y
Install petalinux (Note: do not start from shared folder, copy installer into home directory)
$ sudo chown <owner>:<owner> /tools/Xilinx
$ ./xsetup
source environment
$ source /tools/Xilinx/PetaLinux/2024.2/tool/settings.sh
Deactivate Webtalk:
$ petalinux-util --webtalk off
Note:
There is no need to install anything else, or to fetch anything from any github repos, etc.
It is recommended to test the installation by creating a dummy template project and building it.
Download one of the BSP Examples from Xilinx Website (Only to test your installation)
Install:$ petalinux-create -t project -s <path-to-bsp>
Build: $ petalinux-build
Some reference designs contains a preconfigured PetaLinux project as template. This can be used instead of creating a new project described on step 2.
Basic Note to TE Petalinux Templates, see: PetaLinux TE-Template#PetaLinux2023.2
New with 2023.2 and newer:
New with 2022.2 and newer:
New with 2020.2 and newer:
"/bin/sh" is bash
$ petalinux-create --type project --template <CPU_TYPE> --name <PROJECT_NAME>
Most settings can be changed with menu-config:
Manual changes can be done in the subfolder "<plnx-proj-root>/project-spec/meta-user/"
| CONFIG |
|
|
| U-Boot |
|
|
| Device Tree |
|
|
| Kernel |
|
|
| Apps |
|
|
| ROOTFS |
|
|
| Xilinx generated configuration |
| Note: config and rootfs_config are shared at the moment, they include user and xilinx default changes from XSA import |
PetaLinux Tools Documentation - PetaLinux Command Line Reference (UG1157)
Xilinx Release Notes available on: https://adaptivesupport.amd.com/s/article/000037095?language=en_US
| Issue | Trenz modified FSBL for petalinux is not taken into account from petalinux. This is only need on trenz project which has FSBL patch included inside the petalinux template. --><project folder>\os\petalinux\project-spec\meta-user\recipes-bsp\embeddedsw AMD has changed patch priority and petalinux ignores provided FSBL patch in \os\petalinux\project-spec\meta-user\recipes-bsp\embeddedsw |
|---|---|
| Workaround | In order for the patches to be used, the existing line BBFILE_PRIORITY_meta-user = "[VALUE]" must be set to 9 instead of the original value 7 in the Petalinux config file project-spec/meta-user/conf/layer.conf |