All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Pali Rohár" <pali@kernel.org>
To: Tom Rini <trini@konsulko.com>
Cc: "Sean Anderson" <sean.anderson@seco.com>,
	"Simon Glass" <sjg@chromium.org>,
	"Heinrich Schuchardt" <xypron.glpk@gmx.de>,
	"Alexander Graf" <agraf@csgraf.de>,
	"Huan Wang" <alison.wang@nxp.com>,
	"Angelo Dureghello" <angelo@sysam.it>,
	"Wolfgang Denk" <wd@denx.de>,
	"Priyanka Jain" <priyanka.jain@nxp.com>,
	"Christophe Leroy" <christophe.leroy@c-s.fr>,
	"Bin Meng" <bmeng.cn@gmail.com>,
	"Marek Behún" <marek.behun@nic.cz>,
	"U-Boot Mailing List" <u-boot@lists.denx.de>
Subject: Re: [PATCH 11/11] Remove including timestamp.h in version.h
Date: Thu, 5 Aug 2021 00:22:58 +0200	[thread overview]
Message-ID: <20210804222258.g4ohwb43q626qyy4@pali> (raw)
In-Reply-To: <20210804221555.GB858@bill-the-cat>

On Wednesday 04 August 2021 18:15:55 Tom Rini wrote:
> On Thu, Aug 05, 2021 at 12:14:29AM +0200, Pali Rohár wrote:
> > On Wednesday 04 August 2021 18:09:14 Tom Rini wrote:
> > > On Wed, Aug 04, 2021 at 05:43:41PM -0400, Sean Anderson wrote:
> > > > 
> > > > 
> > > > On 8/2/21 3:21 PM, Simon Glass wrote:
> > > > > Hi Pali,
> > > > > 
> > > > > On Mon, 2 Aug 2021 at 07:20, Pali Rohár <pali@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@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@chromium.org>
> > > > > 
> > > > > I assume we do actually want to regenerate the timestamp when U-Boot
> > > > > builds, even if nothing has changed. Is that right?
> > > > 
> > > > I know this is the current behavior, but it would be nice if this was
> > > > not the case. If one is building U-Boot as part of a larger project, one
> > > > might want to have a makefile rule like
> > > > 
> > > > 	u-boot/u-boot.bin:
> > > > 		$(MAKE) -C u-boot $(@F)
> > > > 
> > > > but u-boot/u-boot.bin will always be remade even if no changes have been
> > > > done. This will cause make to remake all dependents of U-Boot as well
> > > > (which can be rather time-consuming).
> > > > 
> > > > At the moment, I just use U-Boot as an order-only dependency and remake
> > > > it manually. But I would love it if U-Boot was only remade if
> > > > dependencies had actually changed, since this would make it easier to
> > > > integrate it with the rest of my build system.
> > > 
> > > Note that with this series applied, if you made use of
> > > SOURCE_DATE_EPOCH, nothing would be rebuilt.
> > 
> > IIRC with SOURCE_DATE_EPOCH nothing would be rebuilt also without
> > applying this my patch series.
> 
> Correct, it does not.
> 
> > > That may or may not make
> > > sense however, in your case.  This series does get us closer to being
> > > able to do what the linux kernel does as there's now just one place
> > > rather than a bunch of places that are rebuilt.
> > 
> > Just small correction. Even with this patch series there would not be
> > just one place. There are still more places but this patch series reduce
> > number of these places.
> 
> Ah, I only saw one place in my limited testing this morning.

For my tested boards it is also just one place. But for some other
boards with extended config options it may be more places (like emul_rtc
or work display, ...).

But if your testing discovered also only one place it could mean that it
can be common case for more people...

  reply	other threads:[~2021-08-04 22:23 UTC|newest]

