summaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorSergii Dmytruk <sergii.dmytruk@3mdeb.com>2021-10-27 00:23:14 +0300
committerFelix Held <felix-coreboot@felixheld.de>2022-02-16 15:39:19 +0000
commita816c298821ea7d587d615b178754ced8b4660bf (patch)
tree8f6408f0773a86502d8741e2e6b84c70fa5ab7da /Documentation
parent8d436cfc1acc7a15cd821e3fb61ad1b0f797a312 (diff)
downloadcoreboot-a816c298821ea7d587d615b178754ced8b4660bf.tar.gz
coreboot-a816c298821ea7d587d615b178754ced8b4660bf.tar.bz2
coreboot-a816c298821ea7d587d615b178754ced8b4660bf.zip
payloads/external: add skiboot (for QEMU/Power9)
Add an option to build skiboot as a payload. This makes QEMU Power9 board simpler to use as skiboot is necessary anyway. Change-Id: I0b49ea7464c97cc2ff0d5030629deed549851372 Signed-off-by: Igor Bagnucki <igor.bagnucki@3mdeb.com> Signed-off-by: Krystian Hebel <krystian.hebel@3mdeb.com> Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/58656 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Michał Żygowski <michal.zygowski@3mdeb.com>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/mainboard/emulation/qemu-power9.md36
1 files changed, 29 insertions, 7 deletions
diff --git a/Documentation/mainboard/emulation/qemu-power9.md b/Documentation/mainboard/emulation/qemu-power9.md
index 3e2c75f9f4e3..be7a8398e7a5 100644
--- a/Documentation/mainboard/emulation/qemu-power9.md
+++ b/Documentation/mainboard/emulation/qemu-power9.md
@@ -1,7 +1,19 @@
# QEMU PPC64 emulator
This page describes how to build and run coreboot for QEMU/PPC64.
-You can configure ELF payload via `make menuconfig` (make sure "ROM chip size"
-is large enough).
+
+## Building coreboot
+```bash
+make defconfig KBUILD_DEFCONFIG=configs/config.emulation_qemu_power9
+make
+```
+
+This builds coreboot with no payload.
+
+## Payloads
+You can configure ELF or `skiboot` payload via `make menuconfig`. In either case
+you might need to adjust "ROM chip size" and make it large enough to accommodate
+the payload (see how much space it needs in the error you get if it doesn't
+fit).
## Running coreboot in QEMU
```bash
@@ -15,16 +27,26 @@ qemu-system-ppc64 -M powernv,hb-mode=on \
- The default CPU in QEMU for AArch64 is a 604. You specify a suitable
PowerPC CPU via `-cpu power9`.
-- By default Hostboot mode is off and it needs to be turned on to run coreboot
+- By default Hostboot mode is off and needs to be turned on to run coreboot
as a firmware rather than like an OS.
- `-bios` specifies initial program (bootloader should suffice, but whole image
works fine too).
- `-drive` specifies image for emulated flash device.
-## Building coreboot
+## Running with a kernel
+Loading `skiboot` (built automatically by coreboot or otherwise) allows
+specifying kernel and root file system to be run.
+
```bash
-make defconfig KBUILD_DEFCONFIG=configs/config.emulation_qemu_power9
-make
+qemu-system-ppc64 -M powernv,hb-mode=on \
+ -cpu power9 \
+ -bios build/coreboot.rom \
+ -drive file=build/coreboot.rom,if=mtd \
+ -serial stdio \
+ -display none \
+ -kernel zImage \
+ -initrd initrd.cpio.xz
```
-This builds coreboot with no payload.
+- Specify path to your kernel via `-kernel`.
+- Specify path to your rootfs via `-initrd`.