diff mbox series

[v2,42/49] Makefile: Warn against using CONFIG_SPL_FIT_GENERATOR

Message ID 20200613205717.v2.42.I2428dcb9b077364f9517f2c291db63b6bac1e992@changeid
State Accepted
Commit f4a43d292527ac671dee616ac973899d90a43401
Headers show
Series rockchip: x86: Support building ROM files automatically with binman | expand

Commit Message

Simon Glass June 14, 2020, 2:57 a.m. UTC
This option is used to run arch-specific shell scripts which produce .its
files which are used to produce FIT images. We already have binman which
is designed to produce firmware images. It is more powerful and has tests.

So this option should be deprecated and not used. Existing uses should be
migrated.

Mentions of this in code reviews over the last year or so do not seem to
have resulted in action, and things are getting worse.

So let's add a warning.

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

(no changes since v1)

 Makefile | 9 +++++++++
 1 file changed, 9 insertions(+)

Comments

Bin Meng June 29, 2020, 8:01 a.m. UTC | #1
On Sun, Jun 14, 2020 at 10:58 AM Simon Glass <sjg at chromium.org> wrote:
>
> This option is used to run arch-specific shell scripts which produce .its
> files which are used to produce FIT images. We already have binman which
> is designed to produce firmware images. It is more powerful and has tests.
>
> So this option should be deprecated and not used. Existing uses should be
> migrated.
>
> Mentions of this in code reviews over the last year or so do not seem to
> have resulted in action, and things are getting worse.
>
> So let's add a warning.
>
> Signed-off-by: Simon Glass <sjg at chromium.org>
> ---
>
> (no changes since v1)
>
>  Makefile | 9 +++++++++
>  1 file changed, 9 insertions(+)
>

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

Patch

diff --git a/Makefile b/Makefile
index f3c19195b4..98172a40d8 100644
--- a/Makefile
+++ b/Makefile
@@ -1143,6 +1143,13 @@  ifneq ($(CONFIG_DM_ETH),y)
 	@echo >&2 "See doc/driver-model/migration.rst for more info."
 	@echo >&2 "===================================================="
 endif
+endif
+ifneq ($(CONFIG_SPL_FIT_GENERATOR),)
+	@echo >&2 "===================== WARNING ======================"
+	@echo >&2 "This board uses CONFIG_SPL_FIT_GENERATOR. Please migrate"
+	@echo >&2 "to binman instead, to avoid the proliferation of"
+	@echo >&2 "arch-specific scripts with no tests."
+	@echo >&2 "===================================================="
 endif
 	@# Check that this build does not use CONFIG options that we do not
 	@# know about unless they are in Kconfig. All the existing CONFIG
@@ -1340,6 +1347,8 @@  endif
 
 # Boards with more complex image requirements can provide an .its source file
 # or a generator script
+# NOTE: Please do not use this. We are migrating away from Makefile rules to use
+# binman instead.
 ifneq ($(CONFIG_SPL_FIT_SOURCE),"")
 U_BOOT_ITS := u-boot.its
 $(U_BOOT_ITS): $(subst ",,$(CONFIG_SPL_FIT_SOURCE))