[PATCH 11/11] Remove including timestamp.h in version.h
Tom Rini
trini at konsulko.com
Mon Aug 2 23:31:00 CEST 2021
On Mon, Aug 02, 2021 at 09:42:23PM +0200, Pali Rohár wrote:
> On Monday 02 August 2021 13:21:58 Simon Glass wrote:
> > Hi Pali,
> >
> > On Mon, 2 Aug 2021 at 07:20, Pali Rohár <pali at kernel.org> wrote:
> > >
> > > Header file version.h does not use anything from timestamp.h. Including of
> > > timestamp.h has side effect which cause recompiling object file at every
> > > make run because timestamp.h changes at every run.
> > >
> > > So remove timestamp.h from version.h and include timestamp.h in files
> > > which needs it.
> > >
> > > This change reduce recompilation time of final U-Boot binary when U-Boot
> > > source files were not changed as less source files needs to be recompiled.
> > >
> > > Signed-off-by: Pali Rohár <pali at kernel.org>
> > > ---
> > > arch/arm/mach-rockchip/tpl.c | 4 ++++
> > > board/work-microwave/work_92105/work_92105_display.c | 1 +
> > > cmd/version.c | 1 +
> > > common/spl/spl.c | 4 ++++
> > > drivers/rtc/emul_rtc.c | 2 +-
> > > include/version.h | 2 --
> > > 6 files changed, 11 insertions(+), 3 deletions(-)
> >
> > Reviewed-by: Simon Glass <sjg at chromium.org>
> >
> > I assume we do actually want to regenerate the timestamp when U-Boot
> > builds, even if nothing has changed. Is that right?
>
> This is current behavior and these my patches do not change it. Patches
> just smartly moves the source of this timestamp (from macros to global
> variable; so source files do not have to be recompiled when external
> global variable changes -- as opposite of macros).
>
> > It could be
> > confusing otherwise, as people cannot 'update' the banner without
> > making a trivial change.
>
> IIRC linux kernel does not change this date 'banner' when nothing was
> changed. So maybe it is, maybe it is not confusing...
I think that if nothing changes the banner not changing is the right
behavior.
Reviewed-by: Tom Rini <trini at konsulko.com>
--
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/20210802/3ea673f0/attachment.sig>
More information about the U-Boot
mailing list