[PATCH v2 10/10] 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 ---
Changes in v2: - Add a comment about the fdtgrep operations
scripts/Makefile.lib | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 16bbc277a9f1..1ca84195c997 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 \

On Tue, Dec 19, 2023 at 07:21:25AM -0700, Simon Glass wrote:
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

On Tue, Dec 19, 2023 at 07:21:25AM -0700, Simon Glass wrote:
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
participants (2)
-
Simon Glass
-
Tom Rini