Linux loader for riscv64
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 2 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | RISC-V: Update magic numberinclude/ include/ | +4 | 0 replies | |
| 2/2 | RISC-V: Allow to boot Linux with EFI stub on riscv64grub-core/ grub-core/ grub-core/ | +382 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/2] Linux loader for riscv64
Hello.
In this patch series I would like to add a possibility to load Linux kernel with a EFI stub on riscv64 platform.
The first patch updates a RISC-V magic number as it was changed [1] in the kernel.
The second patch splits the grub-core/loader/riscv/linux.c to two parts -- riscv32 and riscv64. The first part, riscv32, is just a stub that informs about unsupported feature. This part is just a copy of the current grub-core/loader/riscv/linux.c. The second part is a loader for the kernel with the EFI stub. The loader is based on the arm64 linux loader with a few changes.
I tested these patches on a qemu-system-riscv64 with virt machine. A boot sequence was as follows:
OpenSBI (v0.9) -> U-Boot (v2021.04-rc4) -> grub -> Linux (v5.12-rc4)
[root@localhost ~]# uname -a
Linux localhost 5.12.0-rc4 #5 SMP Wed Mar 24 16:46:30 MSK 2021 riscv64 GNU/Linux
Nikita Ermakov (2):
RISC-V: Update magic number
RISC-V: Allow to boot Linux with EFI stub on riscv64
grub-core/Makefile.core.def | 4 +-
grub-core/loader/{riscv => riscv32}/linux.c | 0
grub-core/loader/riscv64/linux.c | 380 ++++++++++++++++++++
include/grub/riscv32/linux.h | 4 +-
include/grub/riscv64/linux.h | 4 +-
5 files changed, 386 insertions(+), 6 deletions(-)
rename grub-core/loader/{riscv => riscv32}/linux.c (100%)
create mode 100644 grub-core/loader/riscv64/linux.cSignature · 1 line
2.25.4