riscv: efi: enable generic EFI compressed boot

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>
This commit is contained in:
Ard Biesheuvel 2022-05-02 17:40:34 +02:00
parent a050910972
commit f55793403c
3 changed files with 12 additions and 1 deletions

View 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
BOOT_TARGETS := Image Image.gz loader loader.bin xipImage
endif
BOOT_TARGETS := Image Image.gz loader loader.bin xipImage vmlinuz.efi
all: $(notdir $(KBUILD_IMAGE))

View File

@ -4,4 +4,5 @@ Image.*
loader
loader.lds
loader.bin
vmlinuz*
xipImage

View 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