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: 
Visitor borikgor
Visitor
6,955 Views
Registered: ‎09-01-2013

Petalinux: user-apps won't build

Jump to solution

Hi, guys.

I need some help here:

I'm working with a QEMU of the Petalinux on an Atlys BSP:

Linux version 3.3.0

Digilent-Atlys-AXI-XUP-14.2

It's my Student project, to run an application on the Petalinux..

 

I'm trying to make a simple "Hello, World" application for Petalinux and following all the steps, described in the 'Application Development and Debugging Guide'.

Just creating an application and trying to build the image of the petalinux fails with the following:

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

borisg@Project:~/Petalinux/software/petalinux-dist$ petalinux-new-app bapp
New application template successfully created in /home/borisg/Petalinux/software/user-apps/bapp
See bapp/README for what to do next.
borisg@Project:~/Petalinux/software/petalinux-dist$ make appconfig
[INFO ] Validating system configuration

borisg@Project:~/Petalinux/software/petalinux-dist$ make
[INFO ] Saving previous build.log
[INFO ] Building ucfront tool
[INFO ] Building kernel

.....

[INFO ] Building u-boot
[00:00] / /bin/sh: Bad substitution
make: *** [u-boot] Error 2

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

I have no idea, on what to make of this.. :(

Can somebody, please, help me out here?

Let me know, if any additional data may help.

0 Kudos
1 Solution

Accepted Solutions
Xilinx Employee
Xilinx Employee
9,355 Views
Registered: ‎08-02-2007

Re: Petalinux: user-apps won't build

Jump to solution

Hi

 

1. Check this link http://forums.xilinx.com/t5/Embedded-Linux/U-boot-make-Error-in-petalinux/td-p/301037

 

2. Try #sudo dpkg-reconfigure dash

 

--HS

 

 

----------------------------------------------------------------------------------------------
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.
----------------------------------------------------------------------------------------------

View solution in original post

8 Replies
Xilinx Employee
Xilinx Employee
9,356 Views
Registered: ‎08-02-2007

Re: Petalinux: user-apps won't build

Jump to solution

Hi

 

1. Check this link http://forums.xilinx.com/t5/Embedded-Linux/U-boot-make-Error-in-petalinux/td-p/301037

 

2. Try #sudo dpkg-reconfigure dash

 

--HS

 

 

----------------------------------------------------------------------------------------------
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.
----------------------------------------------------------------------------------------------

View solution in original post

Visitor borikgor
Visitor
6,928 Views
Registered: ‎09-01-2013

Re: Petalinux: user-apps won't build

Jump to solution

Thanks, mate.

Will check and get back with an answer.

0 Kudos
Visitor borikgor
Visitor
6,905 Views
Registered: ‎09-01-2013

Re: Petalinux: user-apps won't build

Jump to solution

I've tried both tips, but none helped me..

1. Reseting the configuration file, as described in the linked topic

2. Changing the Dash to Bash

Both resulted in the same output on the 'make' command:

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

[INFO ] Building u-boot
[00:00] / /bin/sh: Bad substitution
make: *** [u-boot] Error 2

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

Any additional help is appreciated.

0 Kudos
Xilinx Employee
Xilinx Employee
6,890 Views
Registered: ‎07-31-2008

Re: Petalinux: user-apps won't build

Jump to solution

What do you get if you run the following command?

$ ls -l /bin/sh

 

Tags (3)
Visitor borikgor
Visitor
6,867 Views
Registered: ‎09-01-2013

Re: Petalinux: user-apps won't build

Jump to solution

Got it!

Thanks guys, now the switch in my head turned to the right position! :)

I was using Dash.

 

After changing to Bash, by declining the request of the "sudo dpkg-reconfigure dash" command, I (my OS) was able to compile the application and fnish the make process.

 

Thanks a lot, guys for your invaluable help!

0 Kudos
Xilinx Employee
Xilinx Employee
6,856 Views
Registered: ‎07-31-2008

Re: Petalinux: user-apps won't build

Jump to solution

Good to see that you got over this. We have implemented a warning into PetaLinux to detect dash and guide users towards using bash.

0 Kudos
Visitor borikgor
Visitor
6,844 Views
Registered: ‎09-01-2013

Re: Petalinux: user-apps won't build

Jump to solution

Well, sadly I haven't seen that warning..

Another thing, that's bugging me:

Petalinux uses 'ash', which is neither 'bash', nor 'sh'.

How much the ash differs from bash?

Or is it a stupid question and 'ash', being the base of the busybox, is fully configurable?

0 Kudos
Scholar vanmierlo
Scholar
3,123 Views
Registered: ‎06-10-2008

Re: Petalinux: user-apps won't build

Jump to solution

If the scripts require bash, then why not modify their shebang to indicate that? Then the users don't have to modify their host and there is no need for the warning which leads to failure later on anyway. Xilinx, please replace #!/bin/sh with #!/bin/bash in the appropriate (generated?) scripts.

0 Kudos