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 giorgio.lopez
Observer
12,400 Views

zedboard BSP build fails out of the box

Hello,

 

I downloaded the Petalinux 2015.2 tools and the Avnet Zedboard 2015.2 BSP

 

However, as soon as I try petalinux-build after the creation of the project, i get the error:

 

 

[...I skip the initial messages which all look correct...]
[INFO ] Update and install vmlinux image
[INFO ] vmlinux linux/kernel
[INFO ] install linux/kernel
[INFO ] package zImage
[INFO ] zImage linux/kernel
[INFO ] install linux/kernel
[ERROR] ERROR: Invalid ELF file '/home/lopez/Petalinux-Projects/Avnet-Digilent-ZedBoard-2015.2/images/linux/vmlinux'
[ERROR] make[1]: *** [package-subsystem-FIT] Errore 255
ERROR: Failed to build linux.

 

Also, if I try to boot the prebuilt image with petalinux-boot --qemu --prebuilt 3 I get:

 

INFO: The image provided is a zImage

INFO: Set QEMU tftp to /home/lopez/Petalinux-Projects/Avnet-Digilent-ZedBoard-2015.2/images/linux
Uso: grep [OPZIONE]... MODELLO [FILE]...

Usare "grep --help" per ulteriori informazioni.

INFO: TCP PORT is free

INFO: Starting arm QEMU

INFO: qemu-system-aarch64 -L /opt/Xilinx/petalinux-v2015.2-final/etc/qemu -M arm-generic-fdt-plnx -machine linux=on -display none -kernel /tmp/tmp.NrxdGEgjgl -gdb tcp::9000 -dtb /tmp/tmp.pkk2bd9Zfu -tftp /home/lopez/Petalinux-Projects/Avnet-Digilent-ZedBoard-2015.2/images/linux

--------------------------------------------------------------------

Xilinx QEMU Jul 13 2015 04:08:08.

--------------------------------------------------------------------

qemu-system-aarch64: Unable to get size of device tree file '/tmp/tmp.pkk2bd9Zfu'

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

 

I don't know if the error is connected to the wrong grep usage at the beginning of the flow.

 

Anybody can help? Much appreciated thanks

 

Giorgio

0 Kudos
25 Replies
Visitor amin_vision
Visitor
12,323 Views

Re: zedboard BSP build fails out of the box

