Difference between revisions of "QEMU"

From coreboot
Jump to: navigation, search
(Ready-made QEMU images: FILO QEMU image.)
m (made it more copy/paste-friendly)
Line 20: Line 20:
 
The QEMU image uses coreboot v3 (r672) and [[FILO]] (r45) with a certain configuration (for example: it's looking for '''/boot/grub/menu.lst''' on hda1).
 
The QEMU image uses coreboot v3 (r672) and [[FILO]] (r45) with a certain configuration (for example: it's looking for '''/boot/grub/menu.lst''' on hda1).
  
  $ mkdir foo
+
  mkdir foo
  $ cd foo
+
  cd foo
  $ wget http://www.coreboot.org/images/b/b9/Qemu_coreboot_filo.zip
+
  wget http://www.coreboot.org/images/b/b9/Qemu_coreboot_filo.zip
  $ wget http://www.coreboot.org/images/0/0d/Vgabios-cirrus.zip
+
  wget http://www.coreboot.org/images/0/0d/Vgabios-cirrus.zip
  $ unzip Qemu_coreboot_filo.zip
+
  unzip Qemu_coreboot_filo.zip
  $ unzip Vgabios-cirrus.zip
+
  unzip Vgabios-cirrus.zip
  $ mv qemu_coreboot_filo.bin bios.bin
+
  mv qemu_coreboot_filo.bin bios.bin
  $ cd ..
+
  cd ..
  $ qemu -L foo -hda /dev/zero -serial stdio
+
  qemu -L foo -hda /dev/zero -serial stdio
  
 
Replace '''/dev/zero''' above with a real QEMU disk image which has a '''/boot/grub/menu.lst''' on '''hda1''' to actually boot something.
 
Replace '''/dev/zero''' above with a real QEMU disk image which has a '''/boot/grub/menu.lst''' on '''hda1''' to actually boot something.
Line 38: Line 38:
 
This is a small payload called [[coreinfo]].
 
This is a small payload called [[coreinfo]].
  
  $ mkdir foo
+
  mkdir foo
  $ cd foo
+
  cd foo
  $ wget http://www.coreboot.org/images/0/06/Qemu_coreboot_coreinfo.zip
+
  wget http://www.coreboot.org/images/0/06/Qemu_coreboot_coreinfo.zip
  $ wget http://www.coreboot.org/images/0/0d/Vgabios-cirrus.zip
+
  wget http://www.coreboot.org/images/0/0d/Vgabios-cirrus.zip
  $ unzip Qemu_coreboot_coreinfo.zip
+
  unzip Qemu_coreboot_coreinfo.zip
  $ unzip Vgabios-cirrus.zip
+
  unzip Vgabios-cirrus.zip
  $ mv qemu_coreboot_coreinfo.bin bios.bin
+
  mv qemu_coreboot_coreinfo.bin bios.bin
  $ cd ..
+
  cd ..
  $ qemu -L foo -hda /dev/zero -serial stdio
+
  qemu -L foo -hda /dev/zero -serial stdio
  
 
=== coreboot v3 + invaders ===
 
=== coreboot v3 + invaders ===
Line 52: Line 52:
 
[[Image:Coreboot invaders.png|thumb|right|[[GRUB invaders]] as payload.]]
 
[[Image:Coreboot invaders.png|thumb|right|[[GRUB invaders]] as payload.]]
  
  $ mkdir foo
+
  mkdir foo
  $ cd foo
+
  cd foo
  $ wget http://www.coreboot.org/images/c/c8/Qemu_coreboot_invaders.zip
+
  wget http://www.coreboot.org/images/c/c8/Qemu_coreboot_invaders.zip
  $ wget http://www.coreboot.org/images/0/0d/Vgabios-cirrus.zip
+
  wget http://www.coreboot.org/images/0/0d/Vgabios-cirrus.zip
  $ unzip Qemu_coreboot_invaders.zip
+
  unzip Qemu_coreboot_invaders.zip
  $ unzip Vgabios-cirrus.zip
+
  unzip Vgabios-cirrus.zip
  $ mv qemu_coreboot_invaders.bin bios.bin
+
  mv qemu_coreboot_invaders.bin bios.bin
  $ cd ..
+
  cd ..
  $ qemu -L foo -hda /dev/zero -serial stdio
+
  qemu -L foo -hda /dev/zero -serial stdio
  
 
=== coreboot v3 + libpayload + tint ===
 
=== coreboot v3 + libpayload + tint ===
Line 68: Line 68:
 
This is coreboot v3 (r656), [[libpayload]] (r3225), and tint 0.03b patched to be built against libpayload.
 
This is coreboot v3 (r656), [[libpayload]] (r3225), and tint 0.03b patched to be built against libpayload.
  
  $ mkdir foo
+
  mkdir foo
  $ cd foo
+
  cd foo
  $ wget http://www.coreboot.org/images/6/62/Qemu_libpayload_tint.zip
+
  wget http://www.coreboot.org/images/6/62/Qemu_libpayload_tint.zip
  $ wget http://www.coreboot.org/images/0/0d/Vgabios-cirrus.zip
+
  wget http://www.coreboot.org/images/0/0d/Vgabios-cirrus.zip
  $ unzip Qemu_libpayload_tint.zip
+
  unzip Qemu_libpayload_tint.zip
  $ unzip Vgabios-cirrus.zip
+
  unzip Vgabios-cirrus.zip
  $ mv qemu_libpayload_tint.bin bios.bin
+
  mv qemu_libpayload_tint.bin bios.bin
  $ cd ..
+
  cd ..
  $ qemu -L foo -hda /dev/zero -serial stdio
+
  qemu -L foo -hda /dev/zero -serial stdio
  
 
=== coreboot v3 + Memtest86 ===
 
=== coreboot v3 + Memtest86 ===
Line 84: Line 84:
 
This is coreboot v3 (r656) and [[Memtest86]] (3.4) with serial support enabled. The VGA display in QEMU is broken after a few seconds, this is a known issue, but we don't yet know what exactly the problem is.
 
This is coreboot v3 (r656) and [[Memtest86]] (3.4) with serial support enabled. The VGA display in QEMU is broken after a few seconds, this is a known issue, but we don't yet know what exactly the problem is.
  
  $ mkdir foo
+
  mkdir foo
  $ cd foo
+
  cd foo
  $ wget http://www.coreboot.org/images/3/33/Qemu_coreboot_memtest.zip
+
  wget http://www.coreboot.org/images/3/33/Qemu_coreboot_memtest.zip
  $ wget http://www.coreboot.org/images/0/0d/Vgabios-cirrus.zip
+
  wget http://www.coreboot.org/images/0/0d/Vgabios-cirrus.zip
  $ unzip Qemu_coreboot_memtest.zip
+
  unzip Qemu_coreboot_memtest.zip
  $ unzip Vgabios-cirrus.zip
+
  unzip Vgabios-cirrus.zip
  $ mv qemu_coreboot_memtest.bin bios.bin
+
  mv qemu_coreboot_memtest.bin bios.bin
  $ cd ..
+
  cd ..
  $ qemu -L foo -hda /dev/zero -serial stdio
+
  qemu -L foo -hda /dev/zero -serial stdio
  
 
=== coreboot v3 + OpenBIOS ===
 
=== coreboot v3 + OpenBIOS ===
Line 100: Line 100:
 
This is coreboot v3 (r672) and [[OpenBIOS]] (r186).
 
This is coreboot v3 (r672) and [[OpenBIOS]] (r186).
  
  $ mkdir foo
+
  mkdir foo
  $ cd foo
+
  cd foo
  $ wget http://www.coreboot.org/images/9/9d/Qemu_coreboot_openbios.zip
+
  wget http://www.coreboot.org/images/9/9d/Qemu_coreboot_openbios.zip
  $ wget http://www.coreboot.org/images/0/0d/Vgabios-cirrus.zip
+
  wget http://www.coreboot.org/images/0/0d/Vgabios-cirrus.zip
  $ unzip Qemu_coreboot_openbios.zip
+
  unzip Qemu_coreboot_openbios.zip
  $ unzip Vgabios-cirrus.zip
+
  unzip Vgabios-cirrus.zip
  $ mv qemu_coreboot_openbios.bin bios.bin
+
  mv qemu_coreboot_openbios.bin bios.bin
  $ cd ..
+
  cd ..
  $ qemu -L foo -hda /dev/zero -serial stdio
+
  qemu -L foo -hda /dev/zero -serial stdio
  
 
{{PD-self}}
 
{{PD-self}}

Revision as of 18:30, 22 April 2009

You can easily try out coreboot using QEMU, without having to actually flash the BIOS chip on your real hardware.

Tutorials

Ready-made QEMU images

We'll soon provide various downloadable QEMU images you can use to try out coreboot.

You need a patched version of vgabios-cirrus.zip for these images to work fine, the version in QEMU's CVS repository does not yet work. The image from Debian's QEMU package (/usr/share/qemu/vgabios-cirrus.bin) is already patched and works, too.

coreboot v3 + FILO

FILO payload.

FILO is a simple bootloader which can load (e.g.) Linux kernels from disk.

The QEMU image uses coreboot v3 (r672) and FILO (r45) with a certain configuration (for example: it's looking for /boot/grub/menu.lst on hda1).

mkdir foo
cd foo
wget http://www.coreboot.org/images/b/b9/Qemu_coreboot_filo.zip
wget http://www.coreboot.org/images/0/0d/Vgabios-cirrus.zip
unzip Qemu_coreboot_filo.zip
unzip Vgabios-cirrus.zip
mv qemu_coreboot_filo.bin bios.bin
cd ..
qemu -L foo -hda /dev/zero -serial stdio

Replace /dev/zero above with a real QEMU disk image which has a /boot/grub/menu.lst on hda1 to actually boot something.

coreboot v3 + libpayload + coreinfo

coreinfo NVRAM dump.

This is a small payload called coreinfo.

mkdir foo
cd foo
wget http://www.coreboot.org/images/0/06/Qemu_coreboot_coreinfo.zip
wget http://www.coreboot.org/images/0/0d/Vgabios-cirrus.zip
unzip Qemu_coreboot_coreinfo.zip
unzip Vgabios-cirrus.zip
mv qemu_coreboot_coreinfo.bin bios.bin
cd ..
qemu -L foo -hda /dev/zero -serial stdio

coreboot v3 + invaders

GRUB invaders as payload.
mkdir foo
cd foo
wget http://www.coreboot.org/images/c/c8/Qemu_coreboot_invaders.zip
wget http://www.coreboot.org/images/0/0d/Vgabios-cirrus.zip
unzip Qemu_coreboot_invaders.zip
unzip Vgabios-cirrus.zip
mv qemu_coreboot_invaders.bin bios.bin
cd ..
qemu -L foo -hda /dev/zero -serial stdio

coreboot v3 + libpayload + tint

tint as payload.

This is coreboot v3 (r656), libpayload (r3225), and tint 0.03b patched to be built against libpayload.

mkdir foo
cd foo
wget http://www.coreboot.org/images/6/62/Qemu_libpayload_tint.zip
wget http://www.coreboot.org/images/0/0d/Vgabios-cirrus.zip
unzip Qemu_libpayload_tint.zip
unzip Vgabios-cirrus.zip
mv qemu_libpayload_tint.bin bios.bin
cd ..
qemu -L foo -hda /dev/zero -serial stdio

coreboot v3 + Memtest86

Memtest86 payload.

This is coreboot v3 (r656) and Memtest86 (3.4) with serial support enabled. The VGA display in QEMU is broken after a few seconds, this is a known issue, but we don't yet know what exactly the problem is.

mkdir foo
cd foo
wget http://www.coreboot.org/images/3/33/Qemu_coreboot_memtest.zip
wget http://www.coreboot.org/images/0/0d/Vgabios-cirrus.zip
unzip Qemu_coreboot_memtest.zip
unzip Vgabios-cirrus.zip
mv qemu_coreboot_memtest.bin bios.bin
cd ..
qemu -L foo -hda /dev/zero -serial stdio

coreboot v3 + OpenBIOS

OpenBIOS payload.

This is coreboot v3 (r672) and OpenBIOS (r186).

mkdir foo
cd foo
wget http://www.coreboot.org/images/9/9d/Qemu_coreboot_openbios.zip
wget http://www.coreboot.org/images/0/0d/Vgabios-cirrus.zip
unzip Qemu_coreboot_openbios.zip
unzip Vgabios-cirrus.zip
mv qemu_coreboot_openbios.bin bios.bin
cd ..
qemu -L foo -hda /dev/zero -serial stdio
Public domain I, the copyright holder of this work, hereby release it into the public domain. This applies worldwide.

In case this is not legally possible:
I grant anyone the right to use this work for any purpose, without any conditions, unless such conditions are required by law.