Makefile 707 B

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