Thread overview: 77+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-02 13:18 [PATCH 00/11] Reduce usage of timestamp macros Pali Rohár
2021-08-02 13:18 ` [PATCH 01/11] Remove #include <timestamp.h> from files which do not need it Pali Rohár
2021-08-02 13:58   ` Tom Rini
2021-09-23  2:07   ` Tom Rini
2021-08-02 13:18 ` [PATCH 02/11] Remove #include <version.h> " Pali Rohár
2021-08-02 13:58   ` Tom Rini
2021-09-23  2:07   ` Tom Rini
2021-08-02 13:18 ` [PATCH 03/11] efi_loader: Use directly version_string variable Pali Rohár
2021-08-02 20:04   ` Heinrich Schuchardt
2021-08-03  7:37     ` Ilias Apalodimas
2021-09-23  2:07   ` Tom Rini
2021-08-02 13:18 ` [PATCH 04/11] version: Move version_string[] from version.h to version_string.h Pali Rohár
2021-08-02 13:58   ` Tom Rini
2021-09-23  2:08   ` Tom Rini
2021-08-02 13:18 ` [PATCH 05/11] m68k: mcf: Remove overloading version_string Pali Rohár
2021-09-23  2:08   ` Tom Rini
2021-08-02 13:18 ` [PATCH 06/11] version: Put version_string[] variable into section .text_version_string Pali Rohár
2021-08-02 13:58   ` Tom Rini
2021-09-16 17:30   ` [PATCH] xtensa: Put U-Boot version string at correct place by linker script Tom Rini
2021-09-16 19:38     ` Francesco Dolcini
2021-09-16 19:42       ` Tom Rini
2021-09-16 19:50         ` Francesco Dolcini
2021-09-16 20:13           ` Tom Rini
2021-09-16 20:23             ` Francesco Dolcini
2021-09-17  5:21         ` Max Filippov
2021-09-17 12:02           ` Tom Rini
2021-09-17  5:14     ` Max Filippov
2021-09-17 12:04       ` Tom Rini
2021-09-17 12:30         ` Max Filippov
2021-08-02 13:18 ` [PATCH 07/11] powerpc: mpc: " Pali Rohár
2021-08-08 11:20   ` [PATCH v2] " Pali Rohár
2021-08-08 11:36     ` Pali Rohár
2021-08-24  5:03       ` Christophe Leroy
2021-08-24  9:46         ` Wolfgang Denk
2021-08-24  5:28     ` Christophe Leroy
2021-08-24 11:28       ` Pali Rohár
2021-09-16 19:17     ` Tom Rini
2021-09-16 19:56   ` [PATCH 1/1] powerpc: Drop version_string placement optimization Tom Rini
2021-09-23  2:09     ` Tom Rini
2021-08-02 13:18 ` [PATCH 08/11] version: Do not make version_string[] variable as a weak Pali Rohár
2021-08-02 13:58   ` Tom Rini
2021-09-23  2:08   ` Tom Rini
2021-08-02 13:18 ` [PATCH 09/11] x86: quark: MRC: Remove U_BOOT_DATE and U_BOOT_TIME from debug log Pali Rohár
2021-08-02 19:21   ` Simon Glass
2021-08-02 23:25   ` Bin Meng
2021-09-23  2:08   ` Tom Rini
2021-08-02 13:18 ` [PATCH 10/11] version: Remove global macro U_BOOT_VERSION_STRING from version.h Pali Rohár
2021-08-02 13:59   ` Tom Rini
2021-09-23  2:08   ` Tom Rini
2021-08-02 13:18 ` [PATCH 11/11] Remove including timestamp.h in version.h Pali Rohár
2021-08-02 19:21   ` Simon Glass
2021-08-02 19:42     ` Pali Rohár
2021-08-02 21:31       ` Tom Rini
2021-08-04  5:59         ` Wolfgang Denk
2021-08-04 12:44           ` Tom Rini
2021-08-04 14:36             ` Simon Glass
2021-08-04 14:40               ` Tom Rini
2021-08-04 21:46                 ` Pali Rohár
2021-08-04 21:43     ` Sean Anderson
2021-08-04 21:52       ` Pali Rohár
2021-08-04 22:09       ` Tom Rini
2021-08-04 22:14         ` Pali Rohár
2021-08-04 22:15           ` Tom Rini
2021-08-04 22:22             ` Pali Rohár [this message]
2021-09-23  2:08   ` Tom Rini
2021-08-17 11:02 ` [PATCH 00/11] Reduce usage of timestamp macros Pali Rohár
2021-08-17 13:40   ` Tom Rini
2021-09-01 20:59 ` Tom Rini
2021-09-01 21:05   ` Pali Rohár
2021-09-01 21:17     ` Tom Rini
2021-09-01 21:28       ` Pali Rohár
2021-09-01 21:33         ` Tom Rini
2021-09-01 21:44           ` Pali Rohár
2021-09-01 21:49             ` Pali Rohár
2021-09-10 20:56               ` Pali Rohár
2021-09-10 21:18                 ` Tom Rini
2021-09-01 21:56             ` Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210804222258.g4ohwb43q626qyy4@pali \
    --to=pali@kernel.org \
    --cc=agraf@csgraf.de \
    --cc=alison.wang@nxp.com \
    --cc=angelo@sysam.it \
    --cc=bmeng.cn@gmail.com \
    --cc=christophe.leroy@c-s.fr \
    --cc=marek.behun@nic.cz \
    --cc=priyanka.jain@nxp.com \
    --cc=sean.anderson@seco.com \
    --cc=sjg@chromium.org \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    --cc=wd@denx.de \
    --cc=xypron.glpk@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.