All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: U-Boot Mailing List <u-boot@lists.denx.de>
Cc: Tom Rini <trini@konsulko.com>, Simon Glass <sjg@chromium.org>,
	Jerry Van Baren <vanbaren@cideas.com>
Subject: [PATCH 07/12] fdt: Update Makefile rules with the new OF_REAL Kconfig
Date: Sat,  7 Aug 2021 07:24:07 -0600	[thread overview]
Message-ID: <20210807132413.3513724-8-sjg@chromium.org> (raw)
In-Reply-To: <20210807132413.3513724-1-sjg@chromium.org>

Simplify some of the Makefile rules using this Kconfig.

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

 Makefile             | 7 ++-----
 lib/Makefile         | 5 +----
 scripts/Makefile.spl | 9 +++------
 3 files changed, 6 insertions(+), 15 deletions(-)

diff --git a/Makefile b/Makefile
index 269e353a28a..378eaccbc12 100644
--- a/Makefile
+++ b/Makefile
@@ -1304,10 +1304,6 @@ u-boot.ldr:	u-boot
 # Use 'make BINMAN_VERBOSE=3' to set vebosity level
 default_dt := $(if $(DEVICE_TREE),$(DEVICE_TREE),$(CONFIG_DEFAULT_DEVICE_TREE))
 
-# Tell binman whether we have a devicetree for SPL and TPL
-have_spl_dt := $(if $(CONFIG_SPL_OF_PLATDATA),,$(CONFIG_SPL_OF_CONTROL))
-have_tpl_dt := $(if $(CONFIG_TPL_OF_PLATDATA),,$(CONFIG_TPL_OF_CONTROL))
-
 quiet_cmd_binman = BINMAN  $@
 cmd_binman = $(srctree)/tools/binman/binman $(if $(BINMAN_DEBUG),-D) \
                 --toolpath $(objtree)/tools \
@@ -1321,7 +1317,8 @@ cmd_binman = $(srctree)/tools/binman/binman $(if $(BINMAN_DEBUG),-D) \
 		-a scp-path=$(SCP) \
 		-a spl-bss-pad=$(if $(CONFIG_SPL_SEPARATE_BSS),,1) \
 		-a tpl-bss-pad=$(if $(CONFIG_TPL_SEPARATE_BSS),,1) \
-		-a spl-dtb=$(have_spl_dt) -a tpl-dtb=$(have_tpl_dt) \
+		-a spl-dtb=$(CONFIG_SPL_OF_REAL) \
+		-a tpl-dtb=$(CONFIG_SPL_OF_REAL) \
 		$(BINMAN_$(@F))
 
 OBJCOPYFLAGS_u-boot.ldr.hex := -I binary -O ihex
diff --git a/lib/Makefile b/lib/Makefile
index 07c2ccd7cfd..ecb32ae1057 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -79,10 +79,7 @@ obj-$(CONFIG_$(SPL_)LIB_RATIONAL) += rational.o
 obj-$(CONFIG_LIBAVB) += libavb/
 
 obj-$(CONFIG_$(SPL_TPL_)OF_LIBFDT) += libfdt/
-ifneq ($(CONFIG_$(SPL_TPL_)BUILD)$(CONFIG_$(SPL_TPL_)OF_PLATDATA),yy)
-obj-$(CONFIG_$(SPL_TPL_)OF_CONTROL) += fdtdec_common.o
-obj-$(CONFIG_$(SPL_TPL_)OF_CONTROL) += fdtdec.o
-endif
+obj-$(CONFIG_$(SPL_TPL_)OF_REAL) += fdtdec_common.o fdtdec.o
 
 ifdef CONFIG_SPL_BUILD
 obj-$(CONFIG_SPL_YMODEM_SUPPORT) += crc16.o
diff --git a/scripts/Makefile.spl b/scripts/Makefile.spl
index 25a3e7fa52e..fb28b2b10f0 100644
--- a/scripts/Makefile.spl
+++ b/scripts/Makefile.spl
@@ -295,18 +295,15 @@ else
 FINAL_DTB_CONTAINER = $(obj)/$(SPL_BIN).multidtb.fit
 endif
 
