PetaLinux 2019.1 on Debian 10.3 Running on VMWare Workstation 14 Player Debug Log


This post lists the steps I took to bring up PetaLinux 2019.1 on Debian 10.3 running on VMWare Workstation 14 Player.


The log shows:


How to fix: "E: Unable to locate package" on Debian 10.3


How to fix: "E: Unable to locate package zlib1g:i386" on Debian 10.3


How to install PetaLinux Tools 2019.1 into HOME


How to fix: "/mnt/hgfs/shared/petalinux-v2019.1-final-installer.run: line 140: /tmp/tmp.D0y1BqZe6j/petalinux-env-check: No such file or directory

ERROR: Failed to extract Petalinux installer..."


How to fix: "ERROR: You are missing the following system tools required by PetaLinux: - libtool"


How to fix: "WARNING: /bin/sh is not bash!" when your shell is set to bash


How to fix: "ERROR: Failed to generate /home/demo/plxprjs/xilinx-zc706-2019.1/build/misc/config/Kconfig.syshw" after typing petalinux-build


How to fix: "[INFO] generating Kconfig for project

couldn't read file "/home/demo/plxprjs/xilinx-zc706-2019.1/build/misc/config/hw-description/hw-description.tcl": no such file or directory"


How to fix:

./xsct: line 194: 20320 Segmentation fault "$RDI_BINROOT"/unwrapped/"$RDI_PLATFORM$RDI_OPT_EXT"/rlwrap -rc -b "(){}[],+= & ^%$#@"";|\\" -f "$HDI_APPROOT"/scripts/xsct/xsdb/cmdlist -H "$LOG_FILE" "$RDI_BINROOT"/loader -exec rdi_xsct "${RDI_ARGS[@]}"

...when running xsct directly


How to fix: hang at "[INFO] generating bbappends for project . This may take time !" Note: this one is fixed by using at least 4 GB of RAM in the VM and 4 cores.


See kernel hang at: "hrtimer: interrupt took 66668558 ns" and continue...



Part A: Make Sure Packages can be Installed


Step #1: Typed: sudo apt-get install dos2unix


I saw:


Reading package lists... Done

Building dependency tree

Reading state information... Done

E: Unable to locate package dos2unix


Step #2: Consulted "How to Add a Package Repository to Debian" @ [link]


Step #3: Typed: sudo nano /etc/apt/sources.list


Step #3.1: Added this line in bold:


deb http://security.debian.org/debian-security buster/updates main

deb-src http://security.debian.org/debian-security buster/updates main


deb http://ftp.us.debian.org/debian buster main contrib non-free


Step #3.2 Saved the file and exited.


Step #4: Typed: sudo apt-get update


Step #4.1: I now see:


demo@debian:~/plxprjs/xilinx-zc706-2019.1$ sudo apt-get update
Hit:1 http://security.debian.org/debian-security buster/updates InRelease
Get:2 http://ftp.us.debian.org/debian buster InRelease [121 kB]
Get:3 http://ftp.us.debian.org/debian buster/main i386 Packages [7,863 kB]
Get:4 http://ftp.us.debian.org/debian buster/main amd64 Packages [7,906 kB]
Get:5 http://ftp.us.debian.org/debian buster/main Translation-en [5,968 kB]
Get:6 http://ftp.us.debian.org/debian buster/contrib i386 Packages [46.4 kB]
Get:7 http://ftp.us.debian.org/debian buster/contrib amd64 Packages [50.5 kB]
Get:8 http://ftp.us.debian.org/debian buster/contrib Translation-en [44.5 kB]
Get:9 http://ftp.us.debian.org/debian buster/non-free amd64 Packages [87.7 kB]
Get:10 http://ftp.us.debian.org/debian buster/non-free i386 Packages [76.2 kB]
Get:11 http://ftp.us.debian.org/debian buster/non-free Translation-en [88.8 kB]
Fetched 22.3 MB in 5s (4,236 kB/s)                                
Reading package lists... Done


Step #5: Type: sudo apt-get install dos2unix


You should now see:

demo@debian:~/plxprjs/xilinx-zc706-2019.1$ sudo apt-get install dos2unix
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  dos2unix
0 upgraded, 1 newly installed, 0 to remove and 45 not upgraded.
Need to get 391 kB of archives.
After this operation, 1,339 kB of additional disk space will be used.
Get:1 http://ftp.us.debian.org/debian buster/main amd64 dos2unix amd64 7.4.0-1 [391 kB]
Fetched 391 kB in 1s (558 kB/s)  
Selecting previously unselected package dos2unix.
(Reading database ... 71059 files and directories currently installed.)
Preparing to unpack .../dos2unix_7.4.0-1_amd64.deb ...
Unpacking dos2unix (7.4.0-1) ...
Setting up dos2unix (7.4.0-1) ...
Processing triggers for man-db (2.8.5-2) ...


