Zynq Petalinux
Version vom 8. Oktober 2021, 06:52 Uhr von Nick (Diskussion | Beiträge) (→Erstellen eines Projektes mit Vivado)
Verwendetes Board Trenz TE0720.
Installation Petalinux
Download Petalinux 2020.2:
http://www.xilinx.com/support/download/index.html/content/xilinx/en/downloadNav/embedded-design-tools.html
Installation erfolgt im Verzeichnis /opt
Besitzer des Ordners /opt/ anpassen:
sudo chown <owner>:<owner> /opt/
Installation benötigter Tools
sudo dpkg-reconfigure dash
- "No" auswählen
sudo apt-get update sudo apt-get install tofrodos iproute2 gawk make net-tools libncurses5-dev tftpd zlib1g:i386 libssl-dev flex bison libselinux1 gnupg wget diffstat chrpath socat xterm autoconf libtool tar unzip texinfo zlib1g-dev gcc-multilib build-essential screen pax gzip python2.7 -y
Installation Petalinux (Note: do not start from shared folder, copy installer into home directory)
mkdir -p /opt/petalinux/2020.2 sudo chmod +x petalinux-v2020.2-final-installer.run ./petalinux-v2020.2-final-installer.run -d /opt/petalinux/2020.2
source enviroment
source /opt/petalinux/2020.2/settings.sh
Webtalk deaktivieren:
petalinux-util --webtalk off
Erstellen eines Projektes mit Vivado
Erstelle des Projekte:
mkdir zynq_project/petalinux/ cd zynq_project/petalinux/ petalinux-create --type project --template <CPU_TYPE> --name <PROJECT_NAME>
- <CPU_TYPE>: zynqMP, zynq, microblaze
- <PROJECT_NAME>: The name of the project you are building
Export/Import Hardware Konfiguration (wenn noch nicht geschehen):
Vivado ⇒ File ⇒ Export Hardware... ⇒ Petalinux <PROJECT_NAME> folder (zynq_project/petalinux/<PROJECT_NAME>)
Hardware Konfiguration von Vivado übernhemen:
petalinux-config --get-hw-description
Wichtige Einstellungen:
Subsystem AUTO Hardware Settings ---> Serial Settings ---> FSBL Serial stdin/stdout (ps7_uart_0) ---> Subsystem AUTO Hardware Settings ---> Serial Settings ---> DTG Serial stdin/stdout (ps7_uart_0) ---> Subsystem AUTO Hardware Settings ---> Ethernet Settings ---> Ethernet MAC address FSBL Configuration ---> (FSBL_DEBUG_INFO) FSBL compiler flags
Konfiguration PetaLinux (Optional):
petalinux-config petalinux-config -c u-boot petalinux-config -c kernel petalinux-config -c rootfs
Build System:
petalinux-build petalinux-build -c u-boot #Build spezieller Komponente (kernel, rootfs)
Erhaltene Dateien unter /opt/petalinux/2020.2/images/linux:
u-boot.elf image.ub
Konfigurationsdateien (petalinux):
- u-boot
zynq_project/petalinux/<PROJECT_NAME>/build/tmp/work/zynq_generic-xilinx-linux-gnueabi/u-boot-xlnx/v2020.01-xilinx-v2020.2+git999-r0/u-boot-xlnx-v2020.01-xilinx-v2020.2+git999/.config