public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: "Pali Rohár" <pali@kernel.org>
Cc: "Max Krummenacher" <max.oss.09@gmail.com>,
	u-boot@lists.denx.de,
	"U-Boot STM32" <uboot-stm32@st-md-mailman.stormreply.com>,
	"Adam Ford" <aford173@gmail.com>,
	"Patrick DELAUNAY" <patrick.delaunay@foss.st.com>,
	"Patrice CHOTARD" <patrice.chotard@foss.st.com>,
	"Max Krummenacher" <max.krummenacher@toradex.com>,
	"Heinrich Schuchardt" <xypron.glpk@gmx.de>,
	"Marek Behún" <kabel@kernel.org>,
	"Philippe Reynes" <philippe.reynes@softathome.com>,
	"Quentin Schulz" <quentin.schulz@theobroma-systems.com>,
	"Simon Glass" <sjg@chromium.org>
Subject: Re: [PATCH v2 1/1] Makefile: rework u-boot-initial-env target
Date: Tue, 1 Nov 2022 16:00:38 -0400	[thread overview]
Message-ID: <20221101200038.GL2116612@bill-the-cat> (raw)
In-Reply-To: <20221101195509.bmpsxmhii2wya4f3@pali>

[-- Attachment #1: Type: text/plain, Size: 2916 bytes --]

On Tue, Nov 01, 2022 at 08:55:09PM +0100, Pali Rohár wrote:
> On Tuesday 01 November 2022 15:48:34 Tom Rini wrote:
> > On Tue, Nov 01, 2022 at 06:35:04PM +0100, Pali Rohár wrote:
> > > On Monday 31 October 2022 11:51:45 Max Krummenacher wrote:
> > > > On Fri, Oct 28, 2022 at 6:40 PM Pali Rohár <pali@kernel.org> wrote:
> > > > > On Friday 28 October 2022 18:18:49 Max Krummenacher wrote:
> > > > > >  quiet_cmd_genenv = GENENV  $@
> > > > > > -cmd_genenv = $(OBJCOPY) --dump-section .rodata.default_environment=$@ env/common.o; \
> > > > > > -     sed --in-place -e 's/\x00/\x0A/g' $@; sed --in-place -e '/^\s*$$/d' $@; \
> > > > > > -     sort --field-separator== -k1,1 --stable $@ -o $@
> > > > > > +cmd_genenv = \
> > > > > > +     scripts/printinitialenv | \
> > > > > > +     sed -e 's/\x00/\x0A/g' -e '/^\s*$$/d' | \
> > > > >
> > > > > I think that you do not need this sed anymore as you print newline in
> > > > > host tool.
> > > > 
> > > > Missed that one, will change in a V3.
> > > > 
> > > > >
> > > > > > +     sort --field-separator== -k1,1 --stable -o $@
> > > > > >
> > > > > >  u-boot-initial-env: u-boot.bin
> > > > >
> > > > > It is needed to update dependencies for u-boot-initial-env target. Now
> > > > > it does not depend on u-boot.bin but rather on printinitialenv tool.
> > > > 
> > > > I'm unsure if that is the best way forward. The initial solution would
> > > > also not need to depend on u-boot.bin but rather on env/common.o.
> > > 
> > > Yea, it was wrong too.
> > > 
> > > > I guess that the intention was that the U-Boot binary and the
> > > > u-boot-initial-env file should not be out of sync.
> > > 
> > > This is not possible to achieve with Makefile build system and is
> > > probably also against the logic of make to achieve the best parallelism
> > > during build of the project.
> > > 
> > > In _my_ opinion, Makefile targets should have correct dependencies, on
> > > which they depend. This will prevent circular dependences and also
> > > faster building as make tool can run in parallel as much jobs as
> > > possible -- and do not have to wait until main u-boot.bin is built and
> > > then call other jobs.
> > > 
> > > Tom, or do you think something different?
> > 
> > Well, this tool has the same environment requirements as tools/env does,
> > so we should be able to use the same dependency info?
> 
> Yes, build tool is _able_ to use it. (I think we all agree on this
> ability of make)
> 
> But the question is if it _should_ be used. Because Max wrote some
> arguments why not to use this env dependency info.

Er, I'm lost I guess, sorry. Yes, it should not depend on env/common.o
nor u-boot.bin. I guess looking again, we can't borrow just the envtools
rules as we also would need to update the section that adds
$(defaultenv_h) to envtools would also need to be done for this tool.

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

      reply	other threads:[~2022-11-01 20:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-28 16:18 [PATCH v2 0/1] Makefile: rework u-boot-initial-env target Max Krummenacher
2022-10-28 16:18 ` [PATCH v2 1/1] " Max Krummenacher
2022-10-28 16:40   ` Pali Rohár
2022-10-31 10:51     ` Max Krummenacher
2022-11-01 14:07       ` Tom Rini
2022-11-01 17:35       ` Pali Rohár
2022-11-01 19:48         ` Tom Rini
2022-11-01 19:55           ` Pali Rohár
2022-11-01 20:00             ` Tom Rini [this message]

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=20221101200038.GL2116612@bill-the-cat \
    --to=trini@konsulko.com \
    --cc=aford173@gmail.com \
    --cc=kabel@kernel.org \
    --cc=max.krummenacher@toradex.com \
    --cc=max.oss.09@gmail.com \
    --cc=pali@kernel.org \
    --cc=patrice.chotard@foss.st.com \
    --cc=patrick.delaunay@foss.st.com \
    --cc=philippe.reynes@softathome.com \
    --cc=quentin.schulz@theobroma-systems.com \
    --cc=sjg@chromium.org \
    --cc=u-boot@lists.denx.de \
    --cc=uboot-stm32@st-md-mailman.stormreply.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox