cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Participant
Participant
16,929 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
9 Replies
Highlighted
Xilinx Employee
Xilinx Employee
16,928 Views
Registered: ‎02-06-2013

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
Highlighted
Participant
Participant
16,912 Views
Registered: ‎04-07-2014

Hi Satish,

 

Thank you for replying me.

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

I see the same warning.

Highlighted
13,592 Views
Registered: ‎02-07-2008

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

 

Highlighted
11,375 Views
Registered: ‎03-03-2017

Works like charm. Thank You!
0 Kudos
Visitor
Visitor
10,635 Views
Registered: ‎12-14-2008

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
Highlighted
Explorer
Explorer
10,627 Views
Registered: ‎03-22-2016

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
Highlighted
Visitor
Visitor
4,001 Views
Registered: ‎01-29-2019

Worked for me as well
Thanks!
0 Kudos
Highlighted
Voyager
Voyager
2,415 Views
Registered: ‎08-02-2019

Hi @jeffrey.johnson ,

Your solution is also worked for me, thanks a lot.

<--- If reply is helpful, please feel free to give Kudos, and close if it answers your question --->
0 Kudos
Highlighted
Visitor
Visitor
874 Views
Registered: ‎04-22-2019

But the scripts that require bash should expressly call bash - this is something that should be fixed in petalinux and not require a user to modify default (and perfectly acceptable) shell settings.

Especially since the recommended workaround in the docs (using dpkg to change your default shell) do not work - and you have to manually delete and recreate symbolic links from /bin/sh to /bin/bash.

0 Kudos