Commit c5d5cba7 authored by Ard Biesheuvel's avatar Ard Biesheuvel
Browse files

loongarch: efi: enable generic EFI compressed boot



Wire up the generic EFI zboot support for LoongArch64

Signed-off-by: default avatarArd Biesheuvel <ardb@kernel.org>
parent f5579340
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -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)

+1 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0-only
vmlinux*
vmlinuz*
+6 −0
Original line number Diff line number Diff line
@@ -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