Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
 
Scroll Only (inline)
Online version of this manual and other related documents can be found at https://wiki.trenz-electronic.de/display/PD/Petalinux+Troubleshoot

Table of Content

Table of Contents
outlinetrue


Excerpt

Petalinux 2023.2

General notes

Xilinx Release Notes available on: https://support.xilinx.com/s/article/000035572?language=en_US

BL31 gets Stuck during booting

Issue

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

Workaround

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" 


Modified FSBL is not containing patches

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

 Error Verifying contents on S15FL127S QSPI flash memory chip

Issue

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.

Workaround
  • To solve the programming problem in linux console via "flashcp" command:
    • Add the following patch file in linux kernel files:
      • Expand
        titlePatch File


        Code Block
        languagebash
        title0001-fix-for-s25fl127s.patch
        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)
        
        


    • Add the patch file in the linux-xlnx_%.bbappend file as shown:
      • Expand
        titleEdit the linux-xlnx_%.bbappend
        Code Block
        languagebash
        titlelinux-xlnx_%.bbappend
        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

In Linux console the QSPI flash memory chip can not be detected. 

dmesg output contains: "Unknown JEDEC ID"

Workaround


  • To solve the detection problem in linux console: 
    • Set the maximum frequency of spi interface in the device tree.
    • The actual speed depends on the design and whether SPI clock feedback is used on the board
    • if you are not speed dependent, 40MHz is a safe value for any setting  
    • e.g. add the following line in the qspi node:
      • spi-max-frequency = <40000000>;


Petalinux 2022.2

General notes

Xilinx Release Notes available on: https://support.xilinx.com/s/article/000034483?language=en_US


Petalinux Build

Command

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

Error Message
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

 

Command

petalinux-build

Error Message
NOTE: Executing Tasks
WARNING: libnsl2-2.0.0-r0 do_package_qa_setscene: Failed to fetch URL file://d9/cf/sstate:libnsl2:cortexa72-cortexa53-xilinx-linux:2.0.0:r0:cortexa72-cortexa53:7:d9cfc3b8d649a8ce19aabf8269165e1f73650ce67a2ceb8cff581836b80b5dc5_package_qa.tgz;downloadfilename=d9/cf/sstate:libnsl2:cortexa72-cortexa53-xilinx-linux:2.0.0:r0:cortexa72-cortexa53:7:d9cfc3b8d649a8ce19aabf8269165e1f73650ce67a2ceb8cff581836b80b5dc5_package_qa.tgz, attempting MIRRORS if available
ERROR: libnsl2-2.0.0-r0 do_package_qa_setscene: Fetcher failure: Unable to find file file://d9/cf/sstate:libnsl2:cortexa72-cortexa53-xilinx-linux:2.0.0:r0:cortexa72-cortexa53:7:d9cfc3b8d649a8ce19aabf8269165e1f73650ce67a2ceb8cff581836b80b5dc5_package_qa.tgz;downloadfilename=d9/cf/sstate:libnsl2:cortexa72-cortexa53-xilinx-linux:2.0.0:r0:cortexa72-cortexa53:7:d9cfc3b8d649a8ce19aabf8269165e1f73650ce67a2ceb8cff581836b80b5dc5_package_qa.tgz anywhere. The paths that were searched were:
    ./petalinux/build/sstate-cache
    ./petalinux/build/sstate-cache
WARNING: libnsl2-2.0.0-r0 do_package_qa_setscene: No sstate archive obtainable, will run full task instead.
ERROR: Logfile of failure stored in: ./petalinux/build/tmp/work/cortexa72-cortexa53-xilinx-linux/libnsl2/2.0.0-r0/temp/log.do_package_qa_setscene.22625
WARNING: Setscene task (./petalinux/components/yocto/layers/core/meta/recipes-extended/libnsl/libnsl2_git.bb:do_package_qa_setscene) failed with exit code '1' - real task will be run instead
WARNING: petalinux-image-minimal-1.0-r0 do_rootfs: Enabling autologin to user root.  This configuration should NOT be used in production!
NOTE: Tasks Summary: Attempted 4491 tasks of which 3939 didn't need to be rerun and all succeeded.
Workaround

