[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220910081152.2238369-9-ardb@kernel.org>
Date: Sat, 10 Sep 2022 10:11:52 +0200
From: Ard Biesheuvel <ardb@...nel.org>
To: linux-efi@...r.kernel.org
Cc: linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
Ard Biesheuvel <ardb@...nel.org>,
"James E.J. Bottomley" <James.Bottomley@...senPartnership.com>,
Matthew Garrett <mjg59@...f.ucam.org>,
Peter Jones <pjones@...hat.com>,
Ilias Apalodimas <ilias.apalodimas@...aro.org>,
Heinrich Schuchardt <heinrich.schuchardt@...onical.com>,
AKASHI Takahiro <takahiro.akashi@...aro.org>,
Palmer Dabbelt <palmer@...belt.com>,
Atish Patra <atishp@...shpatra.org>,
Arnd Bergmann <arnd@...db.de>,
Huacai Chen <chenhuacai@...ngson.cn>,
Xi Ruoyao <xry111@...111.site>,
Lennart Poettering <lennart@...ttering.net>,
Jeremy Linton <jeremy.linton@....com>,
Will Deacon <will@...nel.org>,
Catalin Marinas <catalin.marinas@....com>
Subject: [PATCH v5 8/8] loongarch: efi: enable generic EFI compressed boot
Wire up the generic EFI zboot support for LoongArch64
Signed-off-by: Ard Biesheuvel <ardb@...nel.org>
---
arch/loongarch/Kconfig | 1 +
arch/loongarch/Makefile | 4 ++--
arch/loongarch/boot/.gitignore | 1 +
arch/loongarch/boot/Makefile | 6 ++++++
4 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/arch/loongarch/Kconfig b/arch/loongarch/Kconfig
index fca106a8b8af..f960dbbfb62d 100644
--- a/arch/loongarch/Kconfig
+++ b/arch/loongarch/Kconfig
@@ -55,6 +55,7 @@ config LOONGARCH
select BUILDTIME_TABLE_SORT
select COMMON_CLK
select EFI
+ select EFI_ZBOOT
select GENERIC_CLOCKEVENTS
select GENERIC_CMOS_UPDATE
select GENERIC_CPU_AUTOPROBE
diff --git a/arch/loongarch/Makefile b/arch/loongarch/Makefile
index 4bc47f47cfd8..357ed2a771bf 100644
--- a/arch/loongarch/Makefile
+++ b/arch/loongarch/Makefile
@@ -10,7 +10,7 @@ KBUILD_DEFCONFIG := loongson3_defconfig
ifndef CONFIG_EFI_STUB
KBUILD_IMAGE := $(boot)/vmlinux.elf
else
-KBUILD_IMAGE := $(boot)/vmlinux.efi
+KBUILD_IMAGE := $(boot)/vmlinuz.efi
endif
#
@@ -93,7 +93,7 @@ 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:
diff --git a/arch/loongarch/boot/.gitignore b/arch/loongarch/boot/.gitignore
index 49423ee96ef3..e5dc594dc4b6 100644
--- a/arch/loongarch/boot/.gitignore
+++ b/arch/loongarch/boot/.gitignore
@@ -1,2 +1,3 @@
# SPDX-License-Identifier: GPL-2.0-only
vmlinux*
+vmlinuz*
diff --git a/arch/loongarch/boot/Makefile b/arch/loongarch/boot/Makefile
index fecf34f50e56..4e1c374c5782 100644
--- a/arch/loongarch/boot/Makefile
+++ b/arch/loongarch/boot/Makefile
@@ -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
--
2.35.1
Powered by blists - more mailing lists