QEMU: Difference between revisions

From OSDev.wiki
Jump to navigation Jump to search
[unchecked revision][unchecked revision]
Content added Content deleted
No edit summary
No edit summary
Line 91: Line 91:


[[Category:Emulators]]
[[Category:Emulators]]
[[Category:Tools]]

Revision as of 01:33, 6 December 2006

Features

  • two operating modes: full system emulation (which interrest us) and linux user process emulation ( which interrest other people ;) and is a NxM platform emulator (multiple host, multiple targets).
  • it is faster than Bochs because it uses 'just in time' code compilation technique (allowing reuse of previous interpretation)
  • lacks technical documentation so far (imho), which probably makes it less suitable for "baby steps".
  • provides native GDB support and you can attach it to GDB/DDD by adding the "-s -S" switches to the command line and from the GDB window start the debugging session with "target remote :1234" if QEMU is waiting on local port 1234.
  • support VBE 2.0. This can be checked if you use the GRUB floppy image ready for use and tyiping the command vbeprobe. The test return:


Supported VBE modes:

0x101 Packed pixel 640x480x8
0x110 Direct Color 640x480x15
0x111 Direct Color 640x480x16
0x112 Direct Color 640x480x24
0x103 Packed pixel 800x600x8
0x113 Direct Color 800x600x15
0x114 Direct Color 800x600x16
0x115 Direct Color 800x600x24
0x105 Packed pixel 1024x768x8
0x116 Direct Color 1024x768x15
0x117 Direct Color 1024x768x16
0x118 Direct Color 1024x768x24
0x107 Packed pixel 1024x768x8
0x119 Direct Color 1024x768x15
0x11A Direct Color 1024x768x16

Supported Devices

  • built in NE2000 support
  • PCI VGA card (Cirrus Logic)
  • PCI support (With BIOS32).

Useage

QEMU is easy to use, it does not have a configuration script like Bochs. To use QEMU with your OS,

 qemu -L .\ -fda my_disk_image.img -m 32

The -L tells QEMU where to find its BIOS images. The -m tells how many megabytes of memory to use. the default is 128

You can use -fda/-fdb for disk image files And for hard disks -hda/-hdb, -hdc/-hdd To change boot devices -boot {a/b/c/d}. a/b tell it to boot floppy a or b. C for hard disk and D for CDROM.

Alternativly you can point hdc or use -cdrom to an ISO image file (2048 bytes per sector ISO format).

Whilst inside the emulator you can use CTRL-SHIFT-{1,2,3} to swap in/out of the emulation screen, the QEMU console and a serial console. The system console lets you change disk images and other things and do memory dumps etc.