[PATCH] scripts/Makefile.lib: also consider $(CONFIG_SYS_BOARD)-u-boot.dtsi
sjg at chromium.org
Sat Mar 18 21:20:23 CET 2023
On Fri, 17 Mar 2023 at 04:26, Rasmus Villemoes
<rasmus.villemoes at prevas.dk> wrote:
> I have a couple of boards, e.g. foo21, bar33, each with a few
> different revisions, so I have
> Now the necessary U-Boot specific additions for the foo21 boards
> doesn't depend on the revision (likely for bar33), so I just want to
> have and maintain one
> But currently I need to add dummy files foo21-revA-u-boot.dtsi and
> foo21-revB-u-boot.dtsi each just containing '#include
> foo21-u-boot.dtsi'. And similarly for bar33, and all those files
> become quite unwieldy as more revisions need to be supported.
> It's quite natural to look for a file named after CONFIG_SYS_BOARD,
> with lower precedence of course than a -u-boot.dtsi file with the same
> basename as the .dts, but higher than CONFIG_SYS_SOC.
> Signed-off-by: Rasmus Villemoes <rasmus.villemoes at prevas.dk>
> Of course, this can cause unwanted changes for existing boards. But a
> bit of ad hoc scripting shows that the risk is low: I first grabbed
> all 'default "foo"' stanzas of all 'config SYS_BOARD' instances, as
> well as all values of CONFIG_SYS_BOARD set in *_defconfig files. Then
> I made a list of all existing *-u-boot.dtsi files, and from these
> removed any where there is a corresponding .dts file. That leaves just
> and inspecting a few of those suggests that they set SYS_SOC to the
> same as SYS_BOARD, i.e. they were already picking up the .dtsi file
> due to the SYS_SOC rule.
> Now, the only way to be really sure is to build the world
> with/without this patch and check if any .dtb file changes, but I
> don't have the means to do that. But I do notice that
> doc/develop/devicetree/control.rst | 1 +
> scripts/Makefile.lib | 2 ++
> 2 files changed, 3 insertions(+)
Reviewed-by: Simon Glass <sjg at chromium.org>
There is something missing at the end of your note.
What U-Boot-specific things are you using?
More information about the U-Boot