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: 
Explorer
Explorer
9,240 Views
Registered: ‎02-18-2014

2014.2 Image Build Processes Error

I have been attempting to follow the updated UG981 to learn the new process of 2014.2 in comparison with 2014.1 (petalinux and sdk).

 

Im currently having trouble building a bootable image, while i have done this hundreds of times with 2014.1.

 

The boot processes for 2014.1 was:

 

IN SDK:

- Important hardware platform from Vivado

- Build FSBL and FSBL_bsp from new hw_platform

- Build petalinux_bsp from new hw_platform(this requires the petalinux edk repo to be selected under the sdk repo options)

 

Terminal

- Create a new template petalinux project: "petalinux-create --type project --template zynq --name petalinux_project"

- Merge hardware platform with project: Inside petalinux_project send the command "petalinux_config --get-hw-description=/path/to/petalinux/bsp"

- use petalinux-config, petalinux-config -c kernel, and petalinux-config -c rootfs to configure the build for my zc702 board environment

- Build project: "petalinux-build"

- Build BOOT.BIN: "petalinux-package --boot --fsbl /path/to/fsbl.elf --fpga /path/to/bit --uboot"

 

At this point i have a image.ub and boot.bin to throw on a sd card and boot from

 

What steps are different for the new 2014.2 method? There seems to no longer be a petalinux_bsp anymore but rather a device_tree_bsp? That device_tree_bsp appears to have the ability to designate an OS, yet petalinux isn't available. How do i merge my hardware platform to my petalinux project without the petalinux bsp?

 

I've found a command to merge hw_platform and petalinux project: Inside hw_platform_0 send the command "petalinux-config --get-hw-description -p /path/to/petalinux_project"
, that appeared to have merged it but when i do "petalinux-build" next it fails with the following error:

 

force@force-Precision-WorkStation-T3500:~/workspace/Test_zc702/2014.2/Test1/petalinux_project$ 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 ] pre-build linux/rootfs/fwupgrade
[INFO ] pre-build linux/rootfs/peekpoke
[INFO ] pre-build linux/rootfs/uWeb
[INFO ] build system.dtb
[INFO ] build linux/kernel
[INFO ] update linux/u-boot source
[INFO ] generate linux/u-boot configuration files
[INFO ] build linux/u-boot
[INFO ] Setting up stage config
[INFO ] Setting up rootfs config
[INFO ] Updating for armv7a-vfp-neon
[INFO ] Updating package manager
[INFO ] Expanding stagefs
[ERROR] Errors were encountered while processing:
[ERROR] E: Sub-process /opt/petalinux-v2014.2-final/tools/packagemanager/bin/dpkg returned an error code (1)
[ERROR] make[2]: *** [.pkg_stagefs] Error 255
[ERROR] make[1]: *** [sub_build_component_/none/packages-repo/single/plnx-repo] Error 2
ERROR: Failed to build linux
force@force-Precision-WorkStation-T3500:~/workspace/Test_zc702/2014.2/Test1/petalinux_project$

 

So if anyone has a better set of direction then the documentation that isn't very clear, id appreciate it! thanks!

0 Kudos
33 Replies
Xilinx Employee
Xilinx Employee
9,235 Views
Registered: ‎09-10-2008

Re: 2014.2 Image Build Processes Error

Hi,

I'm seeing that same build error and it's being looked at. Stay tuned as more details are figured out.

Thanks.
0 Kudos
Xilinx Employee
Xilinx Employee
9,234 Views
Registered: ‎09-10-2008

Re: 2014.2 Image Build Processes Error

What host OS are you running as that could be helpful?
0 Kudos
Explorer
Explorer
9,234 Views
Registered: ‎02-18-2014

Re: 2014.2 Image Build Processes Error

Thanks John,

 

Nice to know im not alone on this one.

0 Kudos
Explorer
Explorer
9,233 Views
Registered: ‎02-18-2014

Re: 2014.2 Image Build Processes Error

Im currently running Ubuntu, i know its not supported but havn't had any issues with it in the past.

0 Kudos
Xilinx Employee
Xilinx Employee
9,229 Views
Registered: ‎09-10-2008

Re: 2014.2 Image Build Processes Error