-# Build the .dtb file if:
-#   - we are not using OF_PLATDATA
-#   - we are using OF_CONTROL
+# Build the .dtb file if needed
+#   - OF_REAL is enabled
 #   - we have either OF_SEPARATE or OF_HOSTFILE
 build_dtb :=
-ifeq ($(CONFIG_$(SPL_TPL_)OF_PLATDATA),)
-ifneq ($(CONFIG_$(SPL_TPL_)OF_CONTROL),)
+ifneq ($(CONFIG_$(SPL_TPL_)OF_REAL),)
 ifeq ($(CONFIG_OF_SEPARATE)$(CONFIG_OF_HOSTFILE),y)
 build_dtb := y
 endif
 endif
-endif
 
 ifneq ($(build_dtb),)
 $(obj)/$(SPL_BIN)-dtb.bin: $(obj)/$(SPL_BIN)-nodtb.bin \
-- 
2.32.0.605.g8dce9f2422-goog


  parent reply	other threads:[~2021-08-07 13:26 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-07 13:24 [PATCH 00/12] dm: Expand of-platdata support to GPIOs and clean up Simon Glass
2021-08-07 13:24 ` [PATCH 01/12] treewide: fdt: Move fdt_get_config_... to ofnode_conf_read Simon Glass
2021-08-07 13:24 ` [PATCH 02/12] fdt: Create a new OF_REAL Kconfig Simon Glass
2021-08-07 13:24 ` [PATCH 03/12] treewide: Simply conditions with the new OF_REAL Simon Glass
2021-08-07 13:24 ` [PATCH 04/12] treewide: Use OF_REAL instead of !OF_PLATDATA Simon Glass
2021-08-07 13:24 ` [PATCH 05/12] mmc: nds32: ftsdc010: Convert to livetree Simon Glass
     [not found]   ` <HK0PR03MB299419BC349724622E422920C1F69@HK0PR03MB2994.apcprd03.prod.outlook.com>
2021-08-09  2:42     ` Rick Chen
2021-08-12 22:22   ` Jaehoon Chung
2021-09-26 18:40   ` Simon Glass
2021-08-07 13:24 ` [PATCH 06/12] treewide: Try to avoid the preprocessor with OF_REAL Simon Glass
2021-08-07 13:24 ` Simon Glass [this message]
2021-08-07 13:24 ` [PATCH 08/12] dm: Add comments to dt-structs contents Simon Glass
2021-08-07 13:24 ` [PATCH 09/12] clk: Rename clk_get_by_driver_info() Simon Glass
2021-08-09 16:41   ` Sean Anderson
2021-09-26 18:40   ` Simon Glass
2021-08-07 13:24 ` [PATCH 10/12] dm: doc: Add a note about of-platdata header files Simon Glass
2021-08-07 13:24 ` [PATCH 11/12] irq: Tidy up of-platdata irq support Simon Glass
2021-08-07 13:24 ` [PATCH 12/12] dm: gpio: Add of-platdata support Simon Glass
2021-09-26 18:40 ` Simon Glass
2021-09-26 18:40 ` [PATCH 11/12] irq: Tidy up of-platdata irq support Simon Glass
2021-09-26 18:40 ` [PATCH 10/12] dm: doc: Add a note about of-platdata header files Simon Glass
2021-09-26 18:40 ` [PATCH 08/12] dm: Add comments to dt-structs contents Simon Glass
2021-09-26 18:40 ` [PATCH 06/12] treewide: Try to avoid the preprocessor with OF_REAL Simon Glass
2021-09-26 18:40 ` [PATCH 07/12] fdt: Update Makefile rules with the new OF_REAL Kconfig Simon Glass
2021-09-26 18:40 ` [PATCH 04/12] treewide: Use OF_REAL instead of !OF_PLATDATA Simon Glass
2021-09-26 18:40 ` [PATCH 03/12] treewide: Simply conditions with the new OF_REAL Simon Glass
2021-09-26 18:40 ` [PATCH 01/12] treewide: fdt: Move fdt_get_config_... to ofnode_conf_read Simon Glass
2021-09-26 18:40 ` [PATCH 02/12] fdt: Create a new OF_REAL Kconfig Simon Glass

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210807132413.3513724-8-sjg@chromium.org \
    --to=sjg@chromium.org \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    --cc=vanbaren@cideas.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.