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: 
Participant ilya1976
Participant
12,907 Views
Registered: ‎04-07-2014

Petalinux settings.sh problem

Good day,

 

I use Ubuntu 10.04 installed as virtual machine, and Vivado 2013.4.

When I installed Petalinux and ran source settings.sh (page 5 UG976 (v2013.04))

first time, all messages appeared as on this page.

But when I ran source settings.sh after this, I get the warning:

 

PetaLinux environment set to '/home/ilyag/petalinux-v2013.04-final-full'
WARNING: /bin/sh is not bash!
bash is PetaLinux recommended shell. Please set your default shell to bash.

 

How can I fix it?

 

Thanks.

0 Kudos
6 Replies
Xilinx Employee
Xilinx Employee
12,906 Views
Registered: ‎02-06-2013

Re: Petalinux settings.sh problem

Hi

 

Check below links

 

http://forums.xilinx.com/t5/Embedded-Linux/Petalinux-Build-errors/td-p/160426

 

http://forums.xilinx.com/t5/New-Users-Forum/Trouble-installing-the-petalinux-SDK-in-Ubuntu/td-p/431976

Regards,

Satish

--------------------------------------------------​--------------------------------------------
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.
--------------------------------------------------​-------------------------------------------
0 Kudos
Participant ilya1976
Participant
12,890 Views
Registered: ‎04-07-2014

Re: Petalinux settings.sh problem

Hi Satish,

 

Thank you for replying me.

I've tried both links, but it didn't help,

I see the same warning.

0 Kudos
Highlighted
9,570 Views
Registered: ‎02-07-2008

Re: Petalinux settings.sh problem

This is what worked for me. First make sure your SHELL is /bin/bash by using this command:

 

chsh -s /bin/bash

 

You will have to log out and log back in, then you can then check it by typing "echo $SHELL". Then make /bin/sh link to /bin/bash:

 

sudo rm /bin/sh

sudo ln -s /bin/bash /bin/sh

 

7,353 Views
Registered: ‎03-03-2017

Re: Petalinux settings.sh problem

Works like charm. Thank You!
0 Kudos
Visitor djoconnor
Visitor
6,613 Views
Registered: ‎12-14-2008

Re: Petalinux settings.sh problem

This seems like a bug to me.

If a script wants to be run in bash its first line should be..

#!/bin/bash

 

Rather than assuming /bin/sh is bash (which it isn't in, say, Ubuntu)

 

 

0 Kudos
Explorer
Explorer
6,605 Views
Registered: ‎03-22-2016

Re: Petalinux settings.sh problem

With a normal shell script, that'd be the way to do it. settings.sh isn't meant to be run, though - it's meant to be sourced by your already-running shell, setting up environment variables like PATH. Just running it won't actually do anything useful because scripts can't change environment variables of the shell that called them.

 

You could maybe set it up to launch bash and source that script, but then you can just do exactly that manually anyway by just typing "bash" and then "source settings.sh" :)

 

 

0 Kudos