Which version of Ubuntu?
And is this a VM or not? If a VM, is it your old VM you were running with the older Petalinux?
Sorry for the number of questions, but the answers can help.
0 Kudos
Explorer
Explorer
9,226 Views
Registered: ‎02-18-2014

Re: 2014.2 Image Build Processes Error

Oh no worries, ask all the questions you want.

 

I believe its Ubuntu 12.02 but i'll go verify it in the lab after i send this message off.

 

It is not running on a VM, i have a dedicated linux development machine for it, and yes this is the exact same environment that i was running with the older petalinux. In all actuality when i upgraded to the 2014.2 version of sdk and petalinux, i still have the older version on the machine. All i did after installing was give petalinux a unique name in my /opt/ directory, change my environment setting to recognize $petalinux, change my bashrc file to always source the new 2014.2 vivado settings, and 2014.2 petalinux settings. After that it should be fine, if i need to i can always change those configurations back to my old petalinux to verify its still working fine.

 

Hope that helps, and i'll let ya know if i got that ubuntu version wrong at all, but im pritty sure thats what it is.

0 Kudos
Explorer
Explorer
9,224 Views
Registered: ‎02-18-2014

Re: 2014.2 Image Build Processes Error

Version is Ubuntu 12.04 LTS, i was close but alittle off.

0 Kudos
Explorer
Explorer
9,216 Views
Registered: ‎02-18-2014

Re: 2014.2 Image Build Processes Error

boot.log file attached

0 Kudos
Visitor patrick.knox
Visitor
9,190 Views
Registered: ‎02-28-2014

Re: 2014.2 Image Build Processes Error

Also ran into same issue and am currently runnging Ubuntu 12.04 LTS (64-bit).

0 Kudos
Visitor t-watanbe
Visitor
8,985 Views
Registered: ‎06-16-2014

Re: 2014.2 Image Build Processes Error

I also got the same error:
  [INFO ] Expanding rootfs
  [ERROR] Errors were encountered while processing:
  [ERROR] E: Sub-process /home/user/petalinux/
    petalinux-v2014.2-final/tools/packagemanager/bin/dpkg
    returned an error code (1)
  [ERROR] make[2]: *** [.pkg_rootfs_expand] Error 255
  [ERROR] make[1]: *** [sub_install_component_/none/
     packages-repo/single/plnx-repo] Error 2
  ERROR: Failed to build linux

Just as a work-around, you could fix up the error by following instructions below:
 $ petalinux-build
 $ petalinux-build -c rootfs
 $ petalinux-build

0 Kudos
Explorer
Explorer
8,959 Views
Registered: ‎02-18-2014

Re: 2014.2 Image Build Processes Error

Unfortunately that work around does not work for me.

I'm still surprised such a primary functionality doesn't work properly. Anyone else have a work around? Is there an AR for this?

0 Kudos
Xilinx Employee
Xilinx Employee
8,954 Views
Registered: ‎09-10-2008

Re: 2014.2 Image Build Processes Error

I heard from one person the 3rd time they try to build it works.  That sounds very odd.  I just tried to confirm that on my system and it appeared to go ahead and work the 2nd time after the error. I've not tested the build yet, but the images are there.

 

 

0 Kudos
Explorer
Explorer
8,951 Views
Registered: ‎02-18-2014

Re: 2014.2 Image Build Processes Error

Attempting to build the project multiple times doesn't seem to make it work for me, even though i agree that would sound very odd if that worked. I wonder whats different about my setup. I created a webcase for this and will post any conclusions it brings up.

0 Kudos
8,946 Views
Registered: ‎06-18-2014

Re: 2014.2 Image Build Processes Error

I had a similar problem with petalinux-build 2014.2 (on Mint 17) failing after "[INFO ] Expanding stagefs"and it turned out to be the update-rc.d script. Check your build.log in the petalinux project. It is has errors like:

 

[ALL  ] dpkg: error processing /opt/petalinux-v2014.2-final/components/packages-repo/plnx-repo/pool/main/m/modutils-initscripts/modutils-initscripts_1.0-r7_armv7a-vfp-neon.deb (--unpack):
[ALL  ]  subprocess new pre-installation script returned error exit status 1
[ALL  ] configured to not write apport reports
[ALL  ] update-rc.d: error: unknown option
[ALL  ] usage: update-rc.d [-n] [-f] <basename> remove
[ALL  ]        update-rc.d [-n] <basename> defaults [NN | SS KK]
[ALL  ]        update-rc.d [-n] <basename> start|stop NN runlvl [runlvl] [...] .
[ALL  ]        update-rc.d [-n] <basename> disable|enable [S|2|3|4|5]
[ALL  ]         -n: not really
[ALL  ]         -f: force
[ALL  ]
[ALL  ] The disable|enable API is not stable and might change in the future.

 

