]> git.baikalelectronics.ru Git - kernel.git/commitdiff
riscv: efi: enable generic EFI compressed boot
authorArd Biesheuvel <ardb@kernel.org>
Mon, 2 May 2022 15:40:34 +0000 (17:40 +0200)
committerArd Biesheuvel <ardb@kernel.org>
Tue, 20 Sep 2022 07:50:30 +0000 (09:50 +0200)
Wire up the generic EFI zboot support for RISC-V.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Acked-by: Palmer Dabbelt <palmer@rivosinc.com>
Tested-by: Conor Dooley <conor.dooley@microchip.com>
arch/riscv/Makefile
arch/riscv/boot/.gitignore
arch/riscv/boot/Makefile

index 3fa8ef336822438570a95b613d7d89d2ed8872ce..d63295e213731b46040fcf4251acc1b889e4a7c9 100644 (file)
@@ -136,10 +136,14 @@ ifneq ($(CONFIG_XIP_KERNEL),y)
 ifeq ($(CONFIG_RISCV_M_MODE)$(CONFIG_SOC_CANAAN),yy)
 KBUILD_IMAGE := $(boot)/loader.bin
 else
+ifeq ($(CONFIG_EFI_ZBOOT),)
 KBUILD_IMAGE := $(boot)/Image.gz
+else
+KBUILD_IMAGE := $(boot)/vmlinuz.efi
+endif
 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))
 
index 0cea9f7fa9d5c86a70eadb312592619045400122..e1bc507e8cb25ea60b4e46b8928d3b7211a7923a 100644 (file)
@@ -4,4 +4,5 @@ Image.*
 loader
 loader.lds
 loader.bin
+vmlinuz*
 xipImage
index becd0621071cc38a54aca18804cac7f478d5df3d..d1a49adcb1d76283233785ec3bed58e2d1278e47 100644 (file)
@@ -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