Eric,
I tried this before as well, but it does not work, at least with my util-linux 2.11z:
./abuild.sh -h LBROOT=-h ls: invalid option -- / Try `ls --help' for more information.
Which is why I ended up doing the workaround I used.
Do you know a fix that actually helps fixing your fix, or shall I revert your changes?
Stefan
* Eric Biederman ebiederm@users.sourceforge.net [041105 09:50]:
Index: abuild.sh
RCS file: /cvsroot/freebios/freebios2/util/abuild/abuild.sh,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** abuild.sh 5 Nov 2004 00:26:31 -0000 1.5 --- abuild.sh 5 Nov 2004 08:50:53 -0000 1.6
*** 254,258 ****
# parse parameters ! args=`getopt -l version,verbose,help,all,target: Vvhat: $*`
if [ $? != 0 ]; then --- 255,259 ----
# parse parameters ! args=`getopt -l version,verbose,help,all,target: Vvhat: -- "$@"`
if [ $? != 0 ]; then
*** 261,278 **** fi
! set -- $args ! for arg ! do ! case $arg in ! -t|--target) shift;target=$1;shift;; ! -a|--all) shift;buildall=true;; ! -v|--verbose) shift;verbose=true;; ! -V|--version) shift;myversion;; ! -h|--help) shift;myhelp;; ! esac done
! # -- is $1 ! LBROOT=$2
# /path/to/freebios2/ --- 262,279 ---- fi
! eval set -- "$args" ! while true ; do ! case $1 in ! -t|--target) shift; target=$1; shift;; ! -a|--all) shift; buildall=true;; ! -v|--verbose) shift; verbose=true;; ! -V|--version) shift; myversion;; ! -h|--help) shift; myhelp;; ! --) shift; break;; ! *) echo "Unrecognized argument" ; exit 1 ;; ! esac done
! LBROOT=$1
# /path/to/freebios2/
*** 280,283 **** --- 281,285 ---- LBROOT=$( cd ../..; pwd ) fi
echo "LBROOT=$LBROOT"
if [ "$target" != "" ]; then
Stefan Reinauer stepan@openbios.org writes:
Eric,
I tried this before as well, but it does not work, at least with my util-linux 2.11z:
./abuild.sh -h LBROOT=-h ls: invalid option -- / Try `ls --help' for more information.
Which is why I ended up doing the workaround I used.
Do you know a fix that actually helps fixing your fix, or shall I revert your changes?
It turns out that getopt was adding the -- prefix. In addition -- is not specified to terminate the list of options so breaking out when an option is not recognized is necessary.
There are days I really think getopt is way more trouble than it is worth.
Anyway it should be fixed now, and there is basic support for cross compiling on powerpc.
On powerpc we currently have 3 ports. I have been concentrating on the embeddedplanet ep405pc. I have been able to coax it all the way through the configuration process but I'm not certain how many of the things I have done are just hacks at the moment.
In any event one thing I have clearly found is that abuild.sh is specifying 2 options that the ep405pc atleast does not implement. USE_FALLBACK_IMAGE and ROM_IMAGE_SIZE.
It is looking increasingly like we probably want to start working with the target directory. Not having a USE_FALLBACK_IMAGE also appears to describe the qemu-i386 target as well which wants to build everything into just 64KiB. Which is sane.
I will report back on what I learn about powerpc compilers when I get one that will actually build the powerpc assembly code. It appears mine currently do not support all of the needed powerpc instructions :(
Eric
* Eric W. Biederman ebiederman@lnxi.com [041105 12:52]:
On powerpc we currently have 3 ports. I have been concentrating on the embeddedplanet ep405pc. I have been able to coax it all the way through the configuration process but I'm not certain how many of the things I have done are just hacks at the moment.
I've been looking at http://kegel.com/crosstool/ now and I'm waiting for a gcc 3.4.x for PPC 750 to finish. I'm not sure what target to build for, but it'll be ok for a try.
I will report back on what I learn about powerpc compilers when I get one that will actually build the powerpc assembly code. It appears mine currently do not support all of the needed powerpc instructions :(
Above script can build for all PPC CPUs from 405 to 970 with preset scripts
Stefan
Stefan Reinauer wrote:
On powerpc we currently have 3 ports. I have been concentrating on the embeddedplanet ep405pc. I have been able to coax it all the way through the configuration process but I'm not certain how many of the things I have done are just hacks at the moment.
I've been looking at http://kegel.com/crosstool/ now and I'm waiting for a gcc 3.4.x for PPC 750 to finish. I'm not sure what target to build for, but it'll be ok for a try.
crosstool is the way to go. It's really important in the ppc stuff to get all the right patches to for a working setup.
There are many on the embedded lists I'm on who claim "real developers build thier own toolchain" but also in those circles cross tool is considered to be the defacto reference for building a working cross toolchain.
* Richard Smith rsmith@bitworks.com [041105 17:44]:
I've been looking at http://kegel.com/crosstool/ now and I'm waiting for a gcc 3.4.x for PPC 750 to finish. I'm not sure what target to build for, but it'll be ok for a try.
crosstool is the way to go. It's really important in the ppc stuff to get all the right patches to for a working setup.
good, thanks for this confirmation. There's also devkitPPC, but it is mainly used for console development. Worse than x86, you'd never want to use gcc on non-x86 platforms without patches. I remember the big fuzz gcc 2.96 "release" was pretty usable after applying about 250 patches ;) (better than any compiler on axp before)
There are many on the embedded lists I'm on who claim "real developers build thier own toolchain" but also in those circles cross tool is considered to be the defacto reference for building a working cross toolchain.
That is true, to some extent, for toolchain developers. Real developers also develop their own OS before writing a letter.. But the best ones develop firmware anyways ;)
Stefan
* Stefan Reinauer stepan@openbios.org [041105 15:32]:
- Eric W. Biederman ebiederman@lnxi.com [041105 12:52]:
On powerpc we currently have 3 ports. I have been concentrating on the embeddedplanet ep405pc. I have been able to coax it all the way through the configuration process but I'm not certain how many of the things I have done are just hacks at the moment.
I've been looking at http://kegel.com/crosstool/ now and I'm waiting for a gcc 3.4.x for PPC 750 to finish. I'm not sure what target to build for, but it'll be ok for a try.
/opt/crosstool/powerpc-7450-linux-gnu/gcc-3.4.1-glibc-2.3.3/lib/gcc/powerpc-7450-linux-gnu/3.4.1/include/limits.h:122:61: no include path in which to search for limits.h
Weird.. has anyone seen this one before? I get it from ppc div64.h because of nostdinc it seems...
Stefan
Stefan Reinauer stepan@openbios.org writes:
- Stefan Reinauer stepan@openbios.org [041105 15:32]:
- Eric W. Biederman ebiederman@lnxi.com [041105 12:52]:
On powerpc we currently have 3 ports. I have been concentrating on the embeddedplanet ep405pc. I have been able to coax it all the way through the configuration process but I'm not certain how many of the things
I have done are just hacks at the moment.
I've been looking at http://kegel.com/crosstool/ now and I'm waiting for a gcc 3.4.x for PPC 750 to finish. I'm not sure what target to build for, but it'll be ok for a try.
/opt/crosstool/powerpc-7450-linux-gnu/gcc-3.4.1-glibc-2.3.3/lib/gcc/powerpc-7450-linux-gnu/3.4.1/include/limits.h:122:61: no include path in which to search for limits.h
Weird.. has anyone seen this one before? I get it from ppc div64.h because of nostdinc it seems...
That is odd. Although it seems reasonable.
I can successfully build that part with gcc-3.4.1 so I don't know what is going on. If you want to add a ppc limits.h feel free. I'm not certain if that header file should be should come with the compiler or not...
Actually that feels like a gcc bug. Because it is your limits.h that cannot find limits.h?
Eric
* Eric W. Biederman ebiederman@lnxi.com [041105 12:52]:
On powerpc we currently have 3 ports. I have been concentrating on the embeddedplanet ep405pc. I have been able to coax it all the way through the configuration process but I'm not certain how many of the things I have done are just hacks at the moment.
In any event one thing I have clearly found is that abuild.sh is specifying 2 options that the ep405pc atleast does not implement. USE_FALLBACK_IMAGE and ROM_IMAGE_SIZE.
Do you have an Options.lb for those ports? my cross compiler seems to work quite nicely until now so I can join the boat of cross linuxbios builders..
Stefan