My work around: find the update-rc.d_0.7-r5_all.deb (I found it in /opt/petalinux-v2014.2-final/components/packages-repo/plnx-repo/pool/main/u/update-rc.d) in and extract it somewhere convenient.

Back up the old update-rc.d

Overwrite update-rc.d with the version found in update-rc.d_0.7-r5_all.deb

Run the petalinux-build again and see what happens.

 

0 Kudos
8,798 Views
Registered: ‎09-12-2012

Re: 2014.2 Image Build Processes Error

I got the same problem on centos 6.5

 

For me the solution to place the "update-rc.d" in place didn't worked.

I tried to build the zedboard BSP, there were symbolic links in the project directory to update-rc.d that were broken.

After setting the update-rc.d in place (extracted out of .deb file) the problem stays unchanged.

 

Any idea how to solve this - or is it normal that the BSP of the zedboard is not buildable?

 

Best regards 

0 Kudos
Explorer
Explorer
8,794 Views
Registered: ‎02-18-2014

Re: 2014.2 Image Build Processes Error

Just an Update:

 

John's fix eventually did work for me after changing my method of merging the hardware with the petalinux project. Apparantly it matters, merging the hw_platform_0 directory with the petalinux project "works" though when you attempt to build it always fails to build. While merging the hdf file directly with the petalinux project, then allows the multi-build method to finally work. This is due to some complicated reasoning with Ubuntu vs Petalinux that i don't totally understand so won't try to explain.

 

All that being said, i think im going to hold off on 2014.2 for a month or two until some of these general issues get resolved.

0 Kudos
8,789 Views
Registered: ‎09-12-2012

Re: 2014.2 Image Build Processes Error

Now it works after installing libselinux.i686 (sudo yum install libselinux.i686)

 

solution was found on: http://forums.xilinx.com/t5/Embedded-Linux/Make-to-compile-the-Petalinux-software-image-but-quot-returned/td-p/377389

 

0 Kudos
Visitor rti
Visitor
8,773 Views
Registered: ‎06-12-2014

Re: 2014.2 Image Build Processes Error

What about Ubuntu?

My build succeeded on the third attempt though.

0 Kudos
Xilinx Employee
Xilinx Employee
8,764 Views
Registered: ‎12-17-2007

Re: 2014.2 Image Build Processes Error

We've been seeing this a bit on unsupported OS's -- namely Ubuntu (and those based on it) .

 

It has to do with PetaLinux using dpkg for the rootFS management and also the host OS using dpkg.  The incorrect version of dpkg is being picked up during the rootFS build process.

 

A simple workaround is to pre-pend the *full path* to the PetaLinux install's copy of dpkg to your $PATH.

 

The better long-term workaround is to stick to the supported OS's listed in the PetaLinux installation guide.  We are investigating supporting other OS's (including Ubuntu) officially in an upcoming PetaLinux release.

-------------------------------------------
this space intentionally left blank
0 Kudos
Observer eengie
Observer
11,797 Views
Registered: ‎06-30-2014

Re: 2014.2 Image Build Processes Error

I'm on CentOS 6.5 and was able to successfully use petalinux-build exactly once.  I then used petalinux-configure to modify a few settings for the rootfs (added libraries), and now the build crashes similar to everyone else's.  My logs indicate the failure is on ifupdown.

 

I've tried the several-run method to no avail.  And since this system is yum-based, I don't see how the dpkg path change would help me.

 

At this point I've tried cleaning (petalinux-build -x distclean) before attempting another build, and the build for the rootfs still fails.

0 Kudos
Highlighted
Observer y_okada
Observer
11,707 Views
Registered: ‎06-25-2014

Re: 2014.2 Image Build Processes Error

My environment: CentOS 6.5 (64bit kernel) on VMware

 

What I performed is as follows

1. installed petalinux to /opt/pkg (so that deep location should be avoided)

2. yum install libselinux (since i686 needed this package)

