Makefile 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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 -Iarch/$(ARCH)/boot/include
  11. HOSTFLAGS += -Iarch/$(ARCH)/boot/include
  12. BIG_ENDIAN := $(shell echo __XTENSA_EB__ | $(CC) -E - | grep -v "\#")
  13. export ccflags-y
  14. export BIG_ENDIAN
  15. subdir-y := lib
  16. # Subdirs for the boot loader(s)
  17. boot-$(CONFIG_XTENSA_PLATFORM_ISS) += Image
  18. boot-$(CONFIG_XTENSA_PLATFORM_XT2000) += Image zImage uImage
  19. boot-$(CONFIG_XTENSA_PLATFORM_XTFPGA) += Image zImage uImage
  20. all: $(boot-y)
  21. Image: boot-elf
  22. zImage: boot-redboot
  23. uImage: $(obj)/uImage
  24. boot-elf boot-redboot: $(addprefix $(obj)/,$(subdir-y))
  25. $(Q)$(MAKE) $(build)=$(obj)/$@ $(MAKECMDGOALS)
  26. OBJCOPYFLAGS = --strip-all -R .comment -R .notes -O binary
  27. vmlinux.bin: vmlinux FORCE
  28. $(call if_changed,objcopy)
  29. vmlinux.bin.gz: vmlinux.bin FORCE
  30. $(call if_changed,gzip)
  31. boot-elf: vmlinux.bin
  32. boot-redboot: vmlinux.bin.gz
  33. UIMAGE_LOADADDR = $(CONFIG_KERNEL_LOAD_ADDRESS)
  34. UIMAGE_COMPRESSION = gzip
  35. $(obj)/uImage: vmlinux.bin.gz FORCE
  36. $(call if_changed,uimage)
  37. $(Q)$(kecho) ' Kernel: $@ is ready'