Merge tag 'sched-urgent-2020-12-27' of git://git.kernel.org/pub/scm/linux/kernel...
[linux/fpc-iii.git] / arch / xtensa / boot / Makefile
blobf6bb352f94b43c35056cb7582e05bda8b97270d2
2 # arch/xtensa/boot/Makefile
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.
11 # KBUILD_CFLAGS used when building rest of boot (takes effect recursively)
12 KBUILD_CFLAGS += -fno-builtin -Iarch/$(ARCH)/boot/include
13 HOSTFLAGS += -Iarch/$(ARCH)/boot/include
15 BIG_ENDIAN := $(shell echo __XTENSA_EB__ | $(CC) -E - | grep -v "\#")
17 export BIG_ENDIAN
19 subdir-y := lib
20 targets += vmlinux.bin vmlinux.bin.gz
21 targets += uImage xipImage
23 # Subdirs for the boot loader(s)
25 boot-$(CONFIG_XTENSA_PLATFORM_ISS) += Image
26 boot-$(CONFIG_XTENSA_PLATFORM_XT2000) += Image zImage uImage
27 boot-$(CONFIG_XTENSA_PLATFORM_XTFPGA) += Image zImage uImage
29 all: $(boot-y)
30 Image: boot-elf
31 zImage: boot-redboot
32 uImage: $(obj)/uImage
33 xipImage: $(obj)/xipImage
35 boot-elf boot-redboot: $(addprefix $(obj)/,$(subdir-y))
36 $(Q)$(MAKE) $(build)=$(obj)/$@ $(MAKECMDGOALS)
38 OBJCOPYFLAGS = --strip-all -R .comment -R .notes -O binary
40 $(obj)/vmlinux.bin: vmlinux FORCE
41 $(call if_changed,objcopy)
43 $(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE
44 $(call if_changed,gzip)
46 boot-elf: $(obj)/vmlinux.bin
47 boot-redboot: $(obj)/vmlinux.bin.gz
49 UIMAGE_LOADADDR = $(CONFIG_KERNEL_LOAD_ADDRESS)
50 UIMAGE_COMPRESSION = gzip
52 $(obj)/uImage: $(obj)/vmlinux.bin.gz FORCE
53 $(call if_changed,uimage)
54 $(Q)$(kecho) ' Kernel: $@ is ready'
56 $(obj)/xipImage: vmlinux FORCE
57 $(call if_changed,objcopy)
58 $(Q)$(kecho) ' Kernel: $@ is ready'