On Sat, Aug 22, 2009 at 1:35 AM, Laurent VivierLaurent@vivier.eu wrote:
Le vendredi 21 août 2009 à 17:57 -0400, G 3 a écrit :
I have begun doing work with OpenBIOS. I was wondering if it is possible to compile OpenBIOS for PowerPC on Mac OS X? If not, what Linux distro should I use? Any advice would really help.
I don't know if it is possible to compile it on Mac OS X. Personally I use debian lenny on x86_64 with cross-compiler, but I used to build it on an iBook G4 with debian etch.
I'm also using x86_64 with cross-compiler:
powerpc-elf-as --version GNU assembler (GNU Binutils) 2.18 Copyright 2007 Free Software Foundation, Inc. This program is free software; you may redistribute it under the terms of the GNU General Public License version 3 or later. This program has absolutely no warranty. This assembler was configured for a target of `powerpc-elf'.
powerpc-elf-gcc -v Using built-in specs. Target: powerpc-elf Configured with: ../configure --target=powerpc-elf --disable-nls --disable-threads --enable-languages=c --disable-shared --enable-multilib --disable-libssp Thread model: single gcc version 4.2.4
powerpc-elf-gdb -v GNU gdb 6.8 Copyright (C) 2008 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "--host=x86_64-unknown-linux-gnu --target=powerpc-elf".
Configuring for *-elf is easier than *-linux, because then the include files, libgcc, crt0.o etc. will not be needed. These can be difficult to compile sometimes. The drawback is that you can't use the compiler for normal Unix programs, only for OpenBIOS and maybe Linux kernel.
BTW, there is a bug in one of the tools (binutils, gcc, gdb, can't remember which): if you want the tool for powerpc64, the only supported target is powerpc64-linux, powerpc64-elf won't work. This is not a problem for OpenBIOS because the same binary can be used for both 32 and 64 bit CPUs.