2 # arch/loongarch/boot/Makefile
4 # Copyright (C) 2020-2022 Loongson Technology Corporation Limited
7 drop-sections
:= .comment .note .options .note.gnu.build-id
8 strip-flags
:= $(addprefix --remove-section
=,$(drop-sections
)) -S
9 OBJCOPYFLAGS_vmlinux.efi
:= -O binary
$(strip-flags
)
11 quiet_cmd_strip
= STRIP
$@
12 cmd_strip
= $(STRIP
) -s
-o
$@
$<
14 targets
:= vmlinux.elf
15 $(obj
)/vmlinux.elf
: vmlinux FORCE
16 $(call if_changed
,strip)
18 targets
+= vmlinux.efi
19 $(obj
)/vmlinux.efi
: vmlinux FORCE
20 $(call if_changed
,objcopy
)
22 EFI_ZBOOT_PAYLOAD
:= vmlinux.efi
23 EFI_ZBOOT_BFD_TARGET
:= elf64-loongarch
24 EFI_ZBOOT_MACH_TYPE
:= LOONGARCH64
26 include $(srctree
)/drivers
/firmware
/efi
/libstub
/Makefile.zboot