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

Re: [microblaze-uclinux] bash versus sh ?




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

1 - tweak the scripts to use only POSIX shell features, in which case /bin/sh should be fine, or, if that's too much work
2 - just manually force /bin/bash.

I found this page very useful in thinking about the issues:

https://wiki.ubuntu.com/DashAsBinSh

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


After seeing by hand all the reports, the files found to be "bash inside" were:

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
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
trunk/software/petalinux-dist/u-boot/petalinux-uboot-config
trunk/software/petalinux-dist/uClibc/extra/scripts/fix_includes.sh
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

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, I will surrender, and link once again /bin/sh to /bin/ bash. :-) :-)


Just  one more thing:

On $PETALINUX/software/petalinux-dist/vendors/Petalogix/common/ common.mak line 474 it is written

if [ "$(CONFIG_SYSTEM_COPY_TO_TFTPBOOT)" == 'y' ] ; then \


I think it should be:

if [ "$(CONFIG_SYSTEM_COPY_TO_TFTPBOOT)" == "y" ] ; then \



My best regards

Paulo Ferreira










___________________________
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/