3. yum install libselinux.i686 

4. yum install libstdc++.so.6 

 

Then, building process worked til end.

 

I found that when I try to "make" at "linux/rootfs/" I got error saying "libstdc++.so.6  nof found". So I instgalled libstdc++.so.6.

 

 

0 Kudos
Observer y_okada
Observer
11,702 Views
Registered: ‎06-25-2014

Re: 2014.2 Image Build Processes Error

I also added following path, just in case at .bashrc

 

export PATH=$PATH:/opt/pkg/petalinux-v2014.2-final/tools/linux-i386/arm-xilinx-linux-gnueabi/bin
export PATH=$PATH:/opt/pkg/petalinux-v2014.2-final/tools/linux-i386/petalinux/bin

 

 

0 Kudos
Newbie kubal
Newbie
11,666 Views
Registered: ‎07-11-2014

Re: 2014.2 Image Build Processes Error

Maybe better solution is not to replace system app, but just add it to PATH for build session.

 

My solution:

   extract /opt/petalinux-v2014.2-final/components/packages-repo/plnx-repo/pool/main/u/update-rc.d/update-rc.d_0.7-r5_all.deb
    dkpg-deb --extract update-rc.d_0.7-r5_all.deb ~/petalinux_fix    (or wherever you want it)

   add path of petalinux version of update.rc.d (just extracted) to PATH
   export PATH=~/petalinux_fix/usr/sbin:$PATH

that finally solved my issue.

0 Kudos
Visitor jayyous
Visitor
11,605 Views
Registered: ‎10-13-2013

Re: 2014.2 Image Build Processes Error

I am using Ubuntu 14.04 LTS, PetaLinux 2014.2, 64-bit machine.
I am getting the following error trying to execute:
petalinux-build

[ERROR] E: Sub-process /opt/PetaLinux/petalinux-v2014.2-final/tools/packagemanager/bin/dpkg returned an error code (127)
[ERROR] make[2]: *** [.pkg_stagefs] Error 255
[ERROR] make[1]: *** [sub_build_component_/none/packages-repo/single/plnx-repo] Error 2
ERROR: Failed to build linux

 

I tried some of the ideas above but no luck!


Any idea please

0 Kudos
Newbie nevuor
Newbie
11,353 Views
Registered: ‎08-12-2014

Re: 2014.2 Image Build Processes Error

Works for me.

 

But instead of playing with PATH you can just do:

 

dpkg-deb --extract $PETALINUX/components/packages-repo/plnx-repo/pool/main/u/update-rc.d/update-rc.d_0.7-r5_all.deb .
sudo mv usr/sbin/update-rc.d $PETALINUX/tools/linux-i386/petalinux/bin
rmdir usr/sbin usr

 

Regards

Rouven

0 Kudos
Visitor yonga
Visitor
11,244 Views
Registered: ‎05-19-2010

Re: 2014.2 Image Build Processes Error

Hi all,

do we already have a fix for this issue? The previous solutions didn't work for me.

I'm on a Ubuntu 14.04, using PetaLinux 2013 (and 2014), without success.

 

Please help!

 

Franck 

0 Kudos
Visitor yonga
Visitor
11,187 Views
Registered: ‎05-19-2010

Re: 2014.2 Image Build Processes Error

Alright folks,

I got the issue fixed finally and this is how:

I started first by looking in the build.log file for more information about the issue and I found the following:

...

[ALL ] tinylogin-dev update-rc.d update-rc.d-dev

