Qemu

From Linux PARISC Wiki
(Difference between revisions)
Jump to: navigation, search
m
m
Line 1: Line 1:
== QEMU SUPPORT STATUS REGARDING HPPA / PARISC ==
+
== QEMU support status regarding hppa/parisc ==
  
Since April 2018, starting with qemu version 2.12, qemu fully supports hppa user emulation (hppa-linux-user) and hppa system emulation (qemu-system-hppa).
+
Starting with QEMU version 2.12 (April 2018), qemu fully supports hppa user emulation (hppa-linux-user) and hppa system emulation (qemu-system-hppa).
All necessary changes to qemu have been merged into [https://git.qemu.org/?p=qemu.git;a=summary the qemu upstream git tree].
+
All necessary changes have been merged into the [https://git.qemu.org/?p=qemu.git;a=summary upstream qemu git tree].
  
 
PA-RISC machines need a firmware ("PDC" = Processor Dependend Code).
 
PA-RISC machines need a firmware ("PDC" = Processor Dependend Code).
Qemu already includes a precompiled PDC firmware for hppa ([https://git.qemu.org/?p=qemu.git;a=blob;f=pc-bios/hppa-firmware.img;h=86930974b9e12bec214fb464eee443a0d844e6ff;hb=HEAD pc-bios/hppa-firmware.img]), which is based on a [https://github.com/hdeller/seabios-hppa/commits/parisc_firmware fork of SeaBIOS ].
+
Qemu includes a precompiled PDC firmware for hppa ([https://git.qemu.org/?p=qemu.git;a=blob;f=pc-bios/hppa-firmware.img;h=86930974b9e12bec214fb464eee443a0d844e6ff;hb=HEAD pc-bios/hppa-firmware.img]), which is based on a [https://github.com/hdeller/seabios-hppa/commits/parisc_firmware fork of SeaBIOS ].
  
== HOW TO BUILD QEMU FROM SOURCE ==
+
The QEMU eumulation is able to run Linux and HP-UX. Improved HP-UX support is still being worked on.
  
* checkout out the [https://git.qemu.org/?p=qemu.git;a=summary qemu git tree]
+
QEMU on parisc has been made available by:
* run configure, e.g.
+
* Richard Henderson: QEMU CPU emulation, QEMU hardware divers
** (for system emulation) '''./configure --target-list=hppa-softmmu --enable-numa'''
+
* Helge Deller: QEMU hardware drivers, SeaBIOS PDC firmware
** (for user emulation) '''./configure --target-list=hppa-linux-user --disable-stack-protector --prefix=/home/qemu-hppa/chroot-unstable --interp-prefix=/home/qemu-hppa/chroot-unstable --static'''
+
* Sven Schnelle: Lots of fixes all over QEMU and SeaBIOS (SCSI, CPU emulation fixes, SeaBIOS PDC firmware)
* run "make"
+
  
== PRE-INSTALLED AND READY-TO-RUN QEMU IMAGE ==
+
== Ready-to-run QEMU image for parisc ==
  
* Download from http://backup.parisc-linux.org/qemu/debian-10-hdd-img.tar.bz2
+
Download Debian hard disc image:
* Unzip image: tar xvfj debian-10-hdd-img.tar.bz2
+
wget http://backup.parisc-linux.org/qemu/debian-10-hdd-img.tar.bz2
* Run qemu:
+
Unzip image:  
 +
tar xvfj debian-10-hdd-img.tar.bz2
 +
Run qemu:
 
  ./hppa-softmmu/qemu-system-hppa -drive file=debian-10-hdd.img -nographic -serial mon:stdio -accel tcg,thread=multi -smp cpus=4  
 
  ./hppa-softmmu/qemu-system-hppa -drive file=debian-10-hdd.img -nographic -serial mon:stdio -accel tcg,thread=multi -smp cpus=4  
* Log in as root, root password is "rootme"
+
Log in as '''root''', root password is "'''rootme'''"
  
== EXAMPLE HOW TO RUN QEMU WITH DEBIAN-10 INSTALL IMAGE ==
+
== How to build QEMU from source ==
 +
 
 +
Check out the [https://git.qemu.org/?p=qemu.git;a=summary qemu git tree]
 +
 
 +
Run configure, e.g.
 +
* (for system emulation) '''./configure --target-list=hppa-softmmu --enable-numa'''
 +
* (for user emulation) '''./configure --target-list=hppa-linux-user --disable-stack-protector --prefix=/home/qemu-hppa/chroot-unstable --interp-prefix=/home/qemu-hppa/chroot-unstable --static'''
 +
 
 +
Run "make"
 +
 
 +
== How to run QEMU with Debian-10 installer image ==
  
 
* Create a virtual hard disc once:
 
* Create a virtual hard disc once:
Line 44: Line 55:
 
  deb-src http://ftp.debian.org/debian unstable main
 
  deb-src http://ftp.debian.org/debian unstable main
  
TODO:
 
* Boot-cd should boot the 32-bit SMP kernel by default
 
* Make debian-installer install the 32-bit SMP kernel on QEMU (if started with multiple CPUs)
 
* Installer: (1 of 2) A start job is running for font and keyboard layout (1min 10s / no limit)
 
  
 +
== Some QEMU notes ==
  
 +
Prefer the e1000 driver over the rtl8129 card. The latter gives irq issues with Dino emulation.
  
 
Possible qemu options:
 
Possible qemu options:
Line 60: Line 69:
 
* -nographic      - no graphics device
 
* -nographic      - no graphics device
 
* -device VGA      - provide PCI VGA graphic card
 
* -device VGA      - provide PCI VGA graphic card
 
== qemu notes ==
 
 
* Prefer the e1000 driver over the rtl8129 card. The latter gives irq issues with Dino emulation.
 

Revision as of 07:44, 13 March 2019

Contents

QEMU support status regarding hppa/parisc

Starting with QEMU version 2.12 (April 2018), qemu fully supports hppa user emulation (hppa-linux-user) and hppa system emulation (qemu-system-hppa). All necessary changes have been merged into the upstream qemu git tree.

PA-RISC machines need a firmware ("PDC" = Processor Dependend Code). Qemu includes a precompiled PDC firmware for hppa (pc-bios/hppa-firmware.img), which is based on a fork of SeaBIOS .

The QEMU eumulation is able to run Linux and HP-UX. Improved HP-UX support is still being worked on.

QEMU on parisc has been made available by:

  • Richard Henderson: QEMU CPU emulation, QEMU hardware divers
  • Helge Deller: QEMU hardware drivers, SeaBIOS PDC firmware
  • Sven Schnelle: Lots of fixes all over QEMU and SeaBIOS (SCSI, CPU emulation fixes, SeaBIOS PDC firmware)

Ready-to-run QEMU image for parisc

Download Debian hard disc image:

wget http://backup.parisc-linux.org/qemu/debian-10-hdd-img.tar.bz2

Unzip image:

tar xvfj debian-10-hdd-img.tar.bz2

Run qemu:

./hppa-softmmu/qemu-system-hppa -drive file=debian-10-hdd.img -nographic -serial mon:stdio -accel tcg,thread=multi -smp cpus=4 

Log in as root, root password is "rootme"

How to build QEMU from source

Check out the qemu git tree

Run configure, e.g.

  • (for system emulation) ./configure --target-list=hppa-softmmu --enable-numa
  • (for user emulation) ./configure --target-list=hppa-linux-user --disable-stack-protector --prefix=/home/qemu-hppa/chroot-unstable --interp-prefix=/home/qemu-hppa/chroot-unstable --static

Run "make"

How to run QEMU with Debian-10 installer image

  • Create a virtual hard disc once:
qemu-img create -f qcow2 hdd.img 50G
./hppa-softmmu/qemu-system-hppa -drive file=hdd.img -drive file=debian-10.0-hppa-NETINST-1.iso,media=cdrom -boot order=d -nographic -serial mon:stdio 
  • Choose typical installation options, the defaults are OK.
  • Either skip the step "Configure the Package manager", or configure the mirror as with hostname "ftp.ports.debian.org", and directory "/debian-ports"
  • Shut down virtual machine after installation
  • Start emulator with installed operating system any time:
./hppa-softmmu/qemu-system-hppa -drive file=hdd.img -nographic -serial mon:stdio -accel tcg,thread=multi -smp cpus=2 
  • Edit the sources.list (/etc/apt/sources.list) file:
deb http://ftp.ports.debian.org/debian-ports unstable main
deb [arch=all] http://ftp.debian.org/debian unstable main 
deb-src http://ftp.debian.org/debian unstable main


Some QEMU notes

Prefer the e1000 driver over the rtl8129 card. The latter gives irq issues with Dino emulation.

Possible qemu options:

  • -accel tcg,thread=multi - always use this to enable parallel tcg (otherwise all guest CPUs run on one host CPU)
  • -smp cpus=4 - define number of CPUs in the guest (maximum CPUs: 32)
  • -boot menu=on - Firmware: enable interactive mode (boot prompt)
  • -boot order=c - Firmware: Boot from hard disc
  • -boot order=d - Firmware: Boot from CD/DVD
  • -serial mon:stdio use serial console
  • -nographic - no graphics device
  • -device VGA - provide PCI VGA graphic card
Personal tools