[PATCH v2 5/6] arm64: efi: enable generic EFI compressed boot

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Wire up the generic EFI zboot support for arm64.

Signed-off-by: Ard Biesheuvel <ardb@xxxxxxxxxx>
---
 arch/arm64/Makefile      |  5 +++++
 arch/arm64/boot/Makefile | 12 ++++++++++++
 2 files changed, 17 insertions(+)

diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile
index 6d9d4a58b898..ad4f849b91e8 100644
--- a/arch/arm64/Makefile
+++ b/arch/arm64/Makefile
@@ -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)
diff --git a/arch/arm64/boot/Makefile b/arch/arm64/boot/Makefile
index a0e3dedd2883..08fcd39ae808 100644
--- a/arch/arm64/boot/Makefile
+++ b/arch/arm64/boot/Makefile
@@ -38,3 +38,15 @@ $(obj)/Image.lzo: $(obj)/Image FORCE
 
 $(obj)/Image.zst: $(obj)/Image FORCE
 	$(call if_changed,zstd)
+
+ZBOOT_PAYLOAD		:= $(obj)/Image
+ZBOOT_BFD_TARGET	:= elf64-littleaarch64
+ZBOOT_LD_FLAGS		:= --defsym=__efistub_strnlen=__pi_strnlen \
+			   --defsym=__efistub_memmove=__pi_memmove \
+			   --defsym=__efistub_memcpy=__pi_memcpy \
+			   --defsym=__efistub_memset=__pi_memset
+
+ZBOOT_EXTRA_OBJS	:= memcpy.o memset.o strnlen.o
+ZBOOT_EXTRA_DEPS	:= $(addprefix $(objtree)/arch/arm64/lib/,$(ZBOOT_EXTRA_OBJS))
+
+include $(srctree)/drivers/firmware/efi/libstub/Makefile.zboot
-- 
2.35.1




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux