From: Sascha Hauer <s.hauer@pengutronix.de>
To: "Robert P. J. Day" <rpjday@crashcourse.ca>
Cc: "U-Boot Version 2 (barebox)" <barebox@lists.infradead.org>
Subject: Re: need some clarification on how environments work
Date: Thu, 9 Feb 2012 08:52:07 +0100 [thread overview]
Message-ID: <20120209075207.GT3852@pengutronix.de> (raw)
In-Reply-To: <alpine.DEB.2.02.1202080534280.30661@oneiric>
On Wed, Feb 08, 2012 at 06:01:08AM -0500, Robert P. J. Day wrote:
> On Wed, 8 Feb 2012, Sascha Hauer wrote:
>
> ... snip ...
>
> > This is not the whole truth. CONFIG_DEFAULT_ENVIRONMENT_PATH can be
> > a list of directories. All pathes in this list are copied into a
> > temporary directory. This means that you can compose your
> > environment out of different directories. This also means that you
> > can overwrite files with more specific versions.
>
> > If CONFIG_DEFAULT_ENVIRONMENT is enabled 'defaultenv' will be added
> > to the start of the list. So defaultenv/ contains a 'config' files
> > with FIXMEs. This is normally overwritten with the contents of your
> > board specific config file in arch/<arch>/<board>/env/config.
>
> i think what is needed here is an agreement on *terminology*. you
> can't document anything properly unless you can *name* it. so what
> names should be used here?
>
> consider the file referred to above, whose name is *actually*
> arch/<arch>/boards/<board>/env/config (correct?), an example being,
> say, arch/arm/boards/panda/env/config. what is the official name of
> this "config" file?
Since this mechanism is not limited to the config file maybe we can
speak of the generic environment and the board environment. Files in
the generic environment can be overwritten with files from the board
environment.
>
> sascha called it the "board-specific config file"? everyone good
> with that? it could just as easily be called the "board-specific
> environment file". whatever. a couple questions about it. first,
> will there always be just one of them per board, and will it always be
> named "config"? i *think* so but i refuse to make any assumptions.
>
> and second, is it an error if a board has no such file? currently,
> the beagleboard has no such file. is that an acceptable state of
> affairs? or is it something that should be resolved? the
> "freescale-mx23-evk" board directory also doesn't have one, and there
> might be others. so what should be done there?
I think this should be resolved, but only by someone who is actively
working on this board to make sure the result really matches the board.
>
> and i want to correct what sascha wrote above, when he wrote:
>
> > If CONFIG_DEFAULT_ENVIRONMENT is enabled 'defaultenv' will be added
> > to the start of the list. So defaultenv/ contains a 'config' files
> > with FIXMEs.
>
> actually, here's that part of common/Makefile:
>
> ifdef CONFIG_DEFAULT_ENVIRONMENT
> $(obj)/startup.o: include/generated/barebox_default_env.h
> $(obj)/env.o: include/generated/barebox_default_env.h
>
> ifeq ($(CONFIG_DEFAULT_ENVIRONMENT_GENERIC),y)
> DEFAULT_ENVIRONMENT_PATH = "defaultenv"
> endif
>
> so it would appear to be CONFIG_DEFAULT_ENVIRONMENT_GENERIC that
> dictates whether the file defaultenv/config is imported as part of the
> environment.
Even more specific it dictates that defaultenv/ is imported as part
of the environment.
BTW in some configs we have:
CONFIG_DEFAULT_ENVIRONMENT_PATH="defaultenv arch/arm/boards/freescale-mx53-loco/env/"
This means that defaultenv/ will be compiled in regardless of
CONFIG_DEFAULT_ENVIRONMENT_GENERIC being set or not. This should
be fixed to
CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/freescale-mx53-loco/env/"
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
prev parent reply other threads:[~2012-02-09 7:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-08 0:11 Robert P. J. Day
2012-02-08 8:19 ` Premi, Sanjeev
2012-02-08 8:54 ` Sascha Hauer
2012-02-08 11:01 ` Robert P. J. Day
2012-02-09 7:52 ` Sascha Hauer [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=20120209075207.GT3852@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=rpjday@crashcourse.ca \
/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