mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Alexander Dahl <ada@thorsis.com>
To: ptxdist@pengutronix.de
Subject: Re: [ptxdist] [PATCH 6/7] u-boot: allow generation of custom environment binary
Date: Tue, 16 Oct 2018 15:13:55 +0200	[thread overview]
Message-ID: <4292355.9ePbSDIryA@ada> (raw)
In-Reply-To: <20181016122610.ni4n555mja4joqeq@pengutronix.de>

Hello,

Am Dienstag, 16. Oktober 2018, 14:26:10 CEST schrieb Michael Olbrich:
> On Tue, Oct 16, 2018 at 01:27:13PM +0200, Alexander Dahl wrote:
> > Am Dienstag, 16. Oktober 2018, 10:58:50 CEST schrieb Denis OSTERLAND:
> > > Am Mittwoch, den 10.10.2018, 14:03 +0200 schrieb Ahmad Fatoum:
> > > > +ifdef PTXCONF_U_BOOT_ENV
> > > > +	@$(U_BOOT_DIR)/tools/mkenvimage \
> > > > +		$(U_BOOT_ENV_FLAGS) -s $(PTXCONF_U_BOOT_ENV_IMAGE_SIZE) \
> > > > +		-o $(U_BOOT_DIR)/uboot-env.bin \
> > > > +		$(U_BOOT_ENV_TXT)
> > > > +endif
> > > 
> > > We had a similar case, but end up with an image of compiled in env,
> > > using
> > > get_default_envs script.
> > > We didn´t had the time to clean it up.
> > 
> > Same usecase here, but …
> > 
> > What I did was creating a new platform image rule depending on
> > HOST_U_BOOT_TOOLS. Creating an U-Boot environment image file is
> > independent
> > from building U-Boot itself and it creates an artefact I would consider an
> > image. I'm not happy seeing this feature inside the U-Boot target package
> > itself.
> 
> Ahmad had a separate package originally but I told him to integrate it...
> It seemed more natural to me. Maybe because the environment is more
> integrated in barebox and that's what I usually use.
> But I'm not too set on it either way.

Well, if I understood correctly from just looking at the current rules in 
master, the barebox package builds its environment in the compile stage. I 
guess it does not make much sense to build a barebox env and not barebox or an 
u-boot env without booting u-boot, so I can understand why one would want to 
integrate it into that package. Bootloader and kernel image itself are also 
put to IMAGEDIR from "normal" packages, not image packages, right?

> > The reason I didn't share my rules/image-ubootenv.make and
> > platforms/image-
> > ubootenv.in was setting lots of custom options through the menu by
> > replacing placeholders, which makes that approach a little more complex
> > than just creating such an image from a static file.
> > 
> > If anyone is interested though, I could share.
> 
> Hmm, we could use ptxd_replace_magic() in general and source the config
> files for this. Then a BSP could overwrite just the menu file and add some
> options. Would that match your use-case?

I didn't know about ptxd_replace_magic() before, but it seems to do exactly 
what I achieved with calls to sed in my rules/image-ubootenv.make … so from a 
quick glance I would say yes, it could match my use-case.

> What about the script (patch 7/7)? Do you think that should be a separate
> package too?

I did not yet use U-Boot scripts that way before (but maybe will do soon), but 
the same reasoning applies as above. Maybe it's better to have it all in one 
place in the U-Boot package.

Greets
Alex


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

  reply	other threads:[~2018-10-16 13:14 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-10 12:03 [ptxdist] [PATCH 1/7] u-boot: specify GPL-2.0-only as LICENSE Ahmad Fatoum
2018-10-10 12:03 ` [ptxdist] [PATCH 2/7] u-boot: add support for oldconfig/menuconfig Ahmad Fatoum
2018-10-16  7:52   ` Michael Olbrich
2018-10-16  8:02     ` Alexander Dahl
2018-10-16  8:25   ` Michael Olbrich
2018-10-10 12:03 ` [ptxdist] [PATCH 3/7] u-boot: add V=$(PTXDIST_VERBOSE) to make options Ahmad Fatoum
2018-10-11  6:52   ` Alexander Dahl
2018-10-10 12:03 ` [ptxdist] [PATCH 4/7] u-boot: run install(1)/rm(1) with -v Ahmad Fatoum
2018-10-10 12:03 ` [ptxdist] [PATCH 5/7] u-boot: add u-boot{-dtb, -with-spl-pbl}.bin image installation options Ahmad Fatoum
2019-02-05  7:30   ` Alexander Dahl
2019-02-05  9:29     ` Ahmad Fatoum
2018-10-10 12:03 ` [ptxdist] [PATCH 6/7] u-boot: allow generation of custom environment binary Ahmad Fatoum
2018-10-16  8:13   ` Michael Olbrich
2018-10-16 10:58   ` Denis OSTERLAND
2018-10-16 11:27     ` Alexander Dahl
2018-10-16 12:26       ` Michael Olbrich
2018-10-16 13:13         ` Alexander Dahl [this message]
2019-04-04 14:17         ` Alexander Dahl
2018-10-16 11:20   ` Alexander Dahl
2018-10-10 12:03 ` [ptxdist] [PATCH 7/7] u-boot: allow generation of boot script Ahmad Fatoum
2018-10-11  6:44 ` [ptxdist] [PATCH 1/7] u-boot: specify GPL-2.0-only as LICENSE Alexander Dahl
2018-10-11  9:05   ` Ahmad Fatoum

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=4292355.9ePbSDIryA@ada \
    --to=ada@thorsis.com \
    --cc=ptxdist@pengutronix.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