Skip to content

Commit c5d5cba

Browse files
committed
loongarch: efi: enable generic EFI compressed boot
Wire up the generic EFI zboot support for LoongArch64 Signed-off-by: Ard Biesheuvel <[email protected]>
1 parent f557934 commit c5d5cba

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

arch/loongarch/Makefile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,13 @@ boot := arch/loongarch/boot
77

88
KBUILD_DEFCONFIG := loongson3_defconfig
99

10+
image-name-y := vmlinux
11+
image-name-$(CONFIG_EFI_ZBOOT) := vmlinuz
12+
1013
ifndef CONFIG_EFI_STUB
1114
KBUILD_IMAGE := $(boot)/vmlinux.elf
1215
else
13-
KBUILD_IMAGE := $(boot)/vmlinux.efi
16+
KBUILD_IMAGE := $(boot)/$(image-name-y).efi
1417
endif
1518

1619
#
@@ -93,11 +96,11 @@ vdso_install:
9396

9497
all: $(notdir $(KBUILD_IMAGE))
9598

96-
vmlinux.elf vmlinux.efi: vmlinux
99+
vmlinux.elf vmlinux.efi vmlinuz.efi: vmlinux
97100
$(Q)$(MAKE) $(build)=$(boot) $(bootvars-y) $(boot)/$@
98101

99102
install:
100-
$(Q)install -D -m 755 $(KBUILD_IMAGE) $(INSTALL_PATH)/vmlinux-$(KERNELRELEASE)
103+
$(Q)install -D -m 755 $(KBUILD_IMAGE) $(INSTALL_PATH)/$(image-name-y)-$(KERNELRELEASE)
101104
$(Q)install -D -m 644 .config $(INSTALL_PATH)/config-$(KERNELRELEASE)
102105
$(Q)install -D -m 644 System.map $(INSTALL_PATH)/System.map-$(KERNELRELEASE)
103106

arch/loongarch/boot/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
# SPDX-License-Identifier: GPL-2.0-only
22
vmlinux*
3+
vmlinuz*

arch/loongarch/boot/Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,9 @@ $(obj)/vmlinux.elf: vmlinux FORCE
1818
targets += vmlinux.efi
1919
$(obj)/vmlinux.efi: vmlinux FORCE
2020
$(call if_changed,objcopy)
21+
22+
EFI_ZBOOT_PAYLOAD := vmlinux.efi
23+
EFI_ZBOOT_BFD_TARGET := elf64-loongarch
24+
EFI_ZBOOT_MACH_TYPE := LOONGARCH64
25+
26+
include $(srctree)/drivers/firmware/efi/libstub/Makefile.zboot

0 commit comments

Comments
 (0)