xtensa: add uImage and xipImage to targets
[sfrench/cifs-2.6.git] / arch / xtensa / boot / Makefile
1 #
2 # arch/xtensa/boot/Makefile
3 #
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.
7 #
8 #
9
10
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
14
15 BIG_ENDIAN      := $(shell echo __XTENSA_EB__ | $(CC) -E - | grep -v "\#")
16
17 export BIG_ENDIAN
18
19 subdir-y        := lib
20 targets         += vmlinux.bin vmlinux.bin.gz
21 targets         += uImage xipImage
22
23 # Subdirs for the boot loader(s)
24
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
28
29 all: $(boot-y)
30 Image: boot-elf
31 zImage: boot-redboot
32 uImage: $(obj)/uImage
33 xipImage: $(obj)/xipImage
34
35 boot-elf boot-redboot: $(addprefix $(obj)/,$(subdir-y))
36         $(Q)$(MAKE) $(build)=$(obj)/$@ $(MAKECMDGOALS)
37
38 OBJCOPYFLAGS = --strip-all -R .comment -R .notes -O binary
39
40 $(obj)/vmlinux.bin: vmlinux FORCE
41         $(call if_changed,objcopy)
42
43 $(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE
44         $(call if_changed,gzip)
45
46 boot-elf: $(obj)/vmlinux.bin
47 boot-redboot: $(obj)/vmlinux.bin.gz
48
49 UIMAGE_LOADADDR = $(CONFIG_KERNEL_LOAD_ADDRESS)
50 UIMAGE_COMPRESSION = gzip
51
52 $(obj)/uImage: $(obj)/vmlinux.bin.gz FORCE
53         $(call if_changed,uimage)
54         $(Q)$(kecho) '  Kernel: $@ is ready'
55
56 $(obj)/xipImage: vmlinux FORCE
57         $(call if_changed,objcopy)
58         $(Q)$(kecho) '  Kernel: $@ is ready'