docs: add example of building the Linux kernel
PATCH 1/1 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]>
--- docs/platform/qemu_virt.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
docs/platform/qemu_virt.md +8 -1
@@ -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: ```
Signature · 1 line
2.39.2
Anup Patel
AppliedPATCH 1/1 docs: add example of building the Linux kernel
Quoted 5 lines · On Tue, Oct 8, 2024 at 3:20?PM Tim Hutt <[email protected]> wrote:
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]>
LGTM.
Reviewed-by Anup Patel <[email protected]>
Applied this patch to the riscv/opensbi repo.
Thanks,
Anup
Quoted 32 lines
--- docs/platform/qemu_virt.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)docs/platform/qemu_virt.md +8
-2@@ -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: ``` --2.39.2
--
opensbi mailing list
opensbi at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/opensbi