aboutsummaryrefslogtreecommitdiffstats
path: root/docs/linux
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2020-07-09 11:29:37 +0200
committerDmitry Vyukov <dvyukov@google.com>2020-07-09 11:57:12 +0200
commite2d3226c152b064706a6ef15f4595c482f6e6671 (patch)
tree8461e8847ed79e11194b4fc895effd9c3d7ab612 /docs/linux
parenta864f3d20c4372bbd155d4f4b74b6da7f4b568a2 (diff)
docs/linux: use OpenSBI jump firmware in QEMU for linux/riscv64
Use the OpenSBI "jump" firmware with the QEMU -bios parameter to boot linux/riscv64. This will allow to boot the kernel directly without having to recompile OpenSBI every time the kernel is recompiled. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Diffstat (limited to 'docs/linux')
-rw-r--r--docs/linux/setup_linux-host_qemu-vm_riscv64-kernel.md8
1 files changed, 5 insertions, 3 deletions
diff --git a/docs/linux/setup_linux-host_qemu-vm_riscv64-kernel.md b/docs/linux/setup_linux-host_qemu-vm_riscv64-kernel.md
index 5ee484111..4ea83846f 100644
--- a/docs/linux/setup_linux-host_qemu-vm_riscv64-kernel.md
+++ b/docs/linux/setup_linux-host_qemu-vm_riscv64-kernel.md
@@ -32,7 +32,7 @@ Clone the OpenSBI repository and build the bootable OpenSBI image containg the k
```shell
git clone https://github.com/riscv/opensbi
cd opensbi
-make CROSS_COMPILE=riscv64-linux-gnu- PLATFORM_RISCV_XLEN=64 PLATFORM=generic FW_PAYLOAD_PATH=<linux_build_directory>/arch/riscv/boot/Image
+make CROSS_COMPILE=riscv64-linux-gnu- PLATFORM_RISCV_XLEN=64 PLATFORM=generic
```
See the OpenSBI documentation for booting on the
@@ -99,7 +99,8 @@ Run:
qemu-system-riscv64 \
-machine virt \
-nographic \
- -kernel /opensbi/build/platform/generic/firmware/fw_payload.elf \
+ -bios /opensbi/build/platform/generic/firmware/fw_jump.bin \
+ -kernel /linux/arch/riscv/boot/Image \
-append "root=/dev/vda ro console=ttyS0" \
-object rng-random,filename=/dev/urandom,id=rng0 \
-device virtio-rng-device,rng=rng0 \
@@ -140,7 +141,8 @@ Create the manager config `riscv64.cfg` similar to the following one (adjusting
"type": "qemu",
"vm": {
"count": 1,
- "kernel": "/opensbi/build/platform/generic/firmware/fw_payload.elf",
+ "qemu_args": "-machine virt -bios /opensbi/build/platform/generic/firmware/fw_jump.bin",
+ "kernel": "/linux/arch/riscv/boot/Image",
"cpu": 2,
"mem": 2048
}