Showing results for 
Show  only  | Search instead for 
Did you mean: 
Registered: ‎03-01-2019

Problem Installing Petalinux 2018.2 for Cross Compiling

I'm having an issue with the installation of Petalinux 2018.2 as packaged with the DNNDK/AI SDK download.

The first script, "" claims to have properly set up Petalinux for use once the appropriate environment setup script is run. I believe I am running the second script, the setup scriptc properly but cannot be certain about this. Looking deeper it appears there is no terminal output in the "environment-setup-aarch64-xilinx-linux" script unless there's a problem with the LD_LIBRARY_PATH, so I can't tell if it's running properly or not.

The problem is that once I try to use the "" script inside of the ZCU104 folder, I get the following error message:

petalinux sdk is not installed or setup properly yet.
please install it and put the following line into ~/.bashrc
        source /environment-setup-aarch-xilinx-linux
where PETALINUX_SDK_DIR is your installation directory

This happens if I install Petalinux in the /opt directory or in my local directory. The error in both cases is identical, regardless of installation location. I have included a screenshot of my terminal during the installation process below to help accurately depict the problem. I am using a laptop with Ubuntu 16.04 Desktop. The only changes made from the fresh install are package upgrades (apt update and apt full-upgrade), 4 new packages (Minicom, Nmap, SSH, and Anaconda), and the complete install of the DNNDK tools.

Any help in resolving this issue would be much appreciated. 

AI SDK Petalinux Install Problem.png

AI SDK Petalinux Install Problem.png
0 Kudos
4 Replies
Xilinx Employee
Xilinx Employee
Registered: ‎01-21-2014

Hi Tyler - First, to be clear, the script is not installing Petalinux, it's installing a Petalinux/Yocto SDK and sysroot so you can build applications.  It looks like that's succeeeding in your screenshot below. The next step is to source the environment setup script, which also seems to be succeeding - there should be no output. 

The script should be copying the board-specific libraries into the the sysroot of the that was installed by  

I don't see what exactly you're doing wrong - the only difference I see between when I went through this is that I did not run the scripts as root. Can give that a try and see if it works?

From the ZCU104 directory, my two commands are (../petalinux_sdk is where I installed the SDK): 

source ../petalinux_sdk/environment-setup-aarch64-xilinx-linux






0 Kudos
Registered: ‎03-01-2019


Thanks for the prompt reply and sorry for the delay on my end, I had to leave for the weekend shortly after making this post originally.

I have tried several different ways to run the environment setup script, and unfortunately none of them have managed to resolve the issue.

The first attempt was to simply run the script using "/opt/petalinux/2018.2/environment-setup-aarch64-xilinx-linux", but that returned a Permission denied error (this was why I was running the scripts as root earlier). If I run "sudo chmod 755 [script path]" and then execute the script as a normal user it gives no output as expected but the "" script still gives the same error. You can see this behavior in the photo below:

Test With Changing Permissions.png

Could the problem be that my ZCU104 directory (alongside the other DNNDK and AI SDK directories) is located in "~/Downloads" rather than in "/opt" alongside the petalinux directory? The installation guides for both the DNNDK and AI SDK never mentioned anything about where the .tar.gz needed to be extracted to, so if that is the problem then this should be made more clear in the guides.

In either case, running the scripts without root permissions did not solve the problem and gave the same error after a successful use of the "" script.

0 Kudos
Registered: ‎03-01-2019

I may have found a solution, but it is clear from the nature of the solution that your internal test sustem is not a standard installation of Ubuntu 16.04 but instead one where the user running the install has many root permissions by default without the use of sudo. I'm not sure why your VirtualBox setup show in the demo is working that way, but it definitely is.

In my first attempt I re-installed a fresh copy of Ubuntu 16.04 to test the install of the AI SDK. There were only 3 changes made to the fresh install from the .iso:

  1. "sudo apt update && sudo apt full-upgrade -y" to update Linux and included packages
  2. "sudo apt install nmap ssh minicom -y" to install necessary packages for SSH and serial comms
  3. Downloaded and ran the Anaconda install script, accepting default install path

Things went smoothly through the install of the DNNDK tools, no issues with the virtual environment install of DECENT or the non-virtual environment install of the DNNC. Then I ran these scripts to install the AI SDK:

  1. ./
    1. This worked fine, no errors
  2. . /opt/petalinux/2018.2/environment-setup-aarch64-xilinx-linux
    1. This worked fine, no errors
  3. ./
    1. Gave permission errors for just about every directory it wanted to access or modify, and then it gave a message stating that the install was successful. Clearly this message was incorrect.

Running ./ using sudo to elevate permissions would give the same error as I previously saw in my first 2 posts, likely because using sudo really messes with environment variables (the thing you're changing with the environment-setup script).

After that failed to properly work I reverted to a snapshot of my fresh install and tried again, but this time acting as the root user when I went to run the environment setup script and the AI SDK installation script. You can see the results of this attempt below:


Potential Solution.png

It would appear that solved the problem, even if I still have one error message to sort out (cannot open shared object file).

The long and short is that it appears Xilinx has modified their Ubuntu installation within their own VM environment to have root permissions at all times, and that this was never explained in the guides to install the AI SDK.

Potential Solution.png
0 Kudos
Xilinx Employee
Xilinx Employee
Registered: ‎05-10-2019

Try this.

Follow the steps in the picture.

host env setting up.jpg
0 Kudos