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 [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=474efecb65dceb15f793b6e2f2b226e952f0f8e9 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.c -- 2.25.4 _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel