162306a36Sopenharmony_ci# 262306a36Sopenharmony_ci# arch/xtensa/boot/Makefile 362306a36Sopenharmony_ci# 462306a36Sopenharmony_ci# This file is subject to the terms and conditions of the GNU General Public 562306a36Sopenharmony_ci# License. See the file "COPYING" in the main directory of this archive 662306a36Sopenharmony_ci# for more details. 762306a36Sopenharmony_ci# 862306a36Sopenharmony_ci# 962306a36Sopenharmony_ci 1062306a36Sopenharmony_ci 1162306a36Sopenharmony_ci# KBUILD_CFLAGS used when building rest of boot (takes effect recursively) 1262306a36Sopenharmony_ciKBUILD_CFLAGS += -fno-builtin 1362306a36Sopenharmony_ci 1462306a36Sopenharmony_cisubdir-y := lib 1562306a36Sopenharmony_citargets += vmlinux.bin vmlinux.bin.gz 1662306a36Sopenharmony_citargets += uImage xipImage 1762306a36Sopenharmony_ci 1862306a36Sopenharmony_ci# Subdirs for the boot loader(s) 1962306a36Sopenharmony_ci 2062306a36Sopenharmony_ciboot-$(CONFIG_XTENSA_PLATFORM_ISS) += Image 2162306a36Sopenharmony_ciboot-$(CONFIG_XTENSA_PLATFORM_XT2000) += Image zImage uImage 2262306a36Sopenharmony_ciboot-$(CONFIG_XTENSA_PLATFORM_XTFPGA) += Image zImage uImage 2362306a36Sopenharmony_ci 2462306a36Sopenharmony_ciall: $(boot-y) 2562306a36Sopenharmony_ciImage: boot-elf 2662306a36Sopenharmony_cizImage: boot-redboot 2762306a36Sopenharmony_ciuImage: $(obj)/uImage 2862306a36Sopenharmony_cixipImage: $(obj)/xipImage 2962306a36Sopenharmony_ci 3062306a36Sopenharmony_ciboot-elf boot-redboot: $(addprefix $(obj)/,$(subdir-y)) 3162306a36Sopenharmony_ci $(Q)$(MAKE) $(build)=$(obj)/$@ $(MAKECMDGOALS) 3262306a36Sopenharmony_ci 3362306a36Sopenharmony_ciOBJCOPYFLAGS = --strip-all -R .comment -R .notes -O binary 3462306a36Sopenharmony_ci 3562306a36Sopenharmony_ci$(obj)/vmlinux.bin: vmlinux FORCE 3662306a36Sopenharmony_ci $(call if_changed,objcopy) 3762306a36Sopenharmony_ci 3862306a36Sopenharmony_ci$(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE 3962306a36Sopenharmony_ci $(call if_changed,gzip) 4062306a36Sopenharmony_ci 4162306a36Sopenharmony_ciboot-elf: $(obj)/vmlinux.bin 4262306a36Sopenharmony_ciboot-redboot: $(obj)/vmlinux.bin.gz 4362306a36Sopenharmony_ci 4462306a36Sopenharmony_ciUIMAGE_LOADADDR = $(CONFIG_KERNEL_LOAD_ADDRESS) 4562306a36Sopenharmony_ciUIMAGE_COMPRESSION = gzip 4662306a36Sopenharmony_ci 4762306a36Sopenharmony_ci$(obj)/uImage: $(obj)/vmlinux.bin.gz FORCE 4862306a36Sopenharmony_ci $(call if_changed,uimage) 4962306a36Sopenharmony_ci $(Q)$(kecho) ' Kernel: $@ is ready' 5062306a36Sopenharmony_ci 5162306a36Sopenharmony_ci$(obj)/xipImage: vmlinux FORCE 5262306a36Sopenharmony_ci $(call if_changed,objcopy) 5362306a36Sopenharmony_ci $(Q)$(kecho) ' Kernel: $@ is ready' 54