Run petalinux-build a second time, this normally works fine

Petalinux 2021.2

General notes

Xilinx Release Notes available on: https://support.xilinx.com/s/article/000032521?language=en_US

Petalinux 2020.2

General notes

Xilinx Release Notes available on: https://www.xilinx.com/support/answers/75775.html

Kernel changes with petalinux commands

Command

petalinux-config -c kernel

petalinux-build -c kernel -x finish -f

Error Message
ERROR: Task do_finish does not exist for target virtual/kernel (<project dir>/components/yocto/layers/meta-xilinx/meta-xilinx-bsp/recipes-kernel/linux/linux-xlnx_2020.2.bb:do_finish)
ERROR: Command execution failed: 1
Workaround

Export changes from yocto workspace to the user-layer

Code Block
languagebash
petalinux-devtool finish linux-xlnx ${PWD}/project-spec/meta-user/ -f

Note: Before "petalinux-config -c kernel" can be used again after export, run:

Code Block
languagebash
petalinux-build -x mrproper -f


U-Boot changes with petalinux commands

 

Command

petalinux-config -c u-boot

petalinux-build -c u-boot -x finish -f

Error Message
ERROR: Task do_finish does not exist for target virtual/bootloader (<project dir>/petalinux/components/yocto/layers/meta-xilinx/meta-xilinx-bsp/recipes-bsp/u-boot/u-boot-xlnx_2020.2.bb:do_finish)
ERROR: Command execution failed: 1
Workaround

Export changes from yocto workspace to the user-layer

Code Block
languagebash
petalinux-devtool finish u-boot-xlnx ${PWD}/project-spec/meta-user/ -f

Note: Before "petalinux-config -c u-boot" can be used again after export, run:

Code Block
languagebash
petalinux-build -x mrproper -f



Petalinux 2019.2

General notes

Xilinx Release Notes available on: Xilinx AR#72950

Installation failed

Command./petalinux-v20183-final-installer.run /opt/pkg/petalinux
Error Message
could not install "..yocto/source" files during installation
Workaround

Do not use root account to install petalinux.

Code Block
languagebash
sudo chown <owner>:<owner> /opt/pkg/petalinux
./petalinux-v2018.3-final-installer.run /opt/pkg/petalinux


Kernel changes are missing

Command

petalinux-config -c kernel

petalinux-build -x mrproper

Error Message
<petalinuxproject>/project-spec/meta-user/recipes-kernel/ is missing after kernel config was changed
or:  cleaning failed with "WARNING: Workspace directory not empty:.../petalinux/components/plnx_workspace..."
Workaround


Code Block
languagebash
petalinux-build -c kernel -x finish -f


U-Boot changes are missing

Command

petalinux-config -c u-boot

petalinux-build -x mrproper

