- Created by John Hartfiel, last modified on 18 02, 2021
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 2023.2 is under review documentation for 2023.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 enviroment $ source /tools/Xilinx/PetaLinux/2023.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/" PetaLinux Tools Documentation - PetaLinux Command Line Reference (UG1157)Petalinux Project Creation- Short HOWTO
PetaLinux 2023.2
PetaLinux Installation
Creating a Project from Vivado Project
Petalinux Configuration
Use local sstate cache and downlods
Configuration menues and files
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 Additional Descriptions
References
PetaLinux Troubleshoot
Xilinx Release Notes available on: https://support.xilinx.com/s/article/000035572?language=en_US Petalinux 2023.2 seems to have a Problem booting with UART1: It gets stuck on BL31 while trying to print a char to UART1 during booting. This error happens on Versal and Zynq Ultrascale+ devices. The error is that BL31 built by petalinux does not correctly take into account that UART1 is used, and tries to output on UART0 This can be fixed by e.g. overriding yourself with creating arm-trusted-firmware_%.bbappend in meta-user/recipes-bsp/arm-trusted-firmware with content For Versal: ATF_CONSOLE = "pl011_1" For Zynq Ultrascale+: ATF_CONSOLE = "cadence1" 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 When writing an S15FL127S QSPI Chip from Linux via flashcp the verification fails. This is a driver issue of Linux as FL127 needs a page size of 256. In Linux console the QSPI flash memory chip can not be detected. dmesg output contains: "Unknown JEDEC ID"Petalinux 2023.2
General notes
BL31 gets Stuck during booting
Issue Workaround Modified FSBL is not containing patches
Issue Workaround Error Verifying contents on S15FL127S QSPI flash memory chip
Issue Workaround From f3d982f01a0a7112b8d461f450082d502df1a23d Mon Sep 17 00:00:00 2001
From: OpenEmbedded <oe.patch@oe>
Date: Thu, 25 Apr 2024 10:43:18 +0000
Subject: [PATCH] fix for s25fl127s
---
drivers/mtd/spi-nor/spansion.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/mtd/spi-nor/spansion.c b/drivers/mtd/spi-nor/spansion.c
index 104de1252b04..0ee9ff9627e1 100644
--- a/drivers/mtd/spi-nor/spansion.c
+++ b/drivers/mtd/spi-nor/spansion.c
@@ -383,10 +383,11 @@ static const struct flash_info spansion_nor_parts[] = {
NO_SFDP_FLAGS(SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ)
MFR_FLAGS(USE_CLSR)
},
- { "s25fl128s1", INFO6(0x012018, 0x4d0180, 64 * 1024, 256)
+ { "s25fl127s", INFO6(0x012018, 0x4d0180, 64 * 1024, 256) //fl127 need page size of 256
FLAGS(SPI_NOR_HAS_LOCK)
NO_SFDP_FLAGS(SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ)
MFR_FLAGS(USE_CLSR)
+ .fixups = &s25fs_s_nor_fixups,
},
{ "s25fl256s0", INFO6(0x010219, 0x4d0080, 256 * 1024, 128)
FLAGS(SPI_NOR_HAS_LOCK)
FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
SRC_URI:append = " file://bsp.cfg \
file://0001-fix-for-s25fl127s.patch"
KERNEL_FEATURES:append = " bsp.cfg"
QSPI flash memory chip is not recognized
Issue Workaround spi-max-frequency = <40000000>;
Table of contents
- No labels