Makefile 478 B

1234567891011121314151617181920
  1. # SPDX-License-Identifier: GPL-2.0
  2. #
  3. # create a compressed vmlinux image from the original vmlinux
  4. #
  5. targets := vmlinux head.o misc.o piggy.o vmlinux.lds
  6. asflags-y :=
  7. OBJECTS = $(obj)/head.o $(obj)/misc.o
  8. LDFLAGS_vmlinux := -T
  9. $(obj)/vmlinux: $(obj)/vmlinux.lds $(OBJECTS) $(obj)/piggy.o FORCE
  10. $(call if_changed,ld)
  11. LDFLAGS_piggy.o := -r --format binary --oformat elf32-littlenios2 -T
  12. $(obj)/piggy.o: $(obj)/vmlinux.scr $(obj)/../vmlinux.gz FORCE
  13. $(call if_changed,ld)