Qemu
From Linux PARISC Wiki
QEMU SUPPORT STATUS REGARDING HPPA / PARISC
As of April 2018, starting with qemu version 2.12, 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 qemu upstream git repository at:
During development, Richard Henderson developed the hppa related patches in his qemu git tree at:
For hppa system emulation, qemu already includes a precompiled firmware for hppa (pc-bios/hppa-firmware.img).
This firmware is based on seabios and is available in Helge Deller's SeaBIOS git tree:
HOW TO BUILD QEMU FROM SOURCE
- checkout 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"
EXAMPLE HOW TO RUN QEMU WITH DEBIAN-10 INSTALL IMAGE
- Create a virtual hard disc once:
qemu-img create -f qcow2 hdd.img 50G
- download a Linux install image, e.g.
- Start emulator with the installer image once:
./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
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)
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