[PATCH 1/4] build: Respect CONFIG_SPL_BUILD in DT sources
Tom Rini
trini at konsulko.com
Fri Apr 25 16:17:41 CEST 2025
On Fri, Apr 25, 2025 at 10:52:17AM -0300, Fabio Estevam wrote:
> From: Marek Vasut <marex at denx.de>
>
> 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 at denx.de>
> Signed-off-by: Fabio Estevam <festevam at denx.de>
> ---
> dts/Makefile | 5 ++++-
> scripts/Makefile.lib | 11 +++++++++++
> scripts/Makefile.xpl | 7 ++++++-
> 3 files changed, 21 insertions(+), 2 deletions(-)
There's already a thread here:
https://lore.kernel.org/u-boot/20250305183544.40525-1-hd@os-cillation.de/
saying that we shouldn't be doing what this patch adds.
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20250425/ae3d9fc4/attachment.sig>
More information about the U-Boot
mailing list