[v2,37/49] mediatek: Makefile: Drop explicit targets built by binman

Message ID 20200613205717.v2.37.Idd70f441bfba3eafb9a227907177e529323b0731@changeid
State New
Headers show
Series
  • rockchip: x86: Support building ROM files automatically with binman
Related show

Commit Message

Simon Glass June 14, 2020, 2:57 a.m.
On mediatek various files that need to be created by binman. It does not
make sense to enumerate these in the Makefile. They are described in the
configuration (devicetree) for each board and we can simply run binman
(always) to generate them.

This avoid sprinkling the Makefile with arch-specific code.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

(no changes since v1)

 Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Bin Meng June 29, 2020, 7:45 a.m. | #1
On Sun, Jun 14, 2020 at 10:58 AM Simon Glass <sjg at chromium.org> wrote:
>
> On mediatek various files that need to be created by binman. It does not
> make sense to enumerate these in the Makefile. They are described in the
> configuration (devicetree) for each board and we can simply run binman
> (always) to generate them.
>
> This avoid sprinkling the Makefile with arch-specific code.
>
> Signed-off-by: Simon Glass <sjg at chromium.org>
> ---
>
> (no changes since v1)
>
>  Makefile | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>

Reviewed-by: Bin Meng <bmeng.cn at gmail.com>

Patch

diff --git a/Makefile b/Makefile
index 19c6ca53f7..96ab26a638 100644
--- a/Makefile
+++ b/Makefile
@@ -921,7 +921,10 @@  ifeq ($(CONFIG_ARCH_SUNXI)$(CONFIG_ARM64)$(CONFIG_SPL),yyy)
 INPUTS-y += u-boot-sunxi-with-spl.bin
 endif
 
+# Generate this input file for binman
+ifeq ($(CONFIG_SPL),)
 INPUTS-$(CONFIG_ARCH_MEDIATEK) += u-boot-mtk.bin
+endif
 
 # Add optional build target if defined in board/cpu/soc headers
 ifneq ($(CONFIG_BUILD_TARGET),)
@@ -1684,9 +1687,6 @@  u-boot-elf.lds: arch/u-boot-elf.lds prepare FORCE
 
 ifeq ($(CONFIG_SPL),y)
 spl/u-boot-spl-mtk.bin: spl/u-boot-spl
-
-u-boot-mtk.bin: u-boot.dtb u-boot.img spl/u-boot-spl-mtk.bin FORCE
-	$(call if_changed,binman)
 else
 MKIMAGEFLAGS_u-boot-mtk.bin = -T mtk_image \
 	-a $(CONFIG_SYS_TEXT_BASE) -e $(CONFIG_SYS_TEXT_BASE) \