aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2023-12-19 07:21:25 -0700
committerSimon Glass <sjg@chromium.org>2023-12-31 07:21:02 -0700
commitaca95282c1b72c41d8e72984b1dceb15f396b2f8 (patch)
tree1f369e52d1e8e4eeb9a92bc1036762ae40bbbf75 /scripts
parent7a06cc2027c0169c462da63a68fa269c0d59a950 (diff)
downloadu-boot-aca95282c1b72c41d8e72984b1dceb15f396b2f8.zip
u-boot-aca95282c1b72c41d8e72984b1dceb15f396b2f8.tar.gz
u-boot-aca95282c1b72c41d8e72984b1dceb15f396b2f8.tar.bz2
Makefile: Use the fdtgrep -u flag
Use this flag so that the bootph binding is obeyed correctly. Add a comment about what is going on. Signed-off-by: Simon Glass <sjg@chromium.org> Fixes: https://source.denx.de/u-boot/custodians/u-boot-dm/-/issues/12 Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/Makefile.lib13
1 files changed, 12 insertions, 1 deletions
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 16bbc27..1ca8419 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -635,8 +635,19 @@ else
fdtgrep_props := -b bootph-all -b bootph-pre-ram $(migrate_spl)
endif
endif
+
+# This rule produces the .dtb for an SPL build.
+#
+# The first fdtgrep keeps nodes with the above properties (with -u ensuring that
+# the properties are implied in all parents of a matching node). The root node
+# is always included, along with /chosen and /config nodes. Referenced aliases
+# (i.e. properties in /aliases which point to an incldued node) are also
+# included.
+#
+# The second fdtgrep removes all bootph properties along with unused strings
+# and any properties in CONFIG_OF_SPL_REMOVE_PROPS
quiet_cmd_fdtgrep = FDTGREP $@
- cmd_fdtgrep = $(objtree)/tools/fdtgrep $(fdtgrep_props) -RT $< \
+ cmd_fdtgrep = $(objtree)/tools/fdtgrep $(fdtgrep_props) -u -RT $< \
-n /chosen -n /config -O dtb | \
$(objtree)/tools/fdtgrep -r -O dtb - -o $@ \
-P bootph-all -P bootph-pre-ram -P bootph-pre-sram \