
Hi Marek,
On Thu, 21 Nov 2024 at 18:59, Marek Vasut marex@denx.de wrote:
Currently the U-Boot SPL build uses the same DTBs that were generated during U-Boot proper build, and calls 'fdtgrep' on those DTBs to filter out uninteresting nodes and properties. Those U-Boot proper DTBs are built from DTS which are first preprocessed by CPP, but that CPP is invoked in U-Boot proper build context and effectively ignores the CONFIG_SPL_BUILD macro. In case the CONFIG_SPL_BUILD macro is used in any .dts file, the content of the macro is removed by CPP.
Fix this by building a separate set of DTBs for the SPL, which are preprocessed by CPP with -DCONFIG_SPL_BUILD set. Use the same way for the other PLs.
Signed-off-by: Marek Vasut marex@denx.de
Cc: "NXP i.MX U-Boot Team" uboot-imx@nxp.com Cc: Bryan Brattlof bb@ti.com Cc: Fabio Estevam festevam@gmail.com Cc: Greg Malysa greg.malysa@timesys.com Cc: Ian Roberts ian.roberts@timesys.com Cc: Ilias Apalodimas ilias.apalodimas@linaro.org Cc: Jonathan Humphreys j-humphreys@ti.com Cc: Masahisa Kojima kojima.masahisa@socionext.com Cc: Nathan Barrett-Morrison nathan.morrison@timesys.com Cc: Rasmus Villemoes rasmus.villemoes@prevas.dk Cc: Simon Glass sjg@chromium.org Cc: Stefano Babic sbabic@denx.de Cc: Sumit Garg sumit.garg@linaro.org Cc: Tim Harvey tharvey@gateworks.com Cc: Tom Rini trini@konsulko.com Cc: u-boot@lists.denx.de
NOTE: For v2025.04
dts/Makefile | 5 ++++- scripts/Makefile.lib | 11 +++++++++++ scripts/Makefile.xpl | 7 ++++++- 3 files changed, 21 insertions(+), 2 deletions(-)
As mentioned on the other patch, this should be handled in fdtgrep
Regards, Simon