]> rtime.felk.cvut.cz Git - coffee/buildroot.git/commitdiff
board/pc: add documentation for testing with qemu
authorErico Nunes <nunes.erico@gmail.com>
Sun, 22 Oct 2017 13:54:25 +0000 (15:54 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sun, 22 Oct 2017 14:29:07 +0000 (16:29 +0200)
Add some documentation about running the pc defconfigs in qemu.
In particular, document the use of the -bios parameter to use the OVMF
firmware to test the UEFI image.

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Cc: Peter Korsgaard <peter@korsgaard.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
board/pc/readme.txt

index 68ca21166f900492beb9b2d59ade9f51348ce3b1..ca3b5123c1d44684a9d2cc45b3f6f0827734c083 100644 (file)
@@ -35,3 +35,44 @@ Bare PC sample config
   the setup as well.
 
 3. Enjoy
+
+Emulation in qemu (BIOS)
+========================
+
+1. Edit grub-bios.cfg
+
+  Since the driver will show up in the virtual machine as /dev/vda,
+  change board/pc/grub-bios.cfg to use root=/dev/vda2 instead of
+  root=/dev/sda2. Then rebuild grub2 and the image.
+
+2. Run the emulation with:
+
+qemu-system-x86_64 \
+       -M pc \
+       -drive file=output/images/disk.img,if=virtio,format=raw \
+       -net nic,model=virtio \
+       -net user
+
+
+Emulation in qemu (UEFI)
+========================
+
+1. Edit grub-efi.cfg
+
+  Since the driver will show up in the virtual machine as /dev/vda,
+  change board/pc/grub-efi.cfg to use root=/dev/vda2 instead of
+  root=/dev/sda2. Then rebuild grub2 and the image.
+
+2. Run the emulation with:
+
+qemu-system-x86_64 \
+       -M pc \
+       -bios </path/to/OVMF_CODE.fd> \
+       -drive file=output/images/disk.img,if=virtio,format=raw \
+       -net nic,model=virtio \
+       -net user
+
+Note that </path/to/OVMF.fd> needs to point to a valid x86_64 UEFI
+firmware image for qemu. It may be provided by your distribution as a
+edk2 or OVMF package, in path such as
+/usr/share/edk2/ovmf/OVMF_CODE.fd .