[PATCH v2 2/2] Makefile: Only build dtc if needed

Simon Glass sjg at chromium.org
Tue Apr 28 00:25:02 CEST 2020


Hi Heinrich,

On Sun, 26 Apr 2020 at 18:58, Heinrich Schuchardt <xypron.glpk at gmx.de> wrote:
>
> Am April 27, 2020 12:29:29 AM UTC schrieb Simon Glass <sjg at chromium.org>:
> >At present U-Boot always builds dtc if CONFIG_OF_CONTROL is defined.
> >This
> >is wasteful when the system already has a suitable version available.
> >
> >Update the Makefile logic to build dtc only if the version available is
> >too old.
> >
> >This saves about 2.5 seconds of elapsed time on a clean build for me.
> >
> >- Add a patch to bring back the dtc-version.sh script
> >- Update the check to make sure libfdt is available if needed
>
> U -Boot has been set up to create reproducible builds. With this patch dtc will have to be made a build dependency to provide reproducibility. Cf. https://www.debian.org/doc/debian-policy/ch-source.html#reproducibility
>
> This may require changes in the packaging of U-Boot in Linux distributions. Nothing to stop this patch, just something to keep in mind.
>
> You presume that future versions of dtc will always be backward compatible with  U-Boot. Ok, we do the same for other tools like gcc too (with surprises at each new major release).
>
> Cc: Vagrant

Should we disable this check (and always build dtc) when doing a
repeatable build? Is that SOURCE_DATE_EPOCH?

Regards,
SImon


Regards,
Simon


More information about the U-Boot mailing list