From: Erico Nunes <nunes.erico@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v2 2/3] board/pc: add documentation for testing with qemu
Date: Sun, 22 Oct 2017 15:54:25 +0200 [thread overview]
Message-ID: <20171022135426.28901-2-nunes.erico@gmail.com> (raw)
In-Reply-To: <20171022135426.28901-1-nunes.erico@gmail.com>
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>
---
Changes v1 -> v2:
- Made the images path relative to output/ to match in-tree Buildroot
builds.
---
board/pc/readme.txt | 42 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 42 insertions(+)
diff --git a/board/pc/readme.txt b/board/pc/readme.txt
index 68ca21166f..5277ea5bc6 100644
--- a/board/pc/readme.txt
+++ b/board/pc/readme.txt
@@ -35,3 +35,45 @@ 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/QEMU_EFI.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 .
--
2.13.6
next prev parent reply other threads:[~2017-10-22 13:54 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-22 13:54 [Buildroot] [PATCH v2 1/3] configs/pc: refactor to use genimage and grub.cfg Erico Nunes
2017-10-22 13:54 ` Erico Nunes [this message]
2017-10-22 14:36 ` [Buildroot] [PATCH v2 2/3] board/pc: add documentation for testing with qemu Thomas Petazzoni
2017-10-22 15:26 ` Peter Korsgaard
2017-10-22 13:54 ` [Buildroot] [PATCH v2 3/3] DEVELOPERS: add maintainer for pc_x86_64_* defconfigs Erico Nunes
2017-10-22 14:36 ` Thomas Petazzoni
2017-10-22 14:36 ` [Buildroot] [PATCH v2 1/3] configs/pc: refactor to use genimage and grub.cfg Thomas Petazzoni
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171022135426.28901-2-nunes.erico@gmail.com \
--to=nunes.erico@gmail.com \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox