From: "Andreas Bießmann" <biessmann@corscience.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v4] tools/env: add posibility to inject configuration
Date: Tue, 16 Oct 2012 11:43:42 +0200 [thread overview]
Message-ID: <507D2C4E.90303@corscience.de> (raw)
In-Reply-To: <CANr=Z=aEt8LPfP-7_PhvpqOCMrJYSrjryaq6Q4OCw4BaE1mfCg@mail.gmail.com>
Hi Joe,
On 16.10.2012 02:40, Joe Hershberger wrote:
> Hi Andreas,
>
> On Tue, Jan 24, 2012 at 3:10 AM, Andreas Bie?mann
> <andreas.devel@googlemail.com> wrote:
>> From: Andreas Bie?mann <biessmann@corscience.de>
>>
>> If one want to use fw_printenv/fw_setenv in special variants (eg compiled in
>> MTD parameters without configuration file) he need to change the sources.
>> This patch add the posibillity to change the behaviour of fw_printenv by
>> defining a specific configuration header at compile time.
>> Therefore no need to patch the sources for special environment which fits
>> better into automated build environments.
>>
>> Signed-off-by: Andreas Bie?mann <biessmann@corscience.de>
>> ---
>> total: 0 errors, 0 warnings, 164 lines checked
>>
>> NOTE: Ignored message types: COMPLEX_MACRO CONSIDER_KSTRTO MINMAX MULTISTATEMENT_MACRO_USE_DO_WHILE
>>
>> 0001-tools-env-add-posibility-to-inject-configuration.patch has no obvious style problems and is ready for submission.
>>
>> changes since v1:
>> - use ?= style in Makefile as suggested by Mike
>> - remove c++ style comments in header
>>
>> changes since v2:
>> - place copied/generated fw_env_config.h in include/generated
>> - adopt tools/env/Makefile to new placement of fw_env_config.h
>>
>> changes since v3:
>> - add (C) header
>> - generate empty config.h for unconfigured U-Boot tree
>> - rebase
>>
>> tools/env/Makefile | 29 +++++++++++++++---
>> tools/env/fw_env.h | 32 +++-----------------
>> tools/env/fw_env_config.h.in | 66 ++++++++++++++++++++++++++++++++++++++++++
>> 3 files changed, 95 insertions(+), 32 deletions(-)
>> create mode 100644 tools/env/fw_env_config.h.in
<snip>
> Why not just have these settings directly be #define'd in the board
> config file? You can still leave the one default here that is
> actually used (CONFIG_FILE "/etc/fw_env.config") and make it
> overridable. The rest just need to be documented in the README.
This is correct but not the whole truth. It is not possible to setup a
default environment in the config file, but would be when someone
provides a proper header. However, if he can provide a header he could
also just use the header provided by his board config.
You see the whole story is not only about setup for mtd, but for
customizing this tool in a distributed environment. In the end I think
the proposed header is also not the best solution.
> This new scheme seems overly complicated and I don't know what it buys
> you over the normal place for configuration.
You are right, it is complicated. I think we should name this patch a
RFC and forget about it. Nevertheless there is a need to customize the
tool at build time (especially regarding default environment) and we
should think about how to change this tool.
AFAIR the discussion about environment at all is ongoing, hopefully this
can give some input. I must confess that I didn't work on that problem
for a long time, therefore I did not remember this patch.
Best regards
Andreas Bie?mann
prev parent reply other threads:[~2012-10-16 9:43 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-31 10:06 [U-Boot] [PATCH] tools/env: add posibility to inject configuration Andreas Bießmann
2011-08-31 14:39 ` Mike Frysinger
2011-08-31 15:26 ` [U-Boot] [PATCH v2] " Andreas Bießmann
2011-10-17 9:10 ` Andreas Bießmann
2011-10-17 20:14 ` Wolfgang Denk
2011-10-18 8:03 ` [U-Boot] [PATCH v3] " Andreas Bießmann
2011-11-29 9:08 ` Andreas Bießmann
2012-01-24 9:10 ` [U-Boot] [PATCH v4] " Andreas Bießmann
2012-02-20 16:37 ` Andreas Bießmann
2012-10-16 0:40 ` Joe Hershberger
2012-10-16 9:43 ` Andreas Bießmann [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=507D2C4E.90303@corscience.de \
--to=biessmann@corscience.de \
--cc=u-boot@lists.denx.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