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) 12437374e9SMilton MillerKBUILD_CFLAGS += -fno-builtin -Iarch/$(ARCH)/boot/include 134bedea94SChris ZankelHOSTFLAGS += -Iarch/$(ARCH)/boot/include 144bedea94SChris Zankel 15123f15e6SMax FilippovBIG_ENDIAN := $(shell echo __XTENSA_EB__ | $(CC) -E - | grep -v "\#") 164bedea94SChris Zankel 173996eabbSmatt mooneyexport ccflags-y 184bedea94SChris Zankelexport BIG_ENDIAN 194bedea94SChris Zankel 20e7d163f7SChris Zankelsubdir-y := lib 21e7d163f7SChris Zankel 224bedea94SChris Zankel# Subdirs for the boot loader(s) 234bedea94SChris Zankel 249a736fcbSMax Filippovboot-$(CONFIG_XTENSA_PLATFORM_ISS) += Image 259a736fcbSMax Filippovboot-$(CONFIG_XTENSA_PLATFORM_XT2000) += Image zImage uImage 269a736fcbSMax Filippovboot-$(CONFIG_XTENSA_PLATFORM_XTFPGA) += Image zImage uImage 274bedea94SChris Zankel 289a736fcbSMax Filippovall: $(boot-y) 299a736fcbSMax FilippovImage: boot-elf 309a736fcbSMax FilippovzImage: boot-redboot 319a736fcbSMax FilippovuImage: $(obj)/uImage 324bedea94SChris Zankel 33*d6c6ab93SMasahiro Yamadaboot-elf boot-redboot: $(addprefix $(obj)/,$(subdir-y)) 344bedea94SChris Zankel $(Q)$(MAKE) $(build)=$(obj)/$@ $(MAKECMDGOALS) 354bedea94SChris Zankel 363f5ec298SMax FilippovOBJCOPYFLAGS = --strip-all -R .comment -R .note.gnu.build-id -O binary 373f5ec298SMax Filippov 383f5ec298SMax Filippovvmlinux.bin: vmlinux FORCE 393f5ec298SMax Filippov $(call if_changed,objcopy) 403f5ec298SMax Filippov 413f5ec298SMax Filippovvmlinux.bin.gz: vmlinux.bin FORCE 423f5ec298SMax Filippov $(call if_changed,gzip) 433f5ec298SMax Filippov 443f5ec298SMax Filippovboot-elf: vmlinux.bin 453f5ec298SMax Filippovboot-redboot: vmlinux.bin.gz 469a736fcbSMax Filippov 479a736fcbSMax FilippovUIMAGE_LOADADDR = $(CONFIG_KERNEL_LOAD_ADDRESS) 489a736fcbSMax FilippovUIMAGE_COMPRESSION = gzip 499a736fcbSMax Filippov 509a736fcbSMax Filippov$(obj)/uImage: vmlinux.bin.gz FORCE 519a736fcbSMax Filippov $(call if_changed,uimage) 529a736fcbSMax Filippov $(Q)$(kecho) ' Kernel: $@ is ready' 53