[ALL ] Authentication warning overridden.
[ALL ] /opt/PetaLinux/petalinux-v2013.10-final/tools/packagemanager/bin/dpkg: error while loading shared libraries: libselinux.so.1: cannot open shared object file: No such file or directory
[ERROR] E: Sub-process /opt/PetaLinux/petalinux-v2013.10-final/tools/packagemanager/bin/dpkg returned an error code (127)
[ERROR] make[2]: *** [pkg_stagefs] Error 255
[ALL ] make[2]: Leaving directory `/home/fyonga/Documents/Embedded_linux/Peta_projects/Xilinx-ZC702-2013.3/build/linux/rootfs/packages-repo'
...

 

and by checking at the depencies of dpkg used by petalinux, the command

ldd /petalinux/installation/folder/tools/packagemanager/bin/dpkg

 

returned:

 

linux-gate.so.1 => (0xf7731000)
libselinux.so.1 => not found
libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xf755f000)
/lib/ld-linux.so.2 (0xf7732000)

 

Effectively the shared library libselinux.so (that dpkg depends on) was missing. The solution was therefore to generate one and copy it inside the lib folder of the packagemanager. However, since those libraries are 32-bits and my computer is 64, I couldn't use directly the libselinux.so version in /lib/i386-linux-gnu/ (the standard one). I just copied the shared library on a 32-bit ubuntu version that I have installed on another computer and placed it in:  /petalinux/installation/folder/tools/packagemanager/lib

 

The file is attached here. A more beautiful solution (I think) would be to try generating one for a 32-bit version of your Ubuntu. 

 

Now it builds successfully the image! 

 

I hope this would help those in the same struggle. 

 

 

0 Kudos
Xilinx Employee
Xilinx Employee
11,162 Views
Registered: ‎12-17-2007

Re: 2014.2 Image Build Processes Error

I just put an Answer Record into the queue for publication on this as I got an answer from PetaLinux engineering about this.  To work around this properly requires a relatively small patch to the apt repository makefile.  Below is the ASCII contents of the patch:

 

diff --git a/components/packages-repo/Makefile  b/components/packages-repo/Makefile
index 2d90a90..e127b1b 100644
--- a/components/packages-repo/Makefile
+++ b/components/packages-repo/Makefile
@ -73,7 +73,7 @ TARGETROOT_APTROOT=$(BUILDROOT)/targetroot
TARGETROOT_APTROOT_CONF=$(TARGETDIR)/.targetroot.apt
TARGETROOT_APTCONFIG=$(TARGETROOT_APTROOT_CONF)/etc/apt/apt.conf.d/apt.conf

 -FALSEPATH=$(APTPATH)/bin:$(PATH)
+FALSEPATH=$(APTPATH)/bin:/usr/bin:/bin
FALSELDPATH=$(APTPATH)/lib:$(APTPATH)/lib/libfakeroot

 FAKEROOT=$(APTPATH)/bin/fakeroot
--
1.9.0

-------------------------------------------
this space intentionally left blank
0 Kudos
Newbie mahesh_sree
Newbie
9,055 Views
Registered: ‎01-17-2015

Re: 2014.2 Image Build Processes Error

Facing a similar problem, the builds were previously working just fine but now this nagging errror abruptly started happenning. The host is SUSE Linux 11 running on a Virtual Box machine, the relevant part of build.log is pasted below and the full log is attached.

 

Please note that the Makefile patch suggested at the end of this thread is not effective in this case at least. Any help will be appreciated!

 

[WARN ] dpkg: warning: overriding problem because --force enabled:
[ALL ] package architecture (armv7a-vfp-neon) does not match system (i386)
[ALL ] Preparing to replace update-alternatives-opkg 0.1.8+git0+c33b217016-r0 (using .../update-alternatives-opkg_0.1.8+git0+c33b217016-r0_armv7a-vfp-neon.deb) ...
[ALL ] Unpacking replacement update-alternatives-opkg ...
[ERROR] Errors were encountered while processing:
[ALL ] /opt/pkg/petalinux-v2014.2-final/components/packages-repo/plnx-repo/pool/main/i/init-ifupdown/init-ifupdown_1.0-r7_armv7a-vfp-neon.deb
[ERROR] E: Sub-process /opt/pkg/petalinux-v2014.2-final/tools/packagemanager/bin/dpkg returned an error code (1)
[ERROR] make[2]: *** [.pkg_stagefs] Error 255
[ALL ] make[2]: Leaving directory `/home/mahesh/target/bsp/Xilinx-ZC702-2014.2/build/linux/rootfs/packages-repo'
[ERROR] make[1]: *** [sub_build_component_/none/packages-repo/single/plnx-repo] Error 2
[ALL ] make[1]: Leaving directory `/home/mahesh/target/bsp/Xilinx-ZC702-2014.2/build/linux/rootfs'
[ALL ] make: *** [sub_build_component_/none/rootfs/single/petalinux-rootfs] Error 2
[ALL ] make: Leaving directory `/home/mahesh/target/bsp/Xilinx-ZC702-2014.2/build/linux'

 

 

0 Kudos