Installation Solaris Sparc 2.6 (SunOS 5.6) on Qemu – Part1 Qemu Installation
February 12, 2012 14 Comments
Introduction
The goal of this article is to describe patching, configuration, compilation and installation Qemu 0.14.1 for x86 architecture. I choose Qemu version 0.14.1 as it has been the highest version with written patch for UDP tunnels and multicast and it is known to work with GNS3. As you know GNS3 uses UDP tunnels to connect Qemu instances themselves.
The tutorial also shows configuration, compilation and installation the latest Qemu git version for sparc-32 architecture. First, I tried to emulate SS-20 sparc machine with Qemu 0.14.1 but Solaris 2.6 installation hanged up shortly after boot from CDROM. I haven’t notice such a problem with the latest Qemu version.
The Qemu image with installed Solaris 2.6 Sparc (SunOS 5.6) can be used for quick testing of Cisco IOU binary images compiled for Sparc platform.
Unfortunately I managed to install Solaris into SS-5 only so we are limited to maximum 256 MB RAM. Use the latest Qemu version 1.x to emulate SS-20. SS-20 offers 512MB RAM comparing to SS-5 that allows only 256MB. As you can imagine this RAM size is not convenient for running complex topology with multiple IOU instances. Try to set at least 4GB space for swap during installation.
The tutorial describing Solaris 2.6 Sparc installation can be found here:
1. Requirements
- Host System - x86, Linux Fedora 15
- Guest system - Solaris 2.6 (sunOS 5.6) Sparc
- Emulator - Qemu 0.14.1 and the latest Qemu from git
- BIOS - proprietary Sparc BIOS for Slolaris
2. Qemu 0.14.1 Installation
a) Install required Fedora packages for Qemu compilation
sudo yum install ncurses-libs ncurses-devel zlib-devel SDL-devel libpcap-devel glib2-devel
b) Download and untar Qemu 0.14.1
wget http://download.savannah.gnu.org/releases/qemu/qemu-0.14.1.tar.gz
tar zxvf ./qemu-0.14.1.tar.gz
cd qemu-0.14.1/
c) Patch Qemu source for UDP tunnels and multicast
Download patch and copy it to Qemu source.
http://www.4shared.com/file/STdSHGb4/0018-qemu-0141-mcast-udp.html
cp /home/brezular/Download/0018-qemu-0.14.1-mcast-udp.patch /home/brezular/Download/GNS3-files/Qemu/qemu-0.14.1
Patch Qemu source.
patch -p1 -i 0018-qemu-0.14.1-mcast-udp.patch
You should see output like this:
patching file block/raw-win32.c
patching file hw/e1000.c
patching file Makefile.objs
patching file net/udp.c
patching file net/udp.h
patching file net.c
patching file net.h
patching file qemu-options.hx
d) Compile and install Qemu for x86 architecture
./configure --target-list=i386-softmmu
make
sudo make install
Qemu x86 binaries are now placed to /usr/local/bin/ directory. Check the version with command:
/usr/local/bin/qemu --version
QEMU emulator version 0.14.1, Copyright (c) 2003-2008 Fabrice Bellard
3. Installation Qemu from git
a) Download the latest development tree from git
git clone git://git.qemu.org/qemu.git
b) Compile and install Qemu for sparc architecture
cd ./qemu
./configure --target-list=sparc-softmmu
make
sudo make install
Now, qemu-system-sparc binary is placed to /usr/local/bin/ directory. Check the version with command:
/usr/local/bin/qemu-system-sparc --version
QEMU emulator version 1.0.50, Copyright (c) 2003-2008 Fabrice Bellard
Note: If you cannot install Solaris 2.6 to Qemu disk running by Qemu downloaded from the master development branch, just install Qemu version 1.0.50 version and try again.
4. BIOS Handling
The last step consists from copy particular BIOS image to /usr/local/share/qemu/ directory.
a) BIOS for Sparc machine
As it is mentioned in this How-To, the default BIOS - openbios-sparc32 – distributed with Qemu is not working well for Solaris.
http://tyom.blogspot.com/2009/12/solaris-under-qemu-how-to.html
We have to use the proprietary BIOS that you can download from here:
http://home.earthlink.net/~reif/
or alternatively from here:
http://www.4shared.com/file/6gJgTCQ6/ss10_v2.html
http://www.4shared.com/file/3DAMJAcy/ss10_v2_2.html
http://www.4shared.com/file/axFQXBJR/ss5-170.html
http://www.4shared.com/file/IglwTwUA/ss5.html
http://www.4shared.com/file/-7TR5cCC/ss10-20_v225r.html
http://www.4shared.com/file/05hZGv8d/ss20_v2.html
Qemu can emulate several types of Sparc machines (SS-5, SS-10 etc.) For each Sparc machine you have to use particular BIOS. As I mentioned I had been able to install Solaris 2.6 to SS-5 machine only.
sudo cp /home/brezular/Download/ss5.bin /usr/local/share/qemu/
sudo cp /home/brezular/Download/ss5-170.bin /usr/local/share/qemu/
sudo cp /home/brezular/Download/ss20_v2.25_rom /usr/local/share/qemu/
b) BIOS for JunOS
This step is only needed if you run Olive – JunOS installed on the top of FreeBSD with Qemu. Qemu version above 0.12.0 contains a bug in SeaBIOS which causes JunOS hangs up during boot. Simple workaround is described here:
Here is a download link with working BIOS I compiled by myself.
http://www.4shared.com/file/BJw1Ik2x/bios.html
sudo cp /home/brezular/Download/bios.bin /usr/local/share/qemu/

