2005-06-23 23:01:12 -06:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
#
|
|
|
|
#
|
|
|
|
|
|
|
|
|
2007-10-20 02:58:03 -06:00
|
|
|
# KBUILD_CFLAGS used when building rest of boot (takes effect recursively)
|
|
|
|
KBUILD_CFLAGS += -fno-builtin -Iarch/$(ARCH)/boot/include
|
2005-06-23 23:01:12 -06:00
|
|
|
HOSTFLAGS += -Iarch/$(ARCH)/boot/include
|
|
|
|
|
2013-08-22 08:09:47 -06:00
|
|
|
BIG_ENDIAN := $(shell echo __XTENSA_EB__ | $(CC) -E - | grep -v "\#")
|
2005-06-23 23:01:12 -06:00
|
|
|
|
2011-01-14 07:12:34 -07:00
|
|
|
export ccflags-y
|
2005-06-23 23:01:12 -06:00
|
|
|
export BIG_ENDIAN
|
|
|
|
|
2005-06-30 03:58:59 -06:00
|
|
|
subdir-y := lib
|
|
|
|
|
2005-06-23 23:01:12 -06:00
|
|
|
# Subdirs for the boot loader(s)
|
|
|
|
|
2016-12-25 05:58:57 -07:00
|
|
|
boot-$(CONFIG_XTENSA_PLATFORM_ISS) += Image
|
|
|
|
boot-$(CONFIG_XTENSA_PLATFORM_XT2000) += Image zImage uImage
|
|
|
|
boot-$(CONFIG_XTENSA_PLATFORM_XTFPGA) += Image zImage uImage
|
2005-06-23 23:01:12 -06:00
|
|
|
|
2016-12-25 05:58:57 -07:00
|
|
|
all: $(boot-y)
|
|
|
|
Image: boot-elf
|
|
|
|
zImage: boot-redboot
|
|
|
|
uImage: $(obj)/uImage
|
2005-06-23 23:01:12 -06:00
|
|
|
|
2018-08-08 23:19:31 -06:00
|
|
|
boot-elf boot-redboot: $(addprefix $(obj)/,$(subdir-y))
|
2005-06-23 23:01:12 -06:00
|
|
|
$(Q)$(MAKE) $(build)=$(obj)/$@ $(MAKECMDGOALS)
|
|
|
|
|
2018-10-29 19:30:13 -06:00
|
|
|
OBJCOPYFLAGS = --strip-all -R .comment -R .notes -O binary
|
2012-11-04 22:10:00 -07:00
|
|
|
|
|
|
|
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
|
2016-12-25 05:58:57 -07:00
|
|
|
|
|
|
|
UIMAGE_LOADADDR = $(CONFIG_KERNEL_LOAD_ADDRESS)
|
|
|
|
UIMAGE_COMPRESSION = gzip
|
|
|
|
|
|
|
|
$(obj)/uImage: vmlinux.bin.gz FORCE
|
|
|
|
$(call if_changed,uimage)
|
|
|
|
$(Q)$(kecho) ' Kernel: $@ is ready'
|