I have the same problem :(

0 Kudos
12,235 Views

Re: zedboard BSP build fails out of the box

Did you find a solution to this problem? I am having the same issue.

 

Steven

0 Kudos
Xilinx Employee
Xilinx Employee
12,187 Views

Re: zedboard BSP build fails out of the box

 

I have tried using the zedboard BSP on RHEL6 and Petalinux  2015.2 and i don't see the issue.

 

What is the Linux distribution on which petalinux is installed in this case?

 

Regards,
Achutha

---------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.

Give Kudos to a post which you think is helpful and reply oriented.
----------------------------------------------------------------------------------------
0 Kudos
Highlighted
Visitor hs2
Visitor
12,187 Views

Re: zedboard BSP build fails out of the box

I had the same issue :(

But fortunately I found and fixed the problem after pretty lengthy investigation.

(petalinux-readelf missed libz.so.1)

 

Note that's related to an Ubuntu.x64 14.04 host system.

 

All in all you need to:

sudo apt-get install libssl-dev
sudo apt-get install lib32z1

to get 2015.2 installed (see this posting) and run it.

 

Good luck, HS2

Visitor hs2
Visitor
12,165 Views

Re: zedboard BSP build fails out of the box

Missed to mention that I was successfully using 2014.4 before and and the described packages are needed in addition for 2015.2.

HS2

0 Kudos
Observer giorgio.lopez
Observer
12,128 Views

Re: zedboard BSP build fails out of the box

I'm sorry,

 

I am experiencing this on Ubuntu 14.04 as well but the installation of the two libraries didn't fix the issue.

 

I'm still having errors while running qemu on the prebuilt image or rebuilding the image

 

Giorgio Lopez

0 Kudos
Visitor hs2
Visitor
12,125 Views

Re: zedboard BSP build fails out of the box

I didn't verify QEMU so maybe there are even more packages missing.

Try to find the qemu binaries e.g. using

'find <petalinux install dir>/tools -name *qemu*

and just invoke them to check if they launch successfully.

 

Good luck, HS2

0 Kudos
12,077 Views

Re: zedboard BSP build fails out of the box

I am experiencing the problem on Ubuntu 14.04. It seems it may be a distribution specific problem.
0 Kudos
Observer kmshaw_saic
Observer
11,992 Views

Re: zedboard BSP build fails out of the box

I'm also getting the "Invalid ELF file..." error. I'm running 2015.2 under Red Hat Enterprise 6.6. It's a custom design and not the Zedboard BSP.

 

Kevin

 

0 Kudos
11,524 Views

Re: zedboard BSP build fails out of the box

 

I found that I have this problem on Ubuntu and Red Hat. I also found that by installing the i386 versions of a few libraries I was able to get everything working.

 

ncurses-dev:i386
libstdc++6:i386
libselinux1:i386
lib32ncurses5-dev

 

0 Kudos
Visitor ben.harris
Visitor
11,493 Views

Re: zedboard BSP build fails out of the box

Also seeing this issue on custom hardware.

 

I'm using a VM to develop:

Guest System: Ubuntu 14.04.2 LTS

Host System: Windows 7 Professional SP 1 64 bit

 

In the terminal output, I'm getting:


 ...

[INFO ] package rootfs.cpio to /home/bharris/plnx/plnx.plnx/images/linux
[INFO ] Update and install vmlinux image
[INFO ] vmlinux linux/kernel
[INFO ] install linux/kernel
[INFO ] package zImage
[INFO ] zImage linux/kernel
[INFO ] install linux/kernel
[ERROR] ERROR: Unable to create FIT image
[ERROR] make[1]: *** [package-subsystem-FIT] Error 255
ERROR: Failed to build linux


In build/build.log:


 ...

[ALL ] kernel_loadaddr=$(grep -e "^CONFIG_SUBSYSTEM_MEMORY_.*_KERNEL_BASEADDR=" "/home/bharris/plnx/plnx.plnx/subsystems/linux/config" | head -n1 | cut -d "=" -f 2 ); [ ! -z "${kernel_loadaddr}" ] && kernel_loadaddr="--kernel_loadaddr ${kernel_loadaddr}";  .....
[ALL ] mkimage: Can't open /home/bharris/plnx/plnx.plnx/images/linux/image.ub.tmp: No such file or directory
[ERROR] ERROR: Unable to create FIT image
[ERROR] make[1]: *** [package-subsystem-FIT] Error 255
[ALL ] make[1]: Leaving directory `/home/bharris/plnx/plnx.plnx/build/linux'
[ALL ] make: *** [package] Error 2
[ALL ] make: Leaving directory `/home/bharris/plnx/plnx.plnx/build/linux'


I've attached the build.log. Has anyone else seen this kind of output and managed to resolve the problem?

 

I've tried the various package installation recommendations; none have worked so far. What's really bothering me is that I was using this system just a few days ago and it did several petalinux builds absolutely fine..

 

Cheers,

Ben

0 Kudos
Visitor hs2
Visitor
11,479 Views

Re: zedboard BSP build fails out of the box

Dunno, but I'd try invoking all binaries here

.../petalinux-v2015.2-final/tools/linux-i386/petalinux/bin/unexport/

just to be really sure that there is no lib.so missing.

 

Regards, HS2

0 Kudos
Observer kmshaw_saic
Observer
11,469 Views

Re: zedboard BSP build fails out of the box

>> I'm also getting the "Invalid ELF file..." error. I'm running 2015.2 under Red Hat Enterprise 6.6.

>> It's a custom design and not the Zedboard BSP.

 

I also tried this with the Vivado Zynq example design to rule out a problem with my custom design and I get the same error.

 

Kevin

 

0 Kudos
Visitor ben.harris
Visitor
11,448 Views

Re: zedboard BSP build fails out of the box


hs2 wrote:

Dunno, but I'd try invoking all binaries here

.../petalinux-v2015.2-final/tools/linux-i386/petalinux/bin/unexport/

just to be really sure that there is no lib.so missing.

 

Regards, HS2


Ah ha! plnxcrc32 seg faults on run. Thanks for the suggestion, just need to figure out what it wants now..

0 Kudos
Observer masrut
Observer
11,395 Views

Re: zedboard BSP build fails out of the box

 


ben.harris wrote:

hs2 wrote:

Dunno, but I'd try invoking all binaries here

.../petalinux-v2015.2-final/tools/linux-i386/petalinux/bin/unexport/

just to be really sure that there is no lib.so missing.

 

Regards, HS2


Ah ha! plnxcrc32 seg faults on run. Thanks for the suggestion, just need to figure out what it wants now..


 

I have the same problem. I am running Petalinux 2015.2 on Virtualbox under latest Ubuntu.

Exactly the same issue as you. Same segmentation fault also. I tested also under CENTOS 7 and I find exactly the same issue. 

0 Kudos
Observer kmshaw_saic
Observer
11,375 Views

Re: zedboard BSP build fails out of the box

This is what I did to fix the problem:

 

  • Look at pages 9 and 10 of UG1144(v2015.2)
  • Check that all libraries have been installed
  • Install any missing libraries

 

Even though UG1144 states "The PetaLinux installation process checks for these packages, and reports an error if
any are missing." I had a few that were missing. Missing library "zlib.i686" was causing my error.

 

Kevin

 

0 Kudos
Observer masrut
Observer
11,338 Views

Re: zedboard BSP build fails out of the box

I installed everything. And my petalinux installation says that nothing is missing....so I think that this problem might have multiple reasons. One reason is the library missing, but there must be some other hidden reason that we don't know...

0 Kudos
Newbie hpsebds
Newbie
11,308 Views

Re: zedboard BSP build fails out of the box

I was having the same problem.  It started working after I changed /bin/sh to link to bash instead of dash (in addition to installing all the libraries mentioned previously).  It seems the build scripts must have a dependency on the bash extensions...

0 Kudos
Visitor ben.harris
Visitor
11,286 Views

Re: zedboard BSP build fails out of the box


masrut wrote:

 


ben.harris wrote:

hs2 wrote:

Dunno, but I'd try invoking all binaries here

.../petalinux-v2015.2-final/tools/linux-i386/petalinux/bin/unexport/

just to be really sure that there is no lib.so missing.

 

Regards, HS2


Ah ha! plnxcrc32 seg faults on run. Thanks for the suggestion, just need to figure out what it wants now..


 

I have the same problem. I am running Petalinux 2015.2 on Virtualbox under latest Ubuntu.

Exactly the same issue as you. Same segmentation fault also. I tested also under CENTOS 7 and I find exactly the same issue. 


I also tried CentOS under a VM however I found that mine worked after installing various SSL packages.. I wish I was able to offer some advice under Ubuntu but I've given up on trying to figure out what's missing.

0 Kudos
Visitor bobsmithba
Visitor
8,249 Views

Re: zedboard BSP build fails out of the box

Did you find a solution.  I am new to peta-linux and I am having the same issue.  I did install the redhat-lsb package to solve the device-tree error but still have this issue.

 

Thanks,

Bob

0 Kudos
Visitor bobsmithba
Visitor
8,236 Views

Re: zedboard BSP build fails out of the box

Still not working.  Using Centos 7,

 

install sslopeb-devel,  and zlib and zlib-devel   (zlib-devel-1.2.7-13.el7.x86_64 already installed and latest version
Nothing to do)

 

lib32stdc++6,  does not exist for centos 7.

 

Still looking for help.

0 Kudos
Visitor deffi
Visitor
8,170 Views

Re: zedboard BSP build fails out of the box

You may want to try changing the locale to default (english) before calling petalinux-build or petalinux-boot:

unset LANG

This solved both the "Invalid ELF file" and the "Unable to get size of device tree" problem for me.

If any environment variables beginning with LC_ are set, you may have to unset them as well.

 

It seems like Xilinx never tested their products with a non-english locale; I've encountered similar issues with Vivado before.

 

 

Regards,

Martin

 

0 Kudos
Visitor soischshald
Visitor
7,763 Views

Re: zedboard BSP build fails out of the box

@deffi: I have also the problem "ERROR: Invalid ELF file ..." when I build petalinux with command petalinux-build and your solution proposal solve my problem so I just will say thank you :-)

0 Kudos
6,688 Views

Re: zedboard BSP build fails out of the box

I had this same problem under Ubuntu 14.04 LTS and these are the steps I took to eventually fix the problem (note that it was only after doing the last step that I was able to eliminate the error, but I'm listing all the steps I took for completeness):

 

1. I changed by default shell to bash (as discussed here)

2. I installed all of the required libraries as listed in the PetaLinux install guide (even though the installer did not flag any missing libraries, some of them were not installed)

3. I changed my locale to US english (was Canada english)

4. Installed the qemu-system-arm:i386 library using this command (as discussed here):

 

sudo apt-get install qemu-system-arm:i386

 

0 Kudos
Visitor chenzhenyuch
Visitor
2,055 Views

Re: zedboard BSP build fails out of the box

I have also met the same issue,the error log as belows:

 

root@ubuntu:/home/z/user/project_test# petalinux-build INFO: Checking component... INFO: Generating make files and build linux INFO: Generating make files for the subcomponents of linux INFO: Building linux [INFO ] build system.dtb [INFO ] build linux/kernel [INFO ] generate linux/u-boot configuration files [INFO ] update linux/u-boot source [INFO ] build linux/u-boot [INFO ] build zynq_fsbl [INFO ] Setting up stage config [INFO ] Setting up rootfs config [INFO ] Updating for cortexa9-vfp-neon [INFO ] Updating package manager [INFO ] Expanding stagefs [INFO ] build kernel in-tree modules [INFO ] modules linux/kernel [INFO ] install system.dtb [INFO ] install linux/kernel [INFO ] generate linux/u-boot configuration files [INFO ] update linux/u-boot source [INFO ] build linux/u-boot [INFO ] install linux/u-boot [INFO ] Expanding rootfs [INFO ] install sys_init [INFO ] install kernel in-tree modules [INFO ] modules_install linux/kernel [INFO ] package rootfs.cpio to /home/z/user/project_test/images/linux [INFO ] Update and install vmlinux image [INFO ] vmlinux linux/kernel [INFO ] install linux/kernel [INFO ] package zImage [INFO ] zImage linux/kernel [INFO ] install linux/kernel [ERROR] ERROR: Invalid ELF file '/home/z/user/project_test/images/linux/vmlinux' [ERROR] make[1]: *** [package-subsystem-FIT] Error 255 ERROR: Failed to build linux Then, I have installed the two package using this two CMD: sudo apt-get install libssl-dev sudo apt-get install lib32z1 Now I can build the petalinux project with no issue, logs: root@ubuntu:/home/z/user/project_test# petalinux-build INFO: Checking component... INFO: Generating make files and build linux INFO: Generating make files for the subcomponents of linux INFO: Building linux [INFO ] build linux/kernel [INFO ] generate linux/u-boot configuration files [INFO ] update linux/u-boot source [INFO ] build linux/u-boot [INFO ] build zynq_fsbl [INFO ] build kernel in-tree modules [INFO ] modules linux/kernel [INFO ] install system.dtb [INFO ] install linux/kernel [INFO ] generate linux/u-boot configuration files [INFO ] update linux/u-boot source [INFO ] build linux/u-boot [INFO ] install linux/u-boot [INFO ] install sys_init [INFO ] install kernel in-tree modules [INFO ] modules_install linux/kernel [INFO ] package rootfs.cpio to /home/z/user/project_test/images/linux [INFO ] Update and install vmlinux image [INFO ] vmlinux linux/kernel [INFO ] install linux/kernel [INFO ] package zImage [INFO ] zImage linux/kernel [INFO ] install linux/kernel [INFO ] Package HDF bitstream Hope that can resolve your problem
0 Kudos