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!

Showing results for 
Search instead for 
Did you mean: 
Visitor sirishy2k
Registered: ‎06-24-2011

Petalinux Build errors

Hello ppl,

I am working on rebuild the kernel using the

$make menuconfig


I have the following errors.


[INFO ] Saving previous build.log
[INFO ] Building ucfront tool
[INFO ] Building kernel
[INFO ] Building kernel modules
[INFO ] Building include
[INFO ] Building lib
[INFO ]  Building lib:lzo
[00:00] / [: 1: libssl: unexpected operator
[: 1: 0: unexpected operator
[INFO ]  Building lib:zlib
[00:00] / [: 1: libssl: unexpected operator
[: 1: 0: unexpected operator
[00:03] / /bin/sh: pushd: not found
/bin/sh: popd: not found
make[1]: *** [all] Error 127
make: *** [subdirs] Error 1


Please find my build log here http://www.box.net/shared/3fp4r7ev5hpdgay7h5aa


0 Kudos
2 Replies
Visitor pafisep
Registered: ‎01-14-2010

Re: Petalinux Build errors


You are using a Linux variant where /bin/sh is not the bash shell....

The issue is on this Makefile:


This makefile uses pushd and popd ( bash extensions ) and /bin/sh ( on Ubuntu and others distros ) is not bash.

The fast and easy way of solving the problem, is addding to the beginning of the makefile the line:


After that the kernel compiles ok.

Rant monde on:

Some guys assume that /bin/sh is bash. PLEASE DON'T DO THAT !
If you want to use bash extensions on your scripts, use /bin/bash !
/bin/sh is the plain simple Bourne shell. Ok?

If you don't know the difference between sh and bash, PLEASE ASK SOMEONE WHO DOES, or don't do shell scripts !

Rant mode off.

I feel much better now ! :smileyhappy:

Best regards
Paulo Ferreira

Registered: ‎09-19-2010

Re: Petalinux Build errors

Thanks for the above post.


I was tryin to build PetaLinux for the ZCU102 board. My platform is a 16.04 64Bits ubuntu and i am using vivado 2016.4.

As usual instructions of Xilinx for building reference design does not work.


I mean at least on this ubuntu it didn't work.


I came across the above post, indeed sh was the problem.

I removed the sh and made a symbolic link from bash to sh.


0 Kudos