[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [microblaze-uclinux] bash versus sh ?



Hi Paulo,

On Wed, Jul 8, 2009 at 7:33 PM, Paulo Ferreira<paf@xxxxxxxx> wrote:
>
> On 2009/07/06, at 00:42, John Williams wrote:
>
>> It would be very helpful if you could  provide a rough audit of the
>> failing scripts/Makefiles, and the error messages.  Options then are either
>>
>> For standalone shell scripts it's pretty clear, but for the assumed
>> $(SHELL) in Makefiles, there's another set of rules to consider.  We'll
>> consider that when we know where the problems are.
>
>
> Ok.
> I have tried  to run the checkbashisms script  referred on the  page, on all
> tthe petalinux  files thta start with   #!/bin/sh   from the svn repository
>  (revision 5535).

Great, thanks.

> trunk/software/linux-2.6.x-petalogix/scripts/extract-ikconfig
> trunk/software/linux-2.6.x-petalogix/scripts/package/builddeb
> trunk/software/linux-2.6.x-petalogix/scripts/ver_linux

These are from the mainline linux kernel (albeit at v2.6.20), so it
would be informative to see where they are in newer kernels, and see
what approach (if any) was taken to un-bashify them.

> trunk/software/petalinux-dist/u-boot/board/integratorap/split_by_variant.sh
> trunk/software/petalinux-dist/u-boot/board/integratorcp/split_by_variant.sh
> trunk/software/petalinux-dist/u-boot/board/versatile/split_by_variant.sh

These again are from an older uboot mainline snapshot - similar
comments apply as for kernel script files.

> trunk/software/petalinux-dist/u-boot/petalinux-uboot-config

This one is ours - could be changed to /bin/bash?

> trunk/software/petalinux-dist/uClibc/extra/scripts/fix_includes.sh

This one is from uClibc, however shold never get called win a modern
petalinux build because we use the precompiled uClibc libraries.

> trunk/tools/common/petalogix/bin/petalinux-boot-prebuilt
> trunk/tools/common/petalogix/bin/petalinux-copy-autoconfig
> trunk/tools/common/petalogix/bin/petalinux-exclude
> trunk/tools/common/petalogix/bin/petalinux-gen-initrd
> trunk/tools/common/petalogix/bin/petalinux-new-app
> trunk/tools/common/petalogix/bin/petalinux-new-module
> trunk/tools/common/petalogix/bin/petalinux-new-platform
> trunk/tools/common/petalogix/bin/petalinux-prepare-hardware
> trunk/tools/common/petalogix/bin/petalinux-reloc-blob
> trunk/tools/common/petalogix/bin/petalinux-remove-platform
> trunk/tools/common/petalogix/bin/petalinux-send-configs
> trunk/tools/common/petalogix/bin/petalinux-set-targetdir

These are ours and were written with a bash assumption.  Seems it
would be reasonable to make them refer to /bin/bash

> So, I changed all these file to use bash instead,  but the Petalinux kernel
> make script  still goes beserk, with some "let" commands.
> So inside some other files there are still some  "let" commands...

So, the kernel build is copied straight from mainline - worth looking
at a more recent kernel and see what's been done about it.  Surely
people are building kernels under Ubuntu without manual script and
Makefile hacking...

> So,  I will surrender, and  link once again  /bin/sh  to /bin/bash.   :-)

I would hope this is not necessary - it is quite likely to have
unintended consequences in the rest of your ubuntu system!

Let's persevere, I'm sure this can be cleaned up without too much effort.

Cheer,s

John
--
John Williams, PhD, B.Eng, B.IT
PetaLogix - Linux Solutions for a Reconfigurable World
w: www.petalogix.com  p: +61-7-30090663  f: +61-7-30090663

___________________________
microblaze-uclinux mailing list
microblaze-uclinux@xxxxxxxxxxxxxx
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/