18c2ecf20Sopenharmony_ci# 28c2ecf20Sopenharmony_ci# arch/xtensa/boot/Makefile 38c2ecf20Sopenharmony_ci# 48c2ecf20Sopenharmony_ci# This file is subject to the terms and conditions of the GNU General Public 58c2ecf20Sopenharmony_ci# License. See the file "COPYING" in the main directory of this archive 68c2ecf20Sopenharmony_ci# for more details. 78c2ecf20Sopenharmony_ci# 88c2ecf20Sopenharmony_ci# 98c2ecf20Sopenharmony_ci 108c2ecf20Sopenharmony_ci 118c2ecf20Sopenharmony_ci# KBUILD_CFLAGS used when building rest of boot (takes effect recursively) 128c2ecf20Sopenharmony_ciKBUILD_CFLAGS += -fno-builtin 138c2ecf20Sopenharmony_ci 148c2ecf20Sopenharmony_ciBIG_ENDIAN := $(shell echo __XTENSA_EB__ | $(CC) -E - | grep -v "\#") 158c2ecf20Sopenharmony_ci 168c2ecf20Sopenharmony_ciexport BIG_ENDIAN 178c2ecf20Sopenharmony_ci 188c2ecf20Sopenharmony_cisubdir-y := lib 198c2ecf20Sopenharmony_citargets += vmlinux.bin vmlinux.bin.gz 208c2ecf20Sopenharmony_citargets += uImage xipImage 218c2ecf20Sopenharmony_ci 228c2ecf20Sopenharmony_ci# Subdirs for the boot loader(s) 238c2ecf20Sopenharmony_ci 248c2ecf20Sopenharmony_ciboot-$(CONFIG_XTENSA_PLATFORM_ISS) += Image 258c2ecf20Sopenharmony_ciboot-$(CONFIG_XTENSA_PLATFORM_XT2000) += Image zImage uImage 268c2ecf20Sopenharmony_ciboot-$(CONFIG_XTENSA_PLATFORM_XTFPGA) += Image zImage uImage 278c2ecf20Sopenharmony_ci 288c2ecf20Sopenharmony_ciall: $(boot-y) 298c2ecf20Sopenharmony_ciImage: boot-elf 308c2ecf20Sopenharmony_cizImage: boot-redboot 318c2ecf20Sopenharmony_ciuImage: $(obj)/uImage 328c2ecf20Sopenharmony_cixipImage: $(obj)/xipImage 338c2ecf20Sopenharmony_ci 348c2ecf20Sopenharmony_ciboot-elf boot-redboot: $(addprefix $(obj)/,$(subdir-y)) 358c2ecf20Sopenharmony_ci $(Q)$(MAKE) $(build)=$(obj)/$@ $(MAKECMDGOALS) 368c2ecf20Sopenharmony_ci 378c2ecf20Sopenharmony_ciOBJCOPYFLAGS = --strip-all -R .comment -R .notes -O binary 388c2ecf20Sopenharmony_ci 398c2ecf20Sopenharmony_ci$(obj)/vmlinux.bin: vmlinux FORCE 408c2ecf20Sopenharmony_ci $(call if_changed,objcopy) 418c2ecf20Sopenharmony_ci 428c2ecf20Sopenharmony_ci$(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE 438c2ecf20Sopenharmony_ci $(call if_changed,gzip) 448c2ecf20Sopenharmony_ci 458c2ecf20Sopenharmony_ciboot-elf: $(obj)/vmlinux.bin 468c2ecf20Sopenharmony_ciboot-redboot: $(obj)/vmlinux.bin.gz 478c2ecf20Sopenharmony_ci 488c2ecf20Sopenharmony_ciUIMAGE_LOADADDR = $(CONFIG_KERNEL_LOAD_ADDRESS) 498c2ecf20Sopenharmony_ciUIMAGE_COMPRESSION = gzip 508c2ecf20Sopenharmony_ci 518c2ecf20Sopenharmony_ci$(obj)/uImage: $(obj)/vmlinux.bin.gz FORCE 528c2ecf20Sopenharmony_ci $(call if_changed,uimage) 538c2ecf20Sopenharmony_ci $(Q)$(kecho) ' Kernel: $@ is ready' 548c2ecf20Sopenharmony_ci 558c2ecf20Sopenharmony_ci$(obj)/xipImage: vmlinux FORCE 568c2ecf20Sopenharmony_ci $(call if_changed,objcopy) 578c2ecf20Sopenharmony_ci $(Q)$(kecho) ' Kernel: $@ is ready' 58