2005-06-24 13:01:12 +08: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 16:58:03 +08:00
|
|
|
# KBUILD_CFLAGS used when building rest of boot (takes effect recursively)
|
|
|
|
KBUILD_CFLAGS += -fno-builtin -Iarch/$(ARCH)/boot/include
|
2005-06-24 13:01:12 +08:00
|
|
|
HOSTFLAGS += -Iarch/$(ARCH)/boot/include
|
|
|
|
|
2005-06-30 17:58:59 +08:00
|
|
|
subdir-y := lib
|
2020-07-22 13:20:19 +08:00
|
|
|
targets += vmlinux.bin vmlinux.bin.gz
|
2020-07-22 13:26:27 +08:00
|
|
|
targets += uImage xipImage
|
2005-06-30 17:58:59 +08:00
|
|
|
|
2005-06-24 13:01:12 +08:00
|
|
|
# Subdirs for the boot loader(s)
|
|
|
|
|
2016-12-25 20:58:57 +08: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-24 13:01:12 +08:00
|
|
|
|
2016-12-25 20:58:57 +08:00
|
|
|
all: $(boot-y)
|
|
|
|
Image: boot-elf
|
|
|
|
zImage: boot-redboot
|
|
|
|
uImage: $(obj)/uImage
|
2017-01-04 09:57:51 +08:00
|
|
|
xipImage: $(obj)/xipImage
|
2005-06-24 13:01:12 +08:00
|
|
|
|
2018-08-09 13:19:31 +08:00
|
|
|
boot-elf boot-redboot: $(addprefix $(obj)/,$(subdir-y))
|
2005-06-24 13:01:12 +08:00
|
|
|
$(Q)$(MAKE) $(build)=$(obj)/$@ $(MAKECMDGOALS)
|
|
|
|
|
2018-10-30 09:30:13 +08:00
|
|
|
OBJCOPYFLAGS = --strip-all -R .comment -R .notes -O binary
|
2012-11-05 13:10:00 +08:00
|
|
|
|
2020-07-22 13:20:19 +08:00
|
|
|
$(obj)/vmlinux.bin: vmlinux FORCE
|
2012-11-05 13:10:00 +08:00
|
|
|
$(call if_changed,objcopy)
|
|
|
|
|
2020-07-22 13:20:19 +08:00
|
|
|
$(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE
|
2012-11-05 13:10:00 +08:00
|
|
|
$(call if_changed,gzip)
|
|
|
|
|
2020-07-22 13:20:19 +08:00
|
|
|
boot-elf: $(obj)/vmlinux.bin
|
|
|
|
boot-redboot: $(obj)/vmlinux.bin.gz
|
2016-12-25 20:58:57 +08:00
|
|
|
|
|
|
|
UIMAGE_LOADADDR = $(CONFIG_KERNEL_LOAD_ADDRESS)
|
|
|
|
UIMAGE_COMPRESSION = gzip
|
|
|
|
|
2020-07-22 13:20:19 +08:00
|
|
|
$(obj)/uImage: $(obj)/vmlinux.bin.gz FORCE
|
2016-12-25 20:58:57 +08:00
|
|
|
$(call if_changed,uimage)
|
|
|
|
$(Q)$(kecho) ' Kernel: $@ is ready'
|
2017-01-04 09:57:51 +08:00
|
|
|
|
|
|
|
$(obj)/xipImage: vmlinux FORCE
|
|
|
|
$(call if_changed,objcopy)
|
|
|
|
$(Q)$(kecho) ' Kernel: $@ is ready'
|