]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
MIPS: Allow platform to specify multiple its.S files
authorPaul Burton <paul.burton@imgtec.com>
Mon, 7 Aug 2017 22:37:21 +0000 (15:37 -0700)
committerRalf Baechle <ralf@linux-mips.org>
Tue, 29 Aug 2017 13:21:52 +0000 (15:21 +0200)
In preparation for splitting arch/mips/generic/vmlinux.its.S into
multiple files such that it doesn't become a conflict magnet as boards
are added, allow platforms to specify a list of image tree source files
which will be concatenated to form the final source used to build the
image tree.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/16938/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/Makefile
arch/mips/boot/Makefile
arch/mips/generic/Platform

index d78d615cd395cfb4a245a097c2a202202c806bb4..38360f776b6f7470e67c9bf2d474a074e0124897 100644 (file)
@@ -290,7 +290,8 @@ KBUILD_CPPFLAGS += -DDATAOFFSET=$(if $(dataoffset-y),$(dataoffset-y),0)
 
 bootvars-y     = VMLINUX_LOAD_ADDRESS=$(load-y) \
                  VMLINUX_ENTRY_ADDRESS=$(entry-y) \
-                 PLATFORM="$(platform-y)"
+                 PLATFORM="$(platform-y)" \
+                 ITS_INPUTS="$(its-y)"
 ifdef CONFIG_32BIT
 bootvars-y     += ADDR_BITS=32
 endif
index 145b5ce8eb7e660dda67f6a53aa472f74a413af0..1bd5c4f00d19bd7ff4aee34789e0fbb371240a4d 100644 (file)
@@ -118,6 +118,12 @@ ifeq ($(ADDR_BITS),64)
        itb_addr_cells = 2
 endif
 
+quiet_cmd_its_cat = CAT     $@
+      cmd_its_cat = cat $^ >$@
+
+$(obj)/vmlinux.its.S: $(addprefix $(srctree)/arch/mips/$(PLATFORM)/,$(ITS_INPUTS))
+       $(call if_changed,its_cat)
+
 quiet_cmd_cpp_its_S = ITS     $@
       cmd_cpp_its_S = $(CPP) $(cpp_flags) -P -C -o $@ $< \
                        -DKERNEL_NAME="\"Linux $(KERNELRELEASE)\"" \
@@ -128,19 +134,19 @@ quiet_cmd_cpp_its_S = ITS     $@
                        -DADDR_BITS=$(ADDR_BITS) \
                        -DADDR_CELLS=$(itb_addr_cells)
 
-$(obj)/vmlinux.its: $(srctree)/arch/mips/$(PLATFORM)/vmlinux.its.S $(VMLINUX) FORCE
+$(obj)/vmlinux.its: $(obj)/vmlinux.its.S $(VMLINUX) FORCE
        $(call if_changed_dep,cpp_its_S,none,vmlinux.bin)
 
-$(obj)/vmlinux.gz.its: $(srctree)/arch/mips/$(PLATFORM)/vmlinux.its.S $(VMLINUX) FORCE
+$(obj)/vmlinux.gz.its: $(obj)/vmlinux.its.S $(VMLINUX) FORCE
        $(call if_changed_dep,cpp_its_S,gzip,vmlinux.bin.gz)
 
-$(obj)/vmlinux.bz2.its: $(srctree)/arch/mips/$(PLATFORM)/vmlinux.its.S $(VMLINUX)  FORCE
+$(obj)/vmlinux.bz2.its: $(obj)/vmlinux.its.S $(VMLINUX)  FORCE
        $(call if_changed_dep,cpp_its_S,bzip2,vmlinux.bin.bz2)
 
-$(obj)/vmlinux.lzma.its: $(srctree)/arch/mips/$(PLATFORM)/vmlinux.its.S $(VMLINUX) FORCE
+$(obj)/vmlinux.lzma.its: $(obj)/vmlinux.its.S $(VMLINUX) FORCE
        $(call if_changed_dep,cpp_its_S,lzma,vmlinux.bin.lzma)
 
-$(obj)/vmlinux.lzo.its: $(srctree)/arch/mips/$(PLATFORM)/vmlinux.its.S $(VMLINUX) FORCE
+$(obj)/vmlinux.lzo.its: $(obj)/vmlinux.its.S $(VMLINUX) FORCE
        $(call if_changed_dep,cpp_its_S,lzo,vmlinux.bin.lzo)
 
 quiet_cmd_itb-image = ITB     $@
index 9a30d69e22816e887c5080a69bdd0b8c918b86f3..6f7ce7b0c5e297b2d3e53bdde093831d13919634 100644 (file)
@@ -12,3 +12,5 @@ platform-$(CONFIG_MIPS_GENERIC)       += generic/
 cflags-$(CONFIG_MIPS_GENERIC)  += -I$(srctree)/arch/mips/include/asm/mach-generic
 load-$(CONFIG_MIPS_GENERIC)    += 0xffffffff80100000
 all-$(CONFIG_MIPS_GENERIC)     := vmlinux.gz.itb
+
+its-y                                  := vmlinux.its.S