Makefile 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. #
  2. # arch/xtensa/boot/Makefile
  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. #
  9. # KBUILD_CFLAGS used when building rest of boot (takes effect recursively)
  10. KBUILD_CFLAGS += -fno-builtin
  11. subdir-y := lib
  12. targets += vmlinux.bin vmlinux.bin.gz
  13. targets += uImage xipImage
  14. # Subdirs for the boot loader(s)
  15. boot-$(CONFIG_XTENSA_PLATFORM_ISS) += Image
  16. boot-$(CONFIG_XTENSA_PLATFORM_XT2000) += Image zImage uImage
  17. boot-$(CONFIG_XTENSA_PLATFORM_XTFPGA) += Image zImage uImage
  18. all: $(boot-y)
  19. Image: boot-elf
  20. zImage: boot-redboot
  21. uImage: $(obj)/uImage
  22. xipImage: $(obj)/xipImage
  23. boot-elf boot-redboot: $(addprefix $(obj)/,$(subdir-y))
  24. $(Q)$(MAKE) $(build)=$(obj)/$@ $(MAKECMDGOALS)
  25. OBJCOPYFLAGS = --strip-all -R .comment -R .notes -O binary
  26. $(obj)/vmlinux.bin: vmlinux FORCE
  27. $(call if_changed,objcopy)
  28. $(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE
  29. $(call if_changed,gzip)
  30. boot-elf: $(obj)/vmlinux.bin
  31. boot-redboot: $(obj)/vmlinux.bin.gz
  32. UIMAGE_LOADADDR = $(CONFIG_KERNEL_LOAD_ADDRESS)
  33. UIMAGE_COMPRESSION = gzip
  34. $(obj)/uImage: $(obj)/vmlinux.bin.gz FORCE
  35. $(call if_changed,uimage)
  36. $(Q)$(kecho) ' Kernel: $@ is ready'
  37. $(obj)/xipImage: vmlinux FORCE
  38. $(call if_changed,objcopy)
  39. $(Q)$(kecho) ' Kernel: $@ is ready'