install solaris sparc on qemu

  • Post author:
  • Post category:其他


Installation Solaris Sparc 2.6 (SunOS 5.6) on Qemu – Part1 Qemu Installation on x86 and x86-64 architecture



Introduction


The goal of this article is to describe

patching

, configuration, compilation and installation Qemu

0.14.1

1.x in order to emulate  x86 and Sparc 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 each other. Thanks to one of

GNS3 developers

– Benjamin Marsili, patches for UDP tunnels and multicast are officially included in Qemu version 1.1 and above.  No need to patch Qemu anymore.

The tutorial also shows configuration, compilation and installation Qemu 1.x for  sparc-32 architecture.  Be aware that installation of Solaris 2.6 hangs up shortly during boot from installation CD when Sparc SS-20 is emulated by  Qemu 0.14.1. For this reason I recommend to use  Qemu  0.15.x and higher for Sparc emulation when no such a problem occurs.



Unfortunately I managed to install Solaris on Sparc SS-5 only which allows to use maximum 256 MB RAM

.

To avoid this limit, it is better to use the latest Qemu version 1.x for  SS-20 emulation.  Unlike SS-5, SS-20 can be started with 512MB RAM. If you need to use more than 512MB RAM, the only way is to make SWAP partition bigger during Solaris installation.   I would recommend 4GB SWAP partition in order to run

complex network topology with multiple

IOU

instances.

The  tutorial describing Solaris 2.6 Sparc installation is here:


http://brezular.wordpress.com/2012/02/17/installation-solaris-2-6-sparc-on-qemu-part2-solaris-installation/

As the newer IOU images available on the Internet are compiled for Solaris platform,  Sparc SS-20 emulated by Qemu is perfect environment  for testing those images without need to buy real Sparc machine.



1. Requirements


– Host System    –

x86-64, Linux

Fedora 17



– Guest system  –


Solaris

2.6 (sunOS 5.6) Sparc


– Emulator          –


Qemu

1.2

.

0




BIOS



proprietary Sparc BIOS for Solaris



2. Installation Qemu 1.x for x86 and sparc support



It is very likely that your Linux  OS already has  Qemu 1.x installed from repository.  In this case, you do not need to build Qemu 1.x  for the guest x86  architecture.  Just omit parameter

i386-softmmu

and and use only parameter

sparc-softmmu

during  Qemu configuration for step 2b).   It builds Qemu binary for sparc support and preserve existing Qemu binary for x86 guest architecture.

Check your Qemu x86 version with command:




/usr/bin/qemu-system-i386 --version


QEMU emulator version 1.1.0, Copyright (c) 2003-2008 Fabrice Bellard


2a)

Install required Fedora packages for Qemu compilation



sudo yum install ncurses-libs ncurses-devel zlib-devel SDL-devel libpcap-devel glib2-devel



2b)

Download and extract Qemu sources




wget

http://wiki.qemu-project.org/download/qemu-1.2.0.tar.bz2





tar  jxvf qemu-1.2.0.tar.bz





cd qemu-1.2.0




./configure --target-list=i386-softmmu,sparc-softmmu






make





sudo make install

Qemu binary for the guest x86 architecture is /usr/local/bin/qemu-system-i386.  Check the version with command:




/usr/local/bin/qemu-system-i386 --version




QEMU emulator version 1.2.0, Copyright (c) 2003-2008 Fabrice Bellard

Qemu sparc binary is /usr/local/bin/qemu-system-sparc.




/usr/local/bin/qemu-system-sparc --version




QEMU emulator version 1.2.0, Copyright (c) 2003-2008 Fabrice Bellard



3. BIOS



The last step consists from copying particular BIOS to /usr/local/share/qemu/ directory.


3a)

BIOS for Sparc machine

As it is shown in this

How-To

,  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 rom 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.  Following command download particular BIOS to /usr/local/share/qemu directory



sudo wget

http://home.earthlink.net/~reif/ss20_v2.25_rom

-P /usr/local/share/qemu/

sudo wget

http://home.earthlink.net/~reif/ss10_v2.25_rom

-P /usr/local/share/qemu/

sudo wget

http://home.earthlink.net/~reif/ss5-170.bin

-P /usr/local/share/qemu/


3b)

BIOS for JunOS

This step is only needed if you run

Olive

– JunOS installed on the top of FreeBSD. 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/


According to my findings,  actual BIOS in Qemu 1.1 and above  appears not to have this  bug so you can omit this step.






download bios weburl :http://home.earthlink.net/~reif/