[PATCH] tools: binman: fix changes not being written to source.dtb
Simon Glass
sjg at chromium.org
Thu Jul 9 21:14:17 CEST 2026
Hi Anshul,
On 2026-07-07T10:44:09, Anshul Dalal <anshuld at ti.com> wrote:
> tools: binman: fix changes not being written to source.dtb
>
> In the current setup the changes done to the dtb by binman such as
> bootph propagation are only made to the intermediary *.dtb.out but not
> the final dtb.
>
> This means the final dtb that's in *-binman.dtsi never gets the required
> changes applied. Therefore this patch fixes the behaviour by writing to
> the supplied dtb before exiting with a modified test to catch any future
> regressions.
>
> Signed-off-by: Anshul Dalal <anshuld at ti.com>
>
> tools/binman/control.py | 3 +++
> tools/binman/ftest.py | 41 ++++++++++++++++++++++-------------------
> 2 files changed, 25 insertions(+), 19 deletions(-)
Please can you spell out the concrete symptom? What breaks in a real
build when u-boot.dtb doesn't carry the bootph propagation - which
stage reads it, what does it expect to find, and what goes wrong when
it isn't there? The *-binman.dtsi reference is confusing since a .dtsi
is a source file, not something written to.
Also please rewrite in imperative present tense: 'Write the modified
dtb back to dtb_fname so that ...' rather than 'this patch fixes the
behaviour by ...'
> diff --git a/tools/binman/control.py b/tools/binman/control.py
> @@ -677,6 +677,9 @@ def PrepareImagesAndDtbs(dtb_fname, select_images, update_fdt, use_expanded, ind
> dtb_item.Sync(auto_resize=True)
> dtb_item.Pack()
> dtb_item.Flush()
> +
> + # Copy the intermediary dtb ('u-boot.dtb.out') to the dtb supplied to binman
> + tools.write_file(dtb_fname, dtb.GetContents())
This is updating an input file...really not keen on that! The updated
dtb should already be written into the final image created by Binman.
Regards,
Simon
More information about the U-Boot
mailing list