From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/1] boot/barebox: add renaming functionality to barebox image copy
Date: Fri, 22 Feb 2019 09:40:56 +0100 [thread overview]
Message-ID: <20190222094056.5f155e17@windsurf> (raw)
In-Reply-To: <2748BB04F99E7E45A3203C831E8B20FE34D35E84@SERBE4I2.intra.erbe-med.de>
Hello Markus,
On Tue, 19 Feb 2019 11:03:52 +0000
"Steinhilber, Markus" <Markus.Steinhilber@erbe-med.com> wrote:
> >> Until now barebox images are copied to the output/images directory
> >> with their default name. This is a problem if the barebox and
> >> barebox-aux images have the same name.
> > Could you describe a specific case/situation where this would happen ?
> > The main reason we have barebox vs. barebox-aux is because you sometimes need to build a full-blown Barebox, and a smaller Barebox that serves a first stage bootloader. From what I remember the generated images had different names, don't they ?
>
> In our case it's happening, because we are building a barebox to be
> used with the device normally and use the barebox-aux to build a
> barebox which we use with the serial downloader mode of our board to
> do initial setup and programming. Those images have the same name and
> the second file overwrites the first without this patch.
OK. It kind of works "by luck", because if you had been using U-Boot as
a bootloader, we don't support building two different U-Boot
configurations, and you would have had to use two separate Buildroot
configurations.
> I understand that the usual case for barebox-aux may be to build a
> first stage bootloader, but I think it should not be limited to that
> case. The description of the barebox-aux package is " Build barebox
> with an auxiliary configuration" and for this, you can't be sure that
> the image files have different names. As soon as you are building 2
> barebox images of the same type(SPL/TPL), but different config (which
> I think is quite useful) you will have this problem. I don't know if
> you may also have it in some cases when the type is different. Also,
> you can leave the setting empty and it will work just like before.
>
> >> Also, you need to rename the images in a post-build script if you
> >> need certain file names.
> > That is a pretty normal thing in Buildroot. We just install things
> > as they are installed by the upstream build system, and leave it up
> > to custom post-build script to further rename/move/adjust to match
> > the specific requirements of the project/user.
>
> I understand. In this case I see it as some kind of nice-to-have
> function you can achieve. The main reason is the one above.
Then perhaps the more Buildroot-ish way of doing things would be to
install the images build by the barebox package in a different location
than the one installed by the barebox-aux package, like
$(BINARIES_DIR)/barebox/ and $(BINARIES_DIR)/barebox-aux/. The
downsides of this are:
- We don't do this for other packages
- It breaks backward compatibility.
Arnout, Peter, what do you think ? (See Markus original patch for the
start of the discussion)
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
next prev parent reply other threads:[~2019-02-22 8:40 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-19 11:03 [Buildroot] [PATCH 1/1] boot/barebox: add renaming functionality to barebox image copy Steinhilber, Markus
2019-02-22 8:40 ` Thomas Petazzoni [this message]
2019-02-22 8:53 ` Arnout Vandecappelle
2019-02-22 10:19 ` Thomas Petazzoni
2019-02-25 10:00 ` Steinhilber, Markus
2019-02-25 10:20 ` Thomas Petazzoni
-- strict thread matches above, loose matches on Subject: below --
2019-02-18 13:59 Steinhilber, Markus
2019-02-18 22:10 ` Thomas Petazzoni
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=20190222094056.5f155e17@windsurf \
--to=thomas.petazzoni@bootlin.com \
--cc=buildroot@busybox.net \
/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