@@ -153,7 +153,7 @@ libs-$(CONFIG_EFI_STUB) += $(objtree)/drivers/firmware/efi/libstub/lib.a
boot := arch/arm64/boot
KBUILD_IMAGE := $(boot)/Image.gz
-all: Image.gz
+all: $(notdir $(KBUILD_IMAGE))
Image: vmlinux
@@ -162,6 +162,11 @@ Image: vmlinux
Image.%: Image
$(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
+ifneq ($(CONFIG_EFI_ZBOOT),)
+zImage.efi: Image
+ $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
+endif
+
install: KBUILD_IMAGE := $(boot)/Image
install zinstall:
$(call cmd,install)
@@ -38,3 +38,9 @@ $(obj)/Image.lzo: $(obj)/Image FORCE
$(obj)/Image.zst: $(obj)/Image FORCE
$(call if_changed,zstd)
+
+EFI_ZBOOT_PAYLOAD := $(obj)/Image
+EFI_ZBOOT_BFD_TARGET := elf64-littleaarch64
+EFI_ZBOOT_MACH_TYPE := ARM64
+
+include $(srctree)/drivers/firmware/efi/libstub/Makefile.zboot
Wire up the generic EFI zboot support for arm64. Signed-off-by: Ard Biesheuvel <ardb@kernel.org> --- arch/arm64/Makefile | 7 ++++++- arch/arm64/boot/Makefile | 6 ++++++ 2 files changed, 12 insertions(+), 1 deletion(-)