]> git.baikalelectronics.ru Git - kernel.git/commitdiff
loongarch: efi: enable generic EFI compressed boot
authorArd Biesheuvel <ardb@kernel.org>
Mon, 22 Aug 2022 12:39:49 +0000 (14:39 +0200)
committerArd Biesheuvel <ardb@kernel.org>
Tue, 20 Sep 2022 07:50:31 +0000 (09:50 +0200)
Wire up the generic EFI zboot support for LoongArch64

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
arch/loongarch/Makefile
arch/loongarch/boot/.gitignore
arch/loongarch/boot/Makefile

index 4bc47f47cfd83379b21a0d9df7a23f6fb183f779..84689c3ee3af44c2143586e961a2a2bbefc6c05e 100644 (file)
@@ -7,10 +7,13 @@ boot  := arch/loongarch/boot
 
 KBUILD_DEFCONFIG := loongson3_defconfig
 
+image-name-y                   := vmlinux
+image-name-$(CONFIG_EFI_ZBOOT) := vmlinuz
+
 ifndef CONFIG_EFI_STUB
 KBUILD_IMAGE   := $(boot)/vmlinux.elf
 else
-KBUILD_IMAGE   := $(boot)/vmlinux.efi
+KBUILD_IMAGE   := $(boot)/$(image-name-y).efi
 endif
 
 #
@@ -93,11 +96,11 @@ vdso_install:
 
 all:   $(notdir $(KBUILD_IMAGE))
 
-vmlinux.elf vmlinux.efi: vmlinux
+vmlinux.elf vmlinux.efi vmlinuz.efi: vmlinux
        $(Q)$(MAKE) $(build)=$(boot) $(bootvars-y) $(boot)/$@
 
 install:
-       $(Q)install -D -m 755 $(KBUILD_IMAGE) $(INSTALL_PATH)/vmlinux-$(KERNELRELEASE)
+       $(Q)install -D -m 755 $(KBUILD_IMAGE) $(INSTALL_PATH)/$(image-name-y)-$(KERNELRELEASE)
        $(Q)install -D -m 644 .config $(INSTALL_PATH)/config-$(KERNELRELEASE)
        $(Q)install -D -m 644 System.map $(INSTALL_PATH)/System.map-$(KERNELRELEASE)
 
index 49423ee96ef30390d5ce50642a5495cc491817a0..e5dc594dc4b6a024962068c59164f3bbaff465ce 100644 (file)
@@ -1,2 +1,3 @@
 # SPDX-License-Identifier: GPL-2.0-only
 vmlinux*
+vmlinuz*
index fecf34f50e5654a0352f32690e7355b9e5d34142..4e1c374c57823ee995201c2b5d21ed70c504c5f1 100644 (file)
@@ -18,3 +18,9 @@ $(obj)/vmlinux.elf: vmlinux FORCE
 targets += vmlinux.efi
 $(obj)/vmlinux.efi: vmlinux FORCE
        $(call if_changed,objcopy)
+
+EFI_ZBOOT_PAYLOAD      := vmlinux.efi
+EFI_ZBOOT_BFD_TARGET   := elf64-loongarch
+EFI_ZBOOT_MACH_TYPE    := LOONGARCH64
+
+include $(srctree)/drivers/firmware/efi/libstub/Makefile.zboot