Re: [PATCH v3] Makefile: depend on OF_LIST dts sources for fit-dtb.blob

Simon Glass <[email protected]>
Newsgroups gmane.comp.boot-loaders.u-boot
Message-ID <CAFLszTj-zsJBXvCpqgqyQFOEQ=sOX0bOAyTiPX2H56sXnw5Rog@mail.gmail.com>
Hi Lianghong,

On 2026-07-23T01:40:21, Lianghong Liu <[email protected]> wrote:
> Makefile: depend on OF_LIST dts sources for fit-dtb.blob
>
> When CONFIG_MULTI_DTB_FIT is enabled, fit-dtb.blob is produced by
> mkimage with one "-b " argument for every entry in CONFIG_OF_LIST.
> The make rule, however, only listed dts/dt.dtb (i.e. the
> CONFIG_DEFAULT_DEVICE_TREE blob) as a prerequisite:
>
>   fit-dtb.blob: dts/dt.dtb FORCE
>       $(call if_changed,mkimage)
>
> Because FORCE is PHONY, if_changed ignores it and rebuilds only when
> any-prereq or arg-check is non-empty.  Editing a non-default dts in
> OF_LIST rebuilds its .dtb (tracked correctly via fixdep), but that
> .dtb was not a prerequisite of fit-dtb.blob, so $? stayed empty; the
> mkimage command line was unchanged too, so arg-check was empty as
> well.  if_changed therefore skipped mkimage and fit-dtb.blob kept the
> stale dtbs.  u-boot.bin, which appends fit-dtb.blob, then shipped the
> old device tree and the dts change did not take effect.
>
> A previous attempt to fix this added every OF_LIST .dtb *output* as a
> prerequisite.  That is wrong on two counts:

Thanks

Reviewed-by: Simon Glass <[email protected]>

Regards,
Simon
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.