[OpenBIOS] [sparc64] Problematic pci at 0 and pci nodes in the device tree

Mark Cave-Ayland mark.cave-ayland at siriusit.co.uk
Thu Jan 22 12:41:59 CET 2009

Hi Blue Swirl,

 > First, you need binutils and gcc. For cross compiling I'd recommend
 > sparc64-elf target, then you avoid a lot of unneeded Linux
 > headers/libgcc stuff. At least binutils 2.18 and gcc 4.2.4 build
 > working binaries. I still don't have a working cross gdb for Sparc64,
 > the obvious configuration (--target=sparc64-elf) doesn't work.

I now have a cross-compile environment setup after a lot of effort. The 
hardest part was building a cross-gdb for Sparc64 as all I ever received 
was the "Reply packet too long error".

I ended up spending about half a day going through the gdb sources until 
I found that unless you specify a platform with configure when you come 
to build gdb, the extra 64-bit register sets don't get built in!

In the end, I went for "./configure --target=sparc64-linux" and 
magically everything started to work. If I build and install the 
non-stripped Sparc64 OpenBIOS built-in image, I can then do this:

qemu-system-sparc64 .... -s -S

(gdb) file openbios-sparc64
Reading symbols from openbios-sparc64...done.
(gdb) break openbios
Breakpoint 1 at 0xffd0d014: file arch/sparc64/openbios.c, line 516.
(gdb) target remote :1234
Remote debugging using :1234
[New Thread 1]
0x000001fff0000020 in ?? ()
(gdb) cont

Breakpoint 1, openbios () at arch/sparc64/openbios.c:516
516             const struct hwdef *hwdef = NULL;

Cool :)



Mark Cave-Ayland
Sirius Corporation - The Open Source Experts
T: +44 870 608 0063

More information about the OpenBIOS mailing list