Hello!
I am interested in running Solaris 8/9 under qemu. According to the thread below, it may be possible with more recent versions of OpenBIOS: http://qemu-forum.ipi.fi/viewtopic.php?p=10243
So I attempt to investigate. However, I am unable to build the alpha release of OpenBIOS from 20070427. I currently have qemu (20070501-svn-snapshot) Here are the details of my machine setup, and other variables, along with the output of the errors.
administrator@ubuntu-khermans-desk:/tmp/openbios-devel$ uname -a Linux ubuntu-khermans-desk 2.6.20-15-generic #2 SMP Sun Apr 15 07:36:31 UTC 2007 i686 GNU/Linux administrator@ubuntu-khermans-desk:/tmp/openbios-devel$ cat /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=7.04 DISTRIB_CODENAME=feisty DISTRIB_DESCRIPTION="Ubuntu 7.04" administrator@ubuntu-khermans-desk:/tmp/openbios-devel$ cat /proc/cpuinfo processor : 0 vendor_id : GenuineIntel cpu family : 15 model : 2 model name : Intel(R) Pentium(R) 4 CPU 3.00GHz stepping : 9 cpu MHz : 2992.671 cache size : 512 KB physical id : 0 siblings : 2 core id : 0 cpu cores : 1 fdiv_bug : no hlt_bug : no f00f_bug : no coma_bug : no fpu : yes fpu_exception : yes cpuid level : 2 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe cid xtpr bogomips : 5989.50 clflush size : 64
processor : 1 vendor_id : GenuineIntel cpu family : 15 model : 2 model name : Intel(R) Pentium(R) 4 CPU 3.00GHz stepping : 9 cpu MHz : 2992.671 cache size : 512 KB physical id : 0 siblings : 2 core id : 0 cpu cores : 1 fdiv_bug : no hlt_bug : no f00f_bug : no coma_bug : no fpu : yes fpu_exception : yes cpuid level : 2 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe cid xtpr bogomips : 5985.43 clflush size : 64
administrator@ubuntu-khermans-desk:/tmp/openbios-devel$ ls -l /usr/bin/gcc* lrwxrwxrwx 1 root root 7 2007-04-05 21:37 /usr/bin/gcc -> gcc-4.1 -rwxr-xr-x 1 root root 80916 2007-01-03 15:22 /usr/bin/gcc-3.3 -rwxr-xr-x 1 root root 85044 2007-01-02 12:03 /usr/bin/gcc-3.4 -rwxr-xr-x 1 root root 183904 2007-03-02 21:52 /usr/bin/gcc-4.1 lrwxrwxrwx 1 root root 10 2007-04-05 21:37 /usr/bin/gccbug -> gccbug-4.1 -rwxr-xr-x 1 root root 15970 2007-01-03 15:17 /usr/bin/gccbug-3.3 -rwxr-xr-x 1 root root 16090 2007-01-02 11:57 /usr/bin/gccbug-3.4 -rwxr-xr-x 1 root root 16266 2007-03-02 21:47 /usr/bin/gccbug-4.1 -rwxr-xr-x 1 root root 2018 2006-12-20 09:41 /usr/bin/gccmakedep
administrator@ubuntu-khermans-desk:/tmp/openbios-devel$ config/scripts/switch-arch cross-sparc64 administrator@ubuntu-khermans-desk:/tmp/openbios-devel$ make /usr/bin/xsltproc Building OpenBIOS on x86 for sparc64 Cleaning up... ok Initializing build tree...ok. Creating target Makefile...ok. Creating config files...ok. Building...error: Compiling dictionary 1/2 Compiling dictionary 2/2 OpenBIOS dictionary: version: 2 cellsize: 8 endianess: big compression: no relocation: yes checksum: ad683c47 length: 00000000 last: 0 sparc64-linux-gcc $EXTRACFLAGS -Wa,-xarch=v9 -Wa,-64 -g -Os -Wall -W -DNATIVE_BITWIDTH_EQUALS_HOST_BITWIDTH -USWAP_ENDIANNESS -g -Wa,-xarch=v9 -Wa,-64 -m64 -mcpu=ultrasparc -mcmodel=medany -fno-builtin -nostdlib -ffreestanding -Wredundant-decls -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations -Wundef -Wendif-labels -Wstrict-aliasing -Iinclude -Ikernel/include -Iobj-sparc64/target/include -c -o obj-sparc64/target/arch/sparc64/entry.o arch/sparc64/entry.S /bin/sh: sparc64-linux-gcc: not found make[1]: *** [obj-sparc64/target/arch/sparc64/entry.o] Error 127 make[1]: Leaving directory `/tmp/openbios-devel'
So, I notice that the package egcs64 may provide sparc64-linux-gcc, but I am unable to find such a package in debian/ubuntu or the sources to compile it myself. However, the google searches I made turned up only people on SPARC platforms running egcs64, so I am unsure what the requirements are to get to my intended goal -- Solaris 8/9 under qemu.
Any help is greatly appreciated! Thanks :-)
/bin/sh: sparc64-linux-gcc: not found
This would be a cross-compiler for Sparc64 target. Sparc64 emulation is not usable for anything yet, please try configuring for Sparc32 instead. That in turn needs sparc-linux-gcc, a cross compiler for Sparc32. If you have access to a Sparc machine (real or Qemu one), you can compile there with a regular gcc.
Blue Swirl wrote:
This would be a cross-compiler for Sparc64 target. Sparc64 emulation is not usable for anything yet, please try configuring for Sparc32 instead. That in turn needs sparc-linux-gcc, a cross compiler for Sparc32. If you have access to a Sparc machine (real or Qemu one), you can compile there with a regular gcc.
For what I need to test, I must use Solaris 8/9 on sparc64. sparc32 is not supported, as this is software which hooks kernel system calls.
So, why is sparc64 unusable, and what are the barriers to creating a fully usable sparc64 emulator which can run Solaris 8/9 (sparc64)? ie, how far away is it and what resources are lacking?
So, why is sparc64 unusable, and what are the barriers to creating a fully usable sparc64 emulator which can run Solaris 8/9 (sparc64)? ie, how far away is it and what resources are lacking?
There are bugs in Qemu's Sparc64 CPU implementation that need to be found and fixed. Those prevent the OpenBIOS (or even simple C programs for the easier sparc64-linux-user case) from running. This part is just debugging, most things are in place.
When the CPU core is fine, OpenBIOS can probe for PCI devices, but the PCI bridge is not complete. Any real kernel would want to enable interrupts, but there is no interrupt controller yet. And so on. But implementing these is not very difficult.
Also OpenBIOS needs some work before any kernel will run, for example in the device tree and client interface. Should be easy.
For your specific system call problem, maybe you could implement a Sparc64 user emulator for Solaris, like the Linux and Darwin emulators. That would help by exercising the CPU core and finding the bugs.