]> git.baikalelectronics.ru Git - kernel.git/commitdiff
arm64: efi: enable generic EFI compressed boot
authorArd Biesheuvel <ardb@kernel.org>
Sun, 1 May 2022 23:10:03 +0000 (01:10 +0200)
committerArd Biesheuvel <ardb@kernel.org>
Tue, 20 Sep 2022 10:01:27 +0000 (12:01 +0200)
Wire up the generic EFI zboot support for arm64.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Tested-by: Jeremy Linton <jeremy.linton@arm.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/Makefile
arch/arm64/boot/.gitignore
arch/arm64/boot/Makefile

index 6d9d4a58b8986bf6f44df34427c44e44aff9a7f4..a82bb3599094ba81413525c1d4c10921657b8f0c 100644 (file)
@@ -151,12 +151,17 @@ libs-$(CONFIG_EFI_STUB) += $(objtree)/drivers/firmware/efi/libstub/lib.a
 
 # Default target when executing plain make
 boot           := arch/arm64/boot
+
+ifeq ($(CONFIG_EFI_ZBOOT),)
 KBUILD_IMAGE   := $(boot)/Image.gz
+else
+KBUILD_IMAGE   := $(boot)/vmlinuz.efi
+endif
 
-all:   Image.gz
+all:   $(notdir $(KBUILD_IMAGE))
 
 
-Image: vmlinux
+Image vmlinuz.efi: vmlinux
        $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
 
 Image.%: Image
index 9a7a9009d43afef04a6b0df9813c5cd0be4b6a35..af5dc61f8b438852afac1ae66e007f53076e046a 100644 (file)
@@ -1,3 +1,4 @@
 # SPDX-License-Identifier: GPL-2.0-only
 Image
 Image.gz
+vmlinuz*
index a0e3dedd28839363e55e5eb4e3503f17b5dd69fa..c65aee0884103c6f7d5904d0f3680afc19b55303 100644 (file)
@@ -38,3 +38,9 @@ $(obj)/Image.lzo: $(obj)/Image FORCE
 
 $(obj)/Image.zst: $(obj)/Image FORCE
        $(call if_changed,zstd)
+
+EFI_ZBOOT_PAYLOAD      := Image
+EFI_ZBOOT_BFD_TARGET   := elf64-littleaarch64
+EFI_ZBOOT_MACH_TYPE    := ARM64
+
+include $(srctree)/drivers/firmware/efi/libstub/Makefile.zboot