UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Observer pmusumeci
Observer
400 Views
Registered: ‎11-12-2018

petalinux 2018.3 on ubuntu-16.04.3: fails on "petalinux-boot --qemu --prebuilt 3"

Jump to solution

Environment: I have installed petalinux-2018.3 on Lubuntu-16.04.3-LTS via the fix that I found in these forums where script /usr/local/bin/sed was temporarily installed. The necessary packages as listed in Table 2-1 for ubuntu-16.04 in ug1144 were installed (those listed in section "Quick Installation of Packages", plus also {xvfb tofrodos gawk} so as to match the table), and the petalinux-create is using the correct bsp file xilinx-zcu102-v2018.3-final.bsp.

Problem: when running command petalinux-boot --qemu --prebuilt 3, I get error messages

qemu-system-aarch64: Unable to copy device tree in memory

qemu-system-aarch64: Error: Unable to load Device Tree /tmp/tmp.1UlaX5OmSF

before exit without any emulation. Note that a subsequent petalinux-build completes normally and populates the /tftpboot directory. A summary of my commands is shown below, and a log of the actual test run is attached and appended to it is laptop OS info and a copy of what I use to select petalinux version before including the xilinx settings script.

After getting the same error using the 2017.4 tools, I wondered if it was my computer but I can repeat this error in ubuntu-16.04.5 and Lubuntu-16.04.3 distributions. I read some other queries indicating that the petalinux tools were sensitive to the locale settings, so the laptop is currently configured as using US English and a west coast US timezone (and was installed off-line, using only a DVD). If I manually set LANG=C, I still get the error.

My /tmp area is world writeable, and sh means bash version 4.3.48(1).

Thanks for any suggestions.

 

SUMMARY OF USER COMMANDS

$ . source_petalinux_extra_tools.sh 

$ cd work/using_2018.3/
$ 'rm' -rf zcu102/
$ petalinux-create -t project -s xilinx-zcu102-v2018.3-final.bsp -n zcu102INFO: Create project: zcu102
$ cd zcu102/
$ petalinux-boot --qemu --prebuilt 3
$ petalinux-build
$ date
$ petalinux-boot --qemu --prebuilt 3

$ lsb_release -a

No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.3 LTS
Release: 16.04
Codename: xenial

$ uname -a
Linux raphael16 4.10.0-28-generic #32~16.04.2-Ubuntu SMP Thu Jul 20 10:19:48 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

0 Kudos
1 Solution

Accepted Solutions
Observer pmusumeci
Observer
315 Views
Registered: ‎11-12-2018

Re: petalinux 2018.3 on ubuntu-16.04.3: fails on "petalinux-boot --qemu --prebuilt 3"

Jump to solution
Eventually solved this myself, after considering common elements of test fails.

With an interactive bash environment variable defined via "export BLOCKSIZE=K", then qemu-system-aarch64 fails with the above error message. Once BLOCKSIZE is not set in bash initialisation, qemu-system-aarch64 boots up normally.

This is somewhat surprising as unix utilties such as df use BLOCKSIZE to select file system size display units. It appears that some functionality within qemu is influenced by this environment variable when doing a "copy device tree in memory".

Definitely recommend "unset BLOCKSIZE" after use of petalinux/201x.y/settings.sh script.
0 Kudos
3 Replies
Observer pmusumeci
Observer
364 Views
Registered: ‎11-12-2018

Re: petalinux 2018.3 on ubuntu-16.04.3: fails on "petalinux-boot --qemu --prebuilt 3"

Jump to solution
Small correction to environment description: remove any reference to script /usr/local/bin/sed as this was for another test using ubuntu-18 instead of ubuntu-16. The problem described here is after a normal install on ubuntu-16.04.3.
0 Kudos
Observer pmusumeci
Observer
316 Views
Registered: ‎11-12-2018

Re: petalinux 2018.3 on ubuntu-16.04.3: fails on "petalinux-boot --qemu --prebuilt 3"

Jump to solution
Eventually solved this myself, after considering common elements of test fails.

With an interactive bash environment variable defined via "export BLOCKSIZE=K", then qemu-system-aarch64 fails with the above error message. Once BLOCKSIZE is not set in bash initialisation, qemu-system-aarch64 boots up normally.

This is somewhat surprising as unix utilties such as df use BLOCKSIZE to select file system size display units. It appears that some functionality within qemu is influenced by this environment variable when doing a "copy device tree in memory".

Definitely recommend "unset BLOCKSIZE" after use of petalinux/201x.y/settings.sh script.
0 Kudos
Highlighted
Observer pmusumeci
Observer
254 Views
Registered: ‎11-12-2018

Re: petalinux 2018.3 on ubuntu-16.04.3: fails on "petalinux-boot --qemu --prebuilt 3"

Jump to solution

Some searching does show .py scripts in yocto that use a var BLOCKSIZE but one would have to investigate to see if these were responsible for an existing env var BLOCKSIZE breaking a "petalinux-boot --qemu --prebuilt 3".

 

The attached script ensures env vars are OK before pulling in standard settings.sh, and it includes a sample shell command to display any py or sh script files containing a specific variable name (like BLOCKSIZE) in case anyone suspects a similar issue in future.

0 Kudos