summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Hutt <[email protected]>2024-10-08 10:49:19 +0100
committerAnup Patel <[email protected]>2024-11-09 14:30:41 +0530
commit701948bdec90e2908517e260d06e0e5e5d0f4419 (patch)
treee8cca4d475371fa5c9e1cc68012a65e1e465b3eb
parent0171cfcc7010bcd75277a2c452e9702d934230f9 (diff)
docs: add example of building the Linux kernel
Slightly expand the QEMU docs to explain how to build the flat Linux kernel image. Signed-off-by: Tim Hutt <[email protected]> Reviewed-by: Samuel Holland <[email protected]> Reviewed-by: Anup Patel <[email protected]>
-rw-r--r--docs/platform/qemu_virt.md9
1 files changed, 8 insertions, 1 deletions
diff --git a/docs/platform/qemu_virt.md b/docs/platform/qemu_virt.md
index 0783be4a..fd87ee5a 100644
--- a/docs/platform/qemu_virt.md
+++ b/docs/platform/qemu_virt.md
@@ -56,7 +56,14 @@ qemu-system-riscv64 -M virt -m 256M -nographic \
**Linux Kernel Payload**
Note: We assume that the Linux kernel is compiled using
-*arch/riscv/configs/defconfig*.
+*arch/riscv/configs/defconfig*. The kernel must be a flattened image (a file
+called `Image`) rather than an ELF (`vmlinux`).
+
+Example of building a Linux kernel:
+```
+make ARCH=riscv CROSS_COMPILE=riscv64-linux- defconfig
+make ARCH=riscv CROSS_COMPILE=riscv64-linux- Image
+```
Build:
```