Commit | Line | Data |
---|---|---|
fa96b57c HC |
1 | # |
2 | # arch/loongarch/boot/Makefile | |
3 | # | |
4 | # Copyright (C) 2020-2022 Loongson Technology Corporation Limited | |
5 | # | |
6 | ||
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) | |
10 | ||
fa96b57c HC |
11 | quiet_cmd_strip = STRIP $@ |
12 | cmd_strip = $(STRIP) -s -o $@ $< | |
13 | ||
ead384d9 HC |
14 | targets := vmlinux.elf |
15 | $(obj)/vmlinux.elf: vmlinux FORCE | |
fa96b57c | 16 | $(call if_changed,strip) |
ead384d9 HC |
17 | |
18 | targets += vmlinux.efi | |
19 | $(obj)/vmlinux.efi: vmlinux FORCE | |
20 | $(call if_changed,objcopy) | |
c5d5cba7 AB |
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 |