[PATCH v4 7/9] riscv: efi: enable generic EFI compressed boot

Ard Biesheuvel ardb at kernel.org
Sat Aug 27 01:38:48 PDT 2022


Wire up the generic EFI zboot support for RISC-V.

Signed-off-by: Ard Biesheuvel <ardb at kernel.org>
---
 arch/riscv/Makefile      | 2 +-
 arch/riscv/boot/Makefile | 6 ++++++
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/arch/riscv/Makefile b/arch/riscv/Makefile
index 3fa8ef336822..ee9c24db082c 100644
--- a/arch/riscv/Makefile
+++ b/arch/riscv/Makefile
@@ -139,7 +139,7 @@ else
 KBUILD_IMAGE := $(boot)/Image.gz
 endif
 endif
-BOOT_TARGETS := Image Image.gz loader loader.bin xipImage
+BOOT_TARGETS := Image Image.gz loader loader.bin xipImage vmlinuz.efi
 
 all:	$(notdir $(KBUILD_IMAGE))
 
diff --git a/arch/riscv/boot/Makefile b/arch/riscv/boot/Makefile
index becd0621071c..d1a49adcb1d7 100644
--- a/arch/riscv/boot/Makefile
+++ b/arch/riscv/boot/Makefile
@@ -58,3 +58,9 @@ $(obj)/Image.lzo: $(obj)/Image FORCE
 
 $(obj)/loader.bin: $(obj)/loader FORCE
 	$(call if_changed,objcopy)
+
+EFI_ZBOOT_PAYLOAD	:= Image
+EFI_ZBOOT_BFD_TARGET	:= elf$(BITS)-littleriscv
+EFI_ZBOOT_MACH_TYPE	:= RISCV$(BITS)
+
+include $(srctree)/drivers/firmware/efi/libstub/Makefile.zboot
-- 
2.35.1




More information about the linux-arm-kernel mailing list