Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

MIPS: boot: merge build rules of vmlinux.*.itb by using pattern rule

Merge the build rule of vmlinux.{gz,bz2,lzma,lzo}.itb, and also move
'targets' close to the related code.

[paul.burton@mips.com:
- Remove leading tabs from assignments to itb_addr_cells, since after
this patch moves the additions to the 'targets' variable the
assignments to itb_addr_cells wound up being treated as part of the
uImage rule above them, causing the .its to incorrectly be generated
with empty ADDR_CELLS.]

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Patchwork: https://patchwork.linux-mips.org/patch/19095/
Signed-off-by: Paul Burton <paul.burton@mips.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: linux-kernel@vger.kernel.org

authored by

Masahiro Yamada and committed by
Paul Burton
be462bd9 92b34a97

+9 -18
+9 -18
arch/mips/boot/Makefile
··· 105 105 # Flattened Image Tree (.itb) images 106 106 # 107 107 108 - targets += vmlinux.itb 109 - targets += vmlinux.gz.itb 110 - targets += vmlinux.bz2.itb 111 - targets += vmlinux.lzma.itb 112 - targets += vmlinux.lzo.itb 113 - 114 108 ifeq ($(ADDR_BITS),32) 115 - itb_addr_cells = 1 109 + itb_addr_cells = 1 116 110 endif 117 111 ifeq ($(ADDR_BITS),64) 118 - itb_addr_cells = 2 112 + itb_addr_cells = 2 119 113 endif 120 114 121 115 targets += vmlinux.its.S ··· 151 157 $(obj)/vmlinux.lzo.its: $(obj)/vmlinux.its.S $(VMLINUX) FORCE 152 158 $(call if_changed,cpp_its_S,lzo,vmlinux.bin.lzo) 153 159 160 + targets += vmlinux.itb 161 + targets += vmlinux.gz.itb 162 + targets += vmlinux.bz2.itb 163 + targets += vmlinux.lzma.itb 164 + targets += vmlinux.lzo.itb 165 + 154 166 quiet_cmd_itb-image = ITB $@ 155 167 cmd_itb-image = \ 156 168 env PATH="$(objtree)/scripts/dtc:$(PATH)" \ ··· 169 169 $(obj)/vmlinux.itb: $(obj)/vmlinux.its $(obj)/vmlinux.bin FORCE 170 170 $(call if_changed,itb-image,$<) 171 171 172 - $(obj)/vmlinux.gz.itb: $(obj)/vmlinux.gz.its $(obj)/vmlinux.bin.gz FORCE 173 - $(call if_changed,itb-image,$<) 174 - 175 - $(obj)/vmlinux.bz2.itb: $(obj)/vmlinux.bz2.its $(obj)/vmlinux.bin.bz2 FORCE 176 - $(call if_changed,itb-image,$<) 177 - 178 - $(obj)/vmlinux.lzma.itb: $(obj)/vmlinux.lzma.its $(obj)/vmlinux.bin.lzma FORCE 179 - $(call if_changed,itb-image,$<) 180 - 181 - $(obj)/vmlinux.lzo.itb: $(obj)/vmlinux.lzo.its $(obj)/vmlinux.bin.lzo FORCE 172 + $(obj)/vmlinux.%.itb: $(obj)/vmlinux.%.its $(obj)/vmlinux.bin.% FORCE 182 173 $(call if_changed,itb-image,$<)