From: Ard Biesheuvel Date: Mon, 2 May 2022 15:40:34 +0000 (+0200) Subject: riscv: efi: enable generic EFI compressed boot X-Git-Tag: v6.6.17~6442^2~10 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f55793403c53ffaaaca43948498ed2b8896d9615;p=platform%2Fkernel%2Flinux-rpi.git riscv: efi: enable generic EFI compressed boot Wire up the generic EFI zboot support for RISC-V. Signed-off-by: Ard Biesheuvel Acked-by: Palmer Dabbelt Tested-by: Conor Dooley --- diff --git a/arch/riscv/Makefile b/arch/riscv/Makefile index 3fa8ef3..d63295e 100644 --- a/arch/riscv/Makefile +++ b/arch/riscv/Makefile @@ -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)) diff --git a/arch/riscv/boot/.gitignore b/arch/riscv/boot/.gitignore index 0cea9f7..e1bc507 100644 --- a/arch/riscv/boot/.gitignore +++ b/arch/riscv/boot/.gitignore @@ -4,4 +4,5 @@ Image.* loader loader.lds loader.bin +vmlinuz* xipImage diff --git a/arch/riscv/boot/Makefile b/arch/riscv/boot/Makefile index becd062..d1a49ad 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