Makefile 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. #
  2. # Copyright (C) 2004-2006 Atmel Corporation
  3. #
  4. # This file is subject to the terms and conditions of the GNU General Public
  5. # License. See the file "COPYING" in the main directory of this archive
  6. # for more details.
  7. #
  8. extra-y := vmlinux.bin vmlinux.gz
  9. OBJCOPYFLAGS_vmlinux.bin := -O binary -R .note.gnu.build-id
  10. $(obj)/vmlinux.bin: vmlinux FORCE
  11. $(call if_changed,objcopy)
  12. $(obj)/vmlinux.gz: $(obj)/vmlinux.bin FORCE
  13. $(call if_changed,gzip)
  14. UIMAGE_LOADADDR = $(CONFIG_LOAD_ADDRESS)
  15. UIMAGE_ENTRYADDR = $(CONFIG_ENTRY_ADDRESS)
  16. UIMAGE_COMPRESSION = gzip
  17. targets += uImage uImage.srec
  18. $(obj)/uImage: $(obj)/vmlinux.gz
  19. $(call if_changed,uimage)
  20. @echo ' Image $@ is ready'
  21. OBJCOPYFLAGS_uImage.srec := -I binary -O srec
  22. $(obj)/uImage.srec: $(obj)/uImage
  23. $(call if_changed,objcopy)
  24. OBJCOPYFLAGS_vmlinux.elf := --change-section-lma .text-0x80000000 \
  25. --change-section-lma __ex_table-0x80000000 \
  26. --change-section-lma .rodata-0x80000000 \
  27. --change-section-lma .data-0x80000000 \
  28. --change-section-lma .init-0x80000000 \
  29. --change-section-lma .bss-0x80000000 \
  30. --change-section-lma __param-0x80000000 \
  31. --change-section-lma __ksymtab-0x80000000 \
  32. --change-section-lma __ksymtab_gpl-0x80000000 \
  33. --change-section-lma __kcrctab-0x80000000 \
  34. --change-section-lma __kcrctab_gpl-0x80000000 \
  35. --change-section-lma __ksymtab_strings-0x80000000 \
  36. --set-start 0xa0000000
  37. $(obj)/vmlinux.elf: vmlinux FORCE
  38. $(call if_changed,objcopy)
  39. quiet_cmd_sfdwarf = SFDWARF $@
  40. cmd_sfdwarf = sfdwarf $< TO $@ GNUAVR IW $(SFDWARF_FLAGS) > $(obj)/sfdwarf.log
  41. $(obj)/vmlinux.cso: $(obj)/vmlinux.elf FORCE
  42. $(call if_changed,sfdwarf)
  43. install: $(BOOTIMAGE)
  44. sh $(srctree)/install-kernel.sh $<
  45. # Generated files to be removed upon make clean
  46. clean-files := vmlinux.elf vmlinux.bin vmlinux.gz uImage uImage.srec