Excellent
but , this guide also works for Windows version of qemu ?
how to patch qemu on windows ?
Hi,
I’ve never compiled Qemu on Windows. Here is something you can use:
http://blog.gns3.net/2009/10/olive-juniper/2/
have you tried the iou2net.pl script in sparc qemu? im trying to atleast use the ‘much improved’ switching feature in “new” iou, use 4 switches, then interface it in gns3 maybe via udp and use the routers there. bunch of missing libraries and net modules in perl..
So far I haven’t tried it but it is on my TODO list ;-) Sure, that’s not easy job to get iou2net.pl ruuning on 2.6. If I have any update I’ll post it as How-to. Good luck!
Pingback: Installation Solaris 2.6 Sparc on Qemu – Part2 Solaris Installation « Brezular's Technical Blog
>Unfortunately I managed to install Solaris into SS-5 only so we are restricted to maximum 256 MB RAM
SS-20 should be no problem either. Then you would have 512 MiB.
yes, I know but I wasn’t successful with SS-20. Anyway, thanks for your blog, it helped me a lot.
I guess mostly not for the blog, but rather for the actual contributions to qemu which made it possible ;-) .
Does SS-20 fail early or late? Using SS-20 is a bit more tricky than SS-5, because you would need to switch off scanning for missing devices and do a reset before booting the OS. Are 256 MiB too few for your use case?
For my use case it even was too much, so, I had to implement booting with 32 MiB, afair. The SunOS 4.something didn’t like too much memory. :)
Yes, I did it before booting.
ok setenv sbus-probe-list f
ok reset
I tried to boot in both single and multi user mode but the display freezes here:
ok boot disk2:d -vs
Boot device: /iommu/sbus/espdma@f,400000/esp@f,800000/sd@2,0:d File and args: -vs
Size: 243560+176918+41926 Bytes
SunOS Release 5.6 Version Generic_105181-05 [UNIX(R) System V Release 4.0]
Copyright (c) 1983-1997, Sun Microsystems, Inc.
Using default device instance data
Pingback: Installation Solaris Sparc 2.6 (SunOS 5.6) on Qemu – Part3 iou2net.pl Installation « Brezular's Technical Blog
im doing some test with netbsd and -m 2048 of memory but i need some library’s from solaris to continue pls if you can share those lib`s i will apreciate.
SUNWcsu
usr/lib/ld.so.1
SUNWcsl
usr/lib/libdl.so.1
usr/lib/libnsl.so.1
usr/lib/libc.so.1
usr/lib/libmp.so.2
usr/lib/libsocket.so.1
Pingback: 折腾Qemu版IOU的相关资源下载 | Xrong
I am following the steps described in the document, but i am getting the following error.. while Patch Qemu source for UDP tunnels and multicast
[imran@localhost qemu-0.14.1]$ cp /home/imran/Downloads/0018-qemu-0.14.1-mcast-udp.patch /home/imran/Downloads/GNS3-files/Qemu/qemu-0.14.1
cp: cannot create regular file `/home/imran/Downloads/GNS3-files/Qemu/qemu-0.14.1′: No such file or directory
[imran@localhost qemu-0.14.1]$
[imran@localhost qemu-0.14.1]$ patch -p1 -i 0018-qemu-0.14.1-mcast-udp.patch
bash: patch: command not found…
Install package ‘patch’ to provide command ‘patch’? [N/y]
* Waiting in queue..
* Running..
* Resolving dependencies..
* Waiting for authentication..
* Running..
* Resolving dependencies..
* Downloading packages..
* Testing changes..
* Installing packages..
* Scanning applications..
patch: **** Can’t open patch file 0018-qemu-0.14.1-mcast-udp.patch : No such file or directory
Brezular help me on this..
It seems that you are trying to copy patch to non-existing directory.
Are you sure that all directories in path /home/imran/Downloads/GNS3-files/Qemu/qemu-0.14.1 exist?