Error Message
<petalinuxproject>/project-spec/meta-user/recipes-bsp/uboot/files/*cfg is missing after uboot config was changed
or:  cleaning failed with "WARNING: Workspace directory not empty:.../petalinux/components/plnx_workspace..."
Workaround


Code Block
languagebash
petalinux-build -c u-boot -x finish -f


Petalinux 2018.3

General notes

Xilinx Release Notes available on: AR#71653

Installation failed

Command./petalinux-v2019.2-final-installer.run /opt/pkg/petalinux
Error Message
could not install "..yocto/source" files during installation
Workaround

Do not use root account to install petalinux.

Code Block
languagebash
sudo chown <owner>:<owner> /opt/pkg/petalinux/2019.2
./petalinux-v2018.3-final-installer.run /opt/pkg/petalinux/2019.2


Petalinux 2018.2

General notes

Xilinx Release Notes available on: Xilinx AR#71201

Installation failed

Command./petalinux-v2018.3-final-installer.run /opt/pkg/petalinux
Error Message
could not install "..yocto/source" files during installation
Workaround

Do not use root account to install petalinux.

Code Block
languagebash
sudo chown <owner>:<owner> /opt/pkg/petalinux
./petalinux-v2018.2-final-installer.run /opt/pkg/petalinux


Petalinux 2017.4

General notes

Xilinx Release Notes available on: AR#70277

Installation failed

Command./petalinux-v2017.4-final-installer.run /opt/pkg/petalinux
Error Message
could not install "..yocto/source" files during installation
Workaround

Do not use root account to install petalinux.

Code Block
languagebash
sudo chown <owner>:<owner> /opt/pkg/petalinux
./petalinux-v2017.4-final-installer.run /opt/pkg/petalinux


Petalinux 2017.2

General notes

Xilinx Release Notes available on: AR# 69372

Installation failed

Command./petalinux-v2017.2-final-installer.run /opt/pkg/petalinux
Error Message
could not install "..yocto/source" files during installation
Workaround

Do not use root account to install petalinux.

Code Block
languagebash
sudo chown <owner>:<owner> /opt/pkg/petalinux
./petalinux-v2017.2-final-installer.run /opt/pkg/petalinux


Petalinux 2017.1

General notes

Xilinx Release Notes available on: AR# 69074

Installation failed

Command./petalinux-v2017.1-

Petalinux 2016.4

Installation failed

...

final-installer.run /opt/pkg/petalinux
Error Message

...

 

 

could not install "..yocto/source" files during installation
Workaround

Do not use root account to install petalinux.

Code Block
languagebash
sudo chown <owner>:<owner> /opt/pkg/petalinux
./petalinux-v2017.1-final-installer.run /opt/pkg/petalinux


Build process failed

Commandpetalinux-build
ErrorProblems with device tree and serial port
Workaround

See: https://forums.xilinx.com/t5/Embedded-Linux/Petalinux-v2017-1-device-tree-and-serial-ports/td-p/764735



Petalinux 2016.4

General notes

Xilinx Release Notes available on: AR# 68370


Installation failed

Commandsudo ./petalinux-v2016.4-final-installer.run /opt/pkg/petalinux
Error Message

...


Code Block
languagebash
collapsetrue
INFO: Checking installer checksum...
INFO: Extracting PetaLinux installer...
INFO: Installing PetaLinux...
INFO: Checking PetaLinux installer integrity...
INFO: Extracting Installation files...
INFO: Checking installation environment requirements...
INFO: Installing PetaLinux SDK to "/opt/Xilinx/petalinux-v2016.4-final/."
INFO: Installing PetaLinux zynqMP Yocto SDK to "/opt/Xilinx/petalinux-v2016.4-final/./components/yocto/source/aarch64"...
*********************************************
ERROR: Failed to install Yocto SDK for zynqMP.
*********************************************

...

 

 


Workaround

...

Do not use root account to install petalinux.

Code Block
languagebash
sudo chown <owner>:<owner> /opt/pkg/petalinux
./petalinux-v2016.4-final-installer.run /opt/pkg/petalinux

...



Kernel

...

configuration failed

Commandpetalinux-config -c kernel
Error Message


Code Block
languagebash
collapsetrue
[INFO] generating Kconfig for project
 
[INFO] sourcing bitbake
[INFO] generating plnxtool conf
[INFO] generating meta-plnx-generated layer
<...>
[INFO] generating machine configuration
[INFO] configuring: kernel
[INFO] generating kernel configuration files
[INFO] bitbake virtual/kernel -c menuconfig
Loading
 cache: 100% 
|#######################################################################################################################|
 ETA: 00:00:00
Loaded 2938 entries from dependency cache.
Parsing 
recipes: 100% 
|#####################################################################################################################|
 Time: 00:00:06
Parsing of 2325 .bb files complete (2291 cached, 34 parsed). 2940 targets, 196 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
NOTE: Preparing RunQueue
NOTE: Executing RunQueue Tasks
NOTE: Tasks Summary: Attempted 2 tasks of which 0 didn't need to be rerun and all succeeded.
Loading
 cache: 100% 
|#######################################################################################################################|
 ETA: 00:00:00
Loaded 2938 entries from dependency cache.
Parsing 
recipes: 100% 
|#####################################################################################################################|
 Time: 00:00:06
Parsing of 2325 .bb files complete (2291 cached, 34 parsed). 2940 targets, 196 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
NOTE: Preparing RunQueue
NOTE: Checking sstate mirror object availability (for 2 objects)
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
WARNING: linux-xlnx-4.6-xilinx+gitAUTOINC+2762bc9163-r0 do_menuconfig: Unsupported terminal "screen", defaulting to "auto"
ERROR:
 linux-xlnx-4.6-xilinx+gitAUTOINC+2762bc9163-r0 do_menuconfig: Unable to
 spawn terminal screen: Execution of 
'<...>/build/tmp/work/plnx_arm-xilinx-linux-gnueabi/linux-xlnx/4.6-xilinx+gitAUTOINC+2762bc9163-r0/temp/run.do_terminal.10088'
 failed with exit code -6:
Fatal Python error: Py_Initialize: Unable to get the locale encoding
ImportError: No module named 'encodings'
Current thread 0x00007faa3309f700 (most recent call first):
ERROR: linux-xlnx-4.6-xilinx+gitAUTOINC+2762bc9163-r0 do_menuconfig: Function failed: do_menuconfig
ERROR:
 Logfile of failure stored in: 
<...>/build/tmp/work/plnx_arm-xilinx-linux-gnueabi/linux-xlnx/4.6-xilinx+gitAUTOINC+2762bc9163-r0/temp/log.do_menuconfig.10088
ERROR: Task 7 (/opt/petalinux-v2016.4-final/components/yocto/source/arm/layers/meta-xilinx/recipes-kernel/linux/linux-xlnx_4.6.bb, do_menuconfig) failed with exit code '1'
NOTE: Tasks Summary: Attempted 170 tasks of which 161 didn't need to be rerun and 1 failed.
Summary: 1 task failed:
 /opt/petalinux-v2016.4-final/components/yocto/source/arm/layers/meta-xilinx/recipes-kernel/linux/linux-xlnx_4.6.bb, do_menuconfig
Summary: There was 1 WARNING message shown.
Summary: There were 2 ERROR messages shown, returning a non-zero exit code.
ERROR: bitbake failed to configure kernel
ERROR: Failed to config kernel.
webtalk failed:PetaLinux statistics:extra lines detected:notsent_nofile!
webtalk failed:Failed to get PetaLinux usage statistics!


Workaround

Problem related to python environment and gnome-terminal. One of possible solutions is to remove gnome-terminal.

Install terminator as replacement for gnome-terminal, or xterm can be used instead of gnome-terminal

Code Block
languagebash
sudo apt-get install terminator
sudo apt-get remove gnome-terminal


Build process failed

Commandpetalinux-build
petalinux-config -c kernel
Error Message


Code Block
languagebash
collapsetrue
sh: line 1: 29590 Segmentation fault      
/opt/pkg/tools/webtalk/bin/unwrapped/lnx64.o/xilproxy > 
/home/petalinux/SVN/cores/2016.4/design/TEC0053/ARTY_Z7_FULL/os/petalinux/.Xil/Webtalk-29586-petalinux-VirtualBox/webtalk/xilproxy.log 2>&1
/opt/pkg/tools/webtalk/bin/unwrapped/lnx64.o/xilproxy
/opt/pkg/tools/webtalk/bin/unwrapped/lnx64.o/xilproxy: error while loading shared libraries: libtcmalloc.so.4: cannot open shared object file: No such file or directory


Workaround

Disable PetaLinux webtalk

Code Block
languagebash
petalinux-util --webtalk off

...

 

...