Makefile 1.3 KB
Newer Older
1 2 3 4 5 6 7 8 9 10
#
# arch/xtensa/boot/Makefile
#
# This file is subject to the terms and conditions of the GNU General Public
# License.  See the file "COPYING" in the main directory of this archive
# for more details.
#
#


11 12
# KBUILD_CFLAGS used when building rest of boot (takes effect recursively)
KBUILD_CFLAGS	+= -fno-builtin -Iarch/$(ARCH)/boot/include
13 14
HOSTFLAGS	+= -Iarch/$(ARCH)/boot/include

15
BIG_ENDIAN	:= $(shell echo __XTENSA_EB__ | $(CC) -E - | grep -v "\#")
16

17
export ccflags-y
18 19
export BIG_ENDIAN

20 21
subdir-y	:= lib

22 23
# Subdirs for the boot loader(s)

24 25 26
boot-$(CONFIG_XTENSA_PLATFORM_ISS)    += Image
boot-$(CONFIG_XTENSA_PLATFORM_XT2000) += Image zImage uImage
boot-$(CONFIG_XTENSA_PLATFORM_XTFPGA) += Image zImage uImage
27

28 29 30 31
all: $(boot-y)
Image: boot-elf
zImage: boot-redboot
uImage: $(obj)/uImage
32

33
boot-elf boot-redboot: $(addprefix $(obj)/,$(subdir-y))
34 35
	$(Q)$(MAKE) $(build)=$(obj)/$@ $(MAKECMDGOALS)

36
OBJCOPYFLAGS = --strip-all -R .comment -R .notes -O binary
M
Max Filippov 已提交
37 38 39 40 41 42 43 44 45

vmlinux.bin: vmlinux FORCE
	$(call if_changed,objcopy)

vmlinux.bin.gz: vmlinux.bin FORCE
	$(call if_changed,gzip)

boot-elf: vmlinux.bin
boot-redboot: vmlinux.bin.gz
46 47 48 49 50 51 52

UIMAGE_LOADADDR = $(CONFIG_KERNEL_LOAD_ADDRESS)
UIMAGE_COMPRESSION = gzip

$(obj)/uImage: vmlinux.bin.gz FORCE
	$(call if_changed,uimage)
	$(Q)$(kecho) '  Kernel: $@ is ready'