Part B: Try to use the Packages that Xilinx Lists for Ubuntu 16.04.5 in the PetaLinux Tools Documentation Reference Guide


On page 11 of UG1144 (v2019.1) May 22, 2019 www.xilinx.com

PetaLinux Tools Documentation Reference Guide at [link] it lists the following (I've removed the -dev which looks like a typo):


sudo apt-get install -y gcc git make net-tools libncurses5-dev tftpd zlib1g-dev libssl-dev flex bison libselinux1 gnupg wget diffstat chrpath socat xterm autoconf libtool tar unzip texinfo zlib1g-dev gcc-multilib build-essential zlib1g:i386 screen pax gzip


Step #1: Typed: ^^^


Step #1.1: I saw:

E: Unable to locate package zlib1g:i386


Step #2: Consulted [https://wiki.debian.org/Multiarch/HOWTO]


Step #3: Typed:

sudo dpkg --add-architecture i386

sudo apt-get update

sudo apt-get install -y gcc git make net-tools libncurses5-dev tftpd zlib1g-dev libssl-dev flex bison libselinux1 gnupg wget diffstat chrpath socat xterm autoconf libtool tar unzip texinfo zlib1g-dev gcc-multilib build-essential zlib1g:i386 screen pax gzip


Step #3.1. I saw that this ^^^ worked, i.e. I was able to install zlib1g:i386



Part C: Make Sure the Shell Is BASH


Step #1: Typed: echo $SHELL


Step #1.1: I saw:

/bin/bash



Part D: Install PetaLinux Tools 2019.1 into $HOME


Step #1: Typed

mkdir -p $HOME/petalinux

/mnt/hgfs/shared/petalinux-v2019.1-final-installer.run $HOME/petalinux/2019.1


Step #1.1: Observed:

INFO: Checking installation environment requirements...

Please refer to the PetaLinux Tools Installation Guide.

Check the troubleshooting guide at the end of that manual, and if you are
unable to resolve the issue please contact customer support with file:
   /home/demo/petalinux_installation_log

/mnt/hgfs/shared/petalinux-v2019.1-final-installer.run: line 140: /tmp/tmp.D0y1BqZe6j/petalinux-env-check: No such file or directory
ERROR: Failed to extract Petalinux installer...

Step #1.2: Examined log. Typed:

cat /home/demo/petalinux_installation_log


Step #1.2.1: /home/demo/petalinux_installation_log did report anything new. It contained the output listed above.


Step #2: Consulted [https://forums.xilinx.com/t5/Embedded-Linux/Petalinux-installation-error-on-ubuntu-VM/td-p/987948] It says you need gawk


Step #2.1: Type the following to install gawk

sudo apt-get install gawk


Step #2.2: Saw gawk successfully installed


Step #3: Reran:

/mnt/hgfs/shared/petalinux-v2019.1-final-installer.run $HOME/petalinux/2019.1


Step #3.1: Observed:


demo@debian:~$ /mnt/hgfs/shared/petalinux-v2019.1-final-installer.run $HOME/petalinux/2019.1
INFO: Checking installation environment requirements...
WARNING: This is not a supported OS
INFO: Checking free disk space
INFO: Checking installed tools
ERROR: You are missing the following system tools required by PetaLinux:

 - libtool
Please check PetaLinux installation guide - required tools and libraries package section for detailed information

INFO: Checking installed development libraries
Please install them with your operating system package manager, and try again
WARNING: Please install required packages.

Please refer to the PetaLinux Tools Installation Guide.

Check the troubleshooting guide at the end of that manual, and if you are
unable to resolve the issue please contact customer support with file:
   /home/demo/petalinux_installation_log

Step #4: Consulted [https://forums.xilinx.com/t5/Embedded-Linux/PetaLinux-doesn-t-see-libtool-so-it-won-t-run/td-p/765603]


Step #4.1: The post suggests that the error message does not report the correct package. You actually need libtool-bin


Step #4.2: Type:

sudo apt-get install libtool-bin


Step #4.2.1: Saw libtool-bin successfully installed


Step #5: Reran:

/mnt/hgfs/shared/petalinux-v2019.1-final-installer.run $HOME/petalinux/2019.1


Step #5.1: Accepted the license agreements (Press: Enter,q,y,q,y)


Saw the following output that suggests the install went okay:

demo@debian:~$ /mnt/hgfs/shared/petalinux-v2019.1-final-installer.run $HOME/petalinux/2019.1
INFO: Checking installation environment requirements...
WARNING: This is not a supported OS
INFO: Checking free disk space
INFO: Checking installed tools
INFO: Checking installed development libraries
INFO: Checking network and other services
INFO: Checking installer checksum...
INFO: Extracting PetaLinux installer...

LICENSE AGREEMENTS

PetaLinux SDK contains software from a number of sources.  Please review
the following licenses and indicate your acceptance of each to continue.

You do not have to accept the licenses, however if you do not then you may
not use PetaLinux SDK.

Use PgUp/PgDn to navigate the license viewer, and press 'q' to close

Press Enter to display the license agreements
Do you accept Xilinx End User License Agreement? [y/N] > y
Do you accept Webtalk Terms and Conditions? [y/N] > y
Do you accept Third Party End User License Agreement? [y/N] > y
INFO: Installing PetaLinux...
INFO: Checking PetaLinux installer integrity...
INFO: Installing PetaLinux SDK to "/home/demo/petalinux/2019.1/."
INFO: Installing aarch64 Yocto SDK to "/home/demo/petalinux/2019.1/./components/yocto/source/aarch64"...
INFO: Installing arm Yocto SDK to "/home/demo/petalinux/2019.1/./components/yocto/source/arm"...
INFO: Installing microblaze_full Yocto SDK to "/home/demo/petalinux/2019.1/./components/yocto/source/microblaze_full"...
INFO: Installing microblaze_lite Yocto SDK to "/home/demo/petalinux/2019.1/./components/yocto/source/microblaze_lite"...
INFO: PetaLinux SDK has been installed to /home/demo/petalinux/2019.1/.


Part E: Build a BSP to Check Install


Step #1: Typed:

mkdir -p ~/plxprjs

cd ~/plxprjs

source ~/petalinux/2019.1/settings.sh


Step #1.1: I saw:

demo@debian:~/plxprjs$ source ~/petalinux/2019.1/settings.sh
PetaLinux environment set to '/home/demo/petalinux/2019.1'
WARNING: /bin/sh is not bash!
bash is PetaLinux recommended shell. Please set your default shell to bash.
WARNING: This is not a supported OS
INFO: Checking free disk space
INFO: Checking installed tools
INFO: Checking installed development libraries
INFO: Checking network and other services

Step #2: Point /bin/sh to bash. Typed:

sudo ln -sf bash /bin/sh


Step #3: Test it. Typed:

ls -l /bin/sh


Step #3.1: I now see:

lrwxrwxrwx 1 root root 4 Nov 23 00:38 /bin/sh -> bash

Step #4: Re-source settings. Type:

source ~/petalinux/2019.1/settings.sh


Step #4.1: Now I see:

PetaLinux environment set to '/home/demo/petalinux/2019.1'
WARNING: This is not a supported OS
INFO: Checking free disk space
INFO: Checking installed tools
INFO: Checking installed development libraries
INFO: Checking network and other services

Step #4.2: Will ignore:

WARNING: This is not a supported OS

Step #5: Typed:

petalinux-create -t project -s /mnt/hgfs/shared/xilinx-zc706-v2019.1-final.bsp


Step #5.1: I see:

INFO: Create project:
INFO: Projects:
INFO: 	* xilinx-zc706-2019.1
INFO: has been successfully installed to /home/demo/plxprjs/
INFO: New project successfully created in /home/demo/plxprjs/

Step #6: Typed:

cd xilinx-zc706-2019.1/

petalinux-build


Step #6.1: I see:

[INFO] building project
environment: line 100: rsync: command not found
environment: line 101: rsync: command not found
environment: line 102: rsync: command not found
[INFO] generating Kconfig for project
ERROR: Failed to generate /home/demo/plxprjs/xilinx-zc706-2019.1/build/misc/config/Kconfig.syshw
ERROR: Failed to Kconfig project
ERROR: Failed to build project

Step #6.2: Fix rsync. Type:

sudo apt-get install rsync


Step #7: Typed:

petalinux-build


Step #7.1: I see:

[INFO] building project
[INFO] generating Kconfig for project
ERROR: Failed to generate /home/demo/plxprjs/xilinx-zc706-2019.1/build/misc/config/Kconfig.syshw
ERROR: Failed to Kconfig project
ERROR: Failed to build project

Step #7.2: Examined build/build.log

[INFO] building project
[INFO] generating Kconfig for project
package require hsi FAILED:
invalid command name "hsi::create_dt_node"
    while executing
"hsi::create_dt_node -help"
    (in namespace eval "::hsi::help" script line 6)
    invoked from within
"namespace eval ::hsi::help {
    variable version 0.1

    ::xsdb::setcmdmeta {hsi create_dt_node} categories {hsi}
    ::xsdb::setcmdmeta {hsi create..."
    (file "/home/demo/petalinux/2019.1/tools/xsct/scripts/xsct/hsi/hsihelp.tcl" line 25)
    invoked from within
"source /home/demo/petalinux/2019.1/tools/xsct/scripts/xsct/hsi/hsihelp.tcl"
    ("package ifneeded hsi::help 0.1" script)ERROR: Failed to generate /home/demo/plxprjs/xilinx-zc706-2019.1/build/misc/config/Kconfig.syshw
ERROR: Failed to Kconfig project
ERROR: Failed to build project

Step #8: Installed libncurses5:

sudo apt-get install libncurses5


Step #9: Reran:

cd ..

rm -rf xilinx-zc706-2019.1

petalinux-create -t project -s /mnt/hgfs/shared/xilinx-zc706-v2019.1-final.bsp


Step #9.1: Saw:

INFO: Create project:
INFO: Projects:
INFO: 	* xilinx-zc706-2019.1
INFO: has been successfully installed to /home/demo/plxprjs/xilinx-zc706-2019.1/
INFO: New project successfully created in /home/demo/plxprjs/xilinx-zc706-2019.1/

Step #10: Ran:

petalinux-build


Step #10.1: Saw:

[INFO] building project
[INFO] generating Kconfig for project
ERROR: Failed to generate /home/demo/plxprjs/xilinx-zc706-2019.1/build/misc/config/Kconfig.syshw
ERROR: Failed to Kconfig project
ERROR: Failed to build project

Step #10.2: Examine build/build.log:

[INFO] building project
[INFO] generating Kconfig for project
couldn't read file "/home/demo/plxprjs/xilinx-zc706-2019.1/build/misc/config/hw-description/hw-description.tcl": no such file or directory
ERROR: Failed to generate /home/demo/plxprjs/xilinx-zc706-2019.1/build/misc/config/Kconfig.syshw
ERROR: Failed to Kconfig project
ERROR: Failed to build project

Step #11: Investigate running xsct directly. Typed:

cd ~/petalinux/2019.1/tools/xsct/bin/

./xsct


Step #11.1: Saw:

./xsct: line 194: 20320 Segmentation fault      "$RDI_BINROOT"/unwrapped/"$RDI_PLATFORM$RDI_OPT_EXT"/rlwrap -rc -b "(){}[],+= & ^%$#@"";|\\" -f "$HDI_APPROOT"/scripts/xsct/xsdb/cmdlist -H "$LOG_FILE" "$RDI_BINROOT"/loader -exec rdi_xsct "${RDI_ARGS[@]}"

Step #11.2: Consulted [https://wiki.archlinux.org/index.php/Xilinx_Vivado#xsct,_xsdb,_xmd,_and_tclsh_segfault]

Step #11.3: Installed rlwrap. Typed:

sudo apt-get install rlwrap


Step #11.4: Check rlwrap's path. Typed:

which rlwrap


Step #11.4.1: Saw:

/usr/bin/rlwrap


Step 11.5: Edit xsct. Typed:

vi +194 xsct


Step #11.5.1: Changed(in bold)


"$RDI_BINROOT"/unwrapped/"$RDI_PLATFORM$RDI_OPT_EXT"/rlwrap -rc -b "(){}[],+= & ^%$#@"";|\\" -f "$HDI_APPROOT"/scripts/xsct/xsdb/cmdlist -H "$LOG_FILE" "$RDI_BINROOT"/loader -exec rdi_xsct "${RDI_ARGS[@]}"


to:


/usr/bin/rlwrap -rc -b "(){}[],+= & ^%$#@"";|\\" -f "$HDI_APPROOT"/scripts/xsct/xsdb/cmdlist -H "$LOG_FILE" "$RDI_BINROOT"/loader -exec rdi_xsct "${RDI_ARGS[@]}"


Step #12: Retested. Typed

cd ~/plxprjs

source ~/petalinux/2019.1/settings.sh

rm -rf xilinx-zc706-2019.1/

petalinux-create -t project -s /mnt/hgfs/shared/xilinx-zc706-v2019.1-final.bsp


Step #12.1: Saw: