Skip to content

Commit f72e90c

Browse files
committed
docs: add example of building the Linux kernel
Slightly expand the QEMU docs to explain how to build the flat Linux kernel image.
1 parent 2ffa0a1 commit f72e90c

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

docs/platform/qemu_virt.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,13 @@ qemu-system-riscv64 -M virt -m 256M -nographic \
5656
**Linux Kernel Payload**
5757

5858
Note: We assume that the Linux kernel is compiled using
59-
*arch/riscv/configs/defconfig*.
59+
*arch/riscv/configs/defconfig*. The kernel must be a flattened image (a file called `Image`) rather than an ELF (`vmlinux`).
60+
61+
Example of building a Linux kernel:
62+
```
63+
make ARCH=riscv CROSS_COMPILE=riscv64-linux- defconfig
64+
make ARCH=riscv CROSS_COMPILE=riscv64-linux- Image
65+
```
6066

6167
Build:
6268
```

0 commit comments

Comments
 (0)