At present both SPL and TPL use the same devicetree binary. While there is logic to run fdtgrep separately on each one, it does not actually happen.
Add a new TPL rule and use that instead. Make this rule conditional on there actually being a TPL. Do the same for SPL for consistency. Note that the SPL and TPL dtbs are build by a Makefule rule used for U-Boot proper. This is the 'dtbs' target in dts/Makefile. So the check for CONFIG_TPL_BUILD in cmd_fdtgrep never actually works at present. We don't support CONFIG_OF_EMBED for TPL at present. Signed-off-by: Simon Glass <s...@chromium.org> --- (no changes since v1) dts/Makefile | 11 ++++++++--- scripts/Makefile.spl | 4 +++- 2 files changed, 11 insertions(+), 4 deletions(-) Applied to u-boot-dm/next, thanks!