/arch/xtensa/boot/boot-elf/Makefile

http://github.com/mirrors/linux · Makefile · 34 lines · 22 code · 7 blank · 5 comment · 0 complexity · d857b8ad8a0e7f76ac01a3ac03b490ec MD5 · raw file

  1. #
  2. # This file is subject to the terms and conditions of the GNU General Public
  3. # License. See the file "COPYING" in the main directory of this archive
  4. # for more details.
  5. #
  6. ifeq ($(BIG_ENDIAN),1)
  7. OBJCOPY_ARGS := -O elf32-xtensa-be
  8. else
  9. OBJCOPY_ARGS := -O elf32-xtensa-le
  10. endif
  11. export OBJCOPY_ARGS
  12. export CPPFLAGS_boot.lds += -P -C
  13. export KBUILD_AFLAGS += -mtext-section-literals
  14. boot-y := bootstrap.o
  15. OBJS := $(addprefix $(obj)/,$(boot-y))
  16. $(obj)/Image.o: vmlinux.bin $(OBJS)
  17. $(Q)$(OBJCOPY) $(OBJCOPY_ARGS) -R .comment \
  18. --add-section image=vmlinux.bin \
  19. --set-section-flags image=contents,alloc,load,load,data \
  20. $(OBJS) $@
  21. $(obj)/../Image.elf: $(obj)/Image.o $(obj)/boot.lds
  22. $(Q)$(LD) $(KBUILD_LDFLAGS) $(LDFLAGS_vmlinux) \
  23. -T $(obj)/boot.lds \
  24. --build-id=none \
  25. -o $@ $(obj)/Image.o
  26. $(Q)$(kecho) ' Kernel: $@ is ready'
  27. all Image: $(obj)/../Image.elf