Skip to content

Commit f557934

Browse files
committed
riscv: efi: enable generic EFI compressed boot
Wire up the generic EFI zboot support for RISC-V. Signed-off-by: Ard Biesheuvel <[email protected]> Acked-by: Palmer Dabbelt <[email protected]> Tested-by: Conor Dooley <[email protected]>
1 parent a050910 commit f557934

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

arch/riscv/Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,10 +136,14 @@ ifneq ($(CONFIG_XIP_KERNEL),y)
136136
ifeq ($(CONFIG_RISCV_M_MODE)$(CONFIG_SOC_CANAAN),yy)
137137
KBUILD_IMAGE := $(boot)/loader.bin
138138
else
139+
ifeq ($(CONFIG_EFI_ZBOOT),)
139140
KBUILD_IMAGE := $(boot)/Image.gz
141+
else
142+
KBUILD_IMAGE := $(boot)/vmlinuz.efi
143+
endif
140144
endif
141145
endif
142-
BOOT_TARGETS := Image Image.gz loader loader.bin xipImage
146+
BOOT_TARGETS := Image Image.gz loader loader.bin xipImage vmlinuz.efi
143147

144148
all: $(notdir $(KBUILD_IMAGE))
145149

arch/riscv/boot/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ Image.*
44
loader
55
loader.lds
66
loader.bin
7+
vmlinuz*
78
xipImage

arch/riscv/boot/Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,9 @@ $(obj)/Image.lzo: $(obj)/Image FORCE
5858

5959
$(obj)/loader.bin: $(obj)/loader FORCE
6060
$(call if_changed,objcopy)
61+
62+
EFI_ZBOOT_PAYLOAD := Image
63+
EFI_ZBOOT_BFD_TARGET := elf$(BITS)-littleriscv
64+
EFI_ZBOOT_MACH_TYPE := RISCV$(BITS)
65+
66+
include $(srctree)/drivers/firmware/efi/libstub/Makefile.zboot

0 commit comments

Comments
 (0)