[OpenBIOS] Cross-compiling and testing sparc64 on Mac OS X
Andreas Färber
andreas.faerber at web.de
Fri Nov 27 00:49:13 CET 2009
Hello guys,
It's awesome seeing you've made some progress towards emulating
Solaris/sparc64!
However trying myself, compiling on Mac OS X (after making sure that
NEED_INT128_T is defined) fails with the following error:
HOSTCC host/kernel/bootstrap.o
In file included from ../include/openbios/sysinclude.h:7,
from ../kernel/bootstrap.c:9:
/usr/include/stdlib.h:267: error: syntax error before ‘arc4random’
make[1]: *** [host/kernel/bootstrap.o] Error 1
The return type of arc4random is u_int32_t, which is defined (in my
case) in <ppc/types.h>. Not sure what goes wrong there. I thought it
could be a name clash with OpenBIOS' __TYPES_H (malc would be
furious!), but - luckily - Apple uses __TYPES_H_ for their _types.h.
Anyway, not having these functions declared by defining
_POSIX_C_SOURCE made the compilation proceed with only one warning:
HOSTCC host/kernel/bootstrap.o
../kernel/bootstrap.c: In function ‘interpret_source’:
../kernel/bootstrap.c:529: warning: implicit declaration of function
‘strcasecmp’
If I symlink .../share/qemu/openbios-sparc64 to .../obj-sparc64/
openbios-builtin.elf (or copy it over) I get this at runtime:
qemu: fatal: Trap 0x0010 while trap level (5) >= MAXTL (5), Error state
pc: 0000000000004200 npc: 0000000000004204
General Registers:
%g0: 0000000000000000 %g1: 0000000000000000 %g2: 0000000008000000 %g3:
0000000000000000
%g4: 0000000000000000 %g5: 0000000000000000 %g6: 0000000000000000 %g7:
0000000000000000
Current Register Window:
%o0: 00000000ffe00000 %o1: 00000000ffe01000 %o2: 000001fff0100000 %o3:
000001fff0000000
%o4: 0000000000000000 %o5: 0000000000000000 %o6: 0000000000000000 %o7:
000001ff00000000
%l0: 0000000007e80000 %l1: 000001ff00000000 %l2: 000001fff0080000 %l3:
0000000000000000
%l4: 0000000000000000 %l5: 0000000000000000 %l6: 0000000000000000 %l7:
0000000000000000
%i0: 0000000000000000 %i1: 0000000000000000 %i2: 0000000000000000 %i3:
0000000000000000
%i4: 0000000000000000 %i5: 0000000000000000 %i6: 0000000000000000 %i7:
0000000000000000
Floating Point Registers:
%f00: 000000000.000000 000000000.000000 000000000.000000
000000000.000000
%f04: 000000000.000000 000000000.000000 000000000.000000
000000000.000000
%f08: 000000000.000000 000000000.000000 000000000.000000
000000000.000000
%f12: 000000000.000000 000000000.000000 000000000.000000
000000000.000000
%f16: 000000000.000000 000000000.000000 000000000.000000
000000000.000000
%f20: 000000000.000000 000000000.000000 000000000.000000
000000000.000000
%f24: 000000000.000000 000000000.000000 000000000.000000
000000000.000000
%f28: 000000000.000000 000000000.000000 000000000.000000
000000000.000000
pstate: 0x00000015 ccr: 0x99 asi: 0x00 tl: 5 fprs: 0
cansave: 6 canrestore: 0 otherwin: 0 wstate 0 cleanwin 6 cwp 7
fsr: 0x00000000
../qemu-solaris-sparc.command: line 3: 3289 Abort trap /
Users/andreas/Q/latest/bin/qemu-system-sparc64 -nographic -boot d -
cdrom /Users/andreas/Q/sol-10-u3-ga-sparc-dvd.iso
This looks different from what you've posted and is identical with
QEMU's version of openbios-sparc64. Same with or without -nographic.
Any ideas?
Regards,
Andreas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: osx-openbios.diff
Type: application/octet-stream
Size: 842 bytes
Desc: not available
URL: <http://lists.openbios.org/pipermail/openbios/attachments/20091127/05e35964/attachment.dmg>
-------------- next part --------------
More information about the OpenBIOS
mailing list