xref: /linux/arch/xtensa/boot/Makefile (revision 0ea5c948cb64bab5bc7a5516774eb8536f05aa0d)
14bedea94SChris Zankel#
24bedea94SChris Zankel# arch/xtensa/boot/Makefile
34bedea94SChris Zankel#
44bedea94SChris Zankel# This file is subject to the terms and conditions of the GNU General Public
54bedea94SChris Zankel# License.  See the file "COPYING" in the main directory of this archive
64bedea94SChris Zankel# for more details.
74bedea94SChris Zankel#
84bedea94SChris Zankel#
94bedea94SChris Zankel
104bedea94SChris Zankel
11437374e9SMilton Miller# KBUILD_CFLAGS used when building rest of boot (takes effect recursively)
12*54d3d7d3SRandy DunlapKBUILD_CFLAGS	+= -fno-builtin
134bedea94SChris Zankel
14e7d163f7SChris Zankelsubdir-y	:= lib
1565898b37SMax Filippovtargets		+= vmlinux.bin vmlinux.bin.gz
167424d9faSMax Filippovtargets		+= uImage xipImage
17e7d163f7SChris Zankel
184bedea94SChris Zankel# Subdirs for the boot loader(s)
194bedea94SChris Zankel
209a736fcbSMax Filippovboot-$(CONFIG_XTENSA_PLATFORM_ISS)    += Image
219a736fcbSMax Filippovboot-$(CONFIG_XTENSA_PLATFORM_XT2000) += Image zImage uImage
229a736fcbSMax Filippovboot-$(CONFIG_XTENSA_PLATFORM_XTFPGA) += Image zImage uImage
234bedea94SChris Zankel
249a736fcbSMax Filippovall: $(boot-y)
259a736fcbSMax FilippovImage: boot-elf
269a736fcbSMax FilippovzImage: boot-redboot
279a736fcbSMax FilippovuImage: $(obj)/uImage
287af710d9SMax FilippovxipImage: $(obj)/xipImage
294bedea94SChris Zankel
30d6c6ab93SMasahiro Yamadaboot-elf boot-redboot: $(addprefix $(obj)/,$(subdir-y))
314bedea94SChris Zankel	$(Q)$(MAKE) $(build)=$(obj)/$@ $(MAKECMDGOALS)
324bedea94SChris Zankel
334119ba21SMax FilippovOBJCOPYFLAGS = --strip-all -R .comment -R .notes -O binary
343f5ec298SMax Filippov
3565898b37SMax Filippov$(obj)/vmlinux.bin: vmlinux FORCE
363f5ec298SMax Filippov	$(call if_changed,objcopy)
373f5ec298SMax Filippov
3865898b37SMax Filippov$(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE
393f5ec298SMax Filippov	$(call if_changed,gzip)
403f5ec298SMax Filippov
4165898b37SMax Filippovboot-elf: $(obj)/vmlinux.bin
4265898b37SMax Filippovboot-redboot: $(obj)/vmlinux.bin.gz
439a736fcbSMax Filippov
449a736fcbSMax FilippovUIMAGE_LOADADDR = $(CONFIG_KERNEL_LOAD_ADDRESS)
459a736fcbSMax FilippovUIMAGE_COMPRESSION = gzip
469a736fcbSMax Filippov
4765898b37SMax Filippov$(obj)/uImage: $(obj)/vmlinux.bin.gz FORCE
489a736fcbSMax Filippov	$(call if_changed,uimage)
499a736fcbSMax Filippov	$(Q)$(kecho) '  Kernel: $@ is ready'
507af710d9SMax Filippov
517af710d9SMax Filippov$(obj)/xipImage: vmlinux FORCE
527af710d9SMax Filippov	$(call if_changed,objcopy)
537af710d9SMax Filippov	$(Q)$(kecho) '  Kernel: $@ is ready'
54