Commit be462bd9 authored by Masahiro Yamada's avatar Masahiro Yamada Committed by Paul Burton

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: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
Patchwork: https://patchwork.linux-mips.org/patch/19095/Signed-off-by: default avatarPaul Burton <paul.burton@mips.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: linux-kernel@vger.kernel.org
parent 92b34a97
...@@ -105,17 +105,11 @@ $(obj)/uImage: $(obj)/uImage.$(suffix-y) ...@@ -105,17 +105,11 @@ $(obj)/uImage: $(obj)/uImage.$(suffix-y)
# Flattened Image Tree (.itb) images # Flattened Image Tree (.itb) images
# #
targets += vmlinux.itb
targets += vmlinux.gz.itb
targets += vmlinux.bz2.itb
targets += vmlinux.lzma.itb
targets += vmlinux.lzo.itb
ifeq ($(ADDR_BITS),32) ifeq ($(ADDR_BITS),32)
itb_addr_cells = 1 itb_addr_cells = 1
endif endif
ifeq ($(ADDR_BITS),64) ifeq ($(ADDR_BITS),64)
itb_addr_cells = 2 itb_addr_cells = 2
endif endif
targets += vmlinux.its.S targets += vmlinux.its.S
...@@ -157,6 +151,12 @@ $(obj)/vmlinux.lzma.its: $(obj)/vmlinux.its.S $(VMLINUX) FORCE ...@@ -157,6 +151,12 @@ $(obj)/vmlinux.lzma.its: $(obj)/vmlinux.its.S $(VMLINUX) FORCE
$(obj)/vmlinux.lzo.its: $(obj)/vmlinux.its.S $(VMLINUX) FORCE $(obj)/vmlinux.lzo.its: $(obj)/vmlinux.its.S $(VMLINUX) FORCE
$(call if_changed,cpp_its_S,lzo,vmlinux.bin.lzo) $(call if_changed,cpp_its_S,lzo,vmlinux.bin.lzo)
targets += vmlinux.itb
targets += vmlinux.gz.itb
targets += vmlinux.bz2.itb
targets += vmlinux.lzma.itb
targets += vmlinux.lzo.itb
quiet_cmd_itb-image = ITB $@ quiet_cmd_itb-image = ITB $@
cmd_itb-image = \ cmd_itb-image = \
env PATH="$(objtree)/scripts/dtc:$(PATH)" \ env PATH="$(objtree)/scripts/dtc:$(PATH)" \
...@@ -169,14 +169,5 @@ quiet_cmd_itb-image = ITB $@ ...@@ -169,14 +169,5 @@ quiet_cmd_itb-image = ITB $@
$(obj)/vmlinux.itb: $(obj)/vmlinux.its $(obj)/vmlinux.bin FORCE $(obj)/vmlinux.itb: $(obj)/vmlinux.its $(obj)/vmlinux.bin FORCE
$(call if_changed,itb-image,$<) $(call if_changed,itb-image,$<)
$(obj)/vmlinux.gz.itb: $(obj)/vmlinux.gz.its $(obj)/vmlinux.bin.gz FORCE $(obj)/vmlinux.%.itb: $(obj)/vmlinux.%.its $(obj)/vmlinux.bin.% FORCE
$(call if_changed,itb-image,$<)
$(obj)/vmlinux.bz2.itb: $(obj)/vmlinux.bz2.its $(obj)/vmlinux.bin.bz2 FORCE
$(call if_changed,itb-image,$<)
$(obj)/vmlinux.lzma.itb: $(obj)/vmlinux.lzma.its $(obj)/vmlinux.bin.lzma FORCE
$(call if_changed,itb-image,$<)
$(obj)/vmlinux.lzo.itb: $(obj)/vmlinux.lzo.its $(obj)/vmlinux.bin.lzo FORCE
$(call if_changed,itb-image,$<) $(call if_changed,itb-image,$<)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment