From: Wolfgang Denk <wd@denx.de>
To: u-boot@lists.denx.de
Subject: [PATCH 4/5] env: allow default environment to be amended from control dtb
Date: Fri, 20 Nov 2020 11:28:24 +0100 [thread overview]
Message-ID: <13434.1605868104@gemini.denx.de> (raw)
In-Reply-To: <CAPnjgZ1C3TQWkUuNQc0BHOGE957s0K-nxFmW3PVO_ObOcKwv+Q@mail.gmail.com>
Dear Simon,
In message <CAPnjgZ1C3TQWkUuNQc0BHOGE957s0K-nxFmW3PVO_ObOcKwv+Q@mail.gmail.com> you wrote:
>
> Some years ago I did a series to allow the environment to come from a
> text file, thus avoiding the \0 stuff.
"env import -t" does that, you know?
> Now binman has a 'u-boot-env'
> entry type, allowing creating an environment from a text file, with
> suitable checksumming.
"env import -b" ...
> There is some advantage to having a default environment compiled into
> U-Boot that covers everything needed to boot. For one, the environment
> can be clobbered from userspace, which would otherwise render the
> device unbootable. For another, it is more secure to avoid loading
> unsigned data (the environment) from flash. Generally, for a secure
> boot, one would need to avoid loading the environment, at least
> without a lot of careful filtering.
One idea behind my rewrite of the environment handling (when I added
hast table support) was that there should be more than one way to
initialize the environment. Until then, we always had exactly one
fixed location for the environment, probaly with a redundant copy.
The code we have now actuially allows for a much greater
flexibility. You can initialize the environment from a selection of
copies, and (now, with proper driver support) also from several
devices. If doen correctly, we could implement things like
"profiles", where for example each user (or use case) can select his
specific profile, initialize the environment from that, and save
change to that. Ths could - for example - be used to switch between
"development" and "production" modes. A "reset to factory defaults"
would then just be an import from the (read-only) factory-defaults
copy. etc.
Importing from a DT is just a logical extension as it is considered
just another storage device / driver. [In a Unix environment, all
these would just be "files".]
It's all there. We just have to use it.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Is a computer language with goto's totally Wirth-less?
next prev parent reply other threads:[~2020-11-20 10:28 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-10 20:25 [PATCH 0/5] allow default environment to be amended from dtb Rasmus Villemoes
2020-11-10 20:25 ` [PATCH 1/5] fdtdec: make fdtdec_get_config_string() return const char* Rasmus Villemoes
2020-11-16 23:52 ` Simon Glass
2020-11-10 20:26 ` [PATCH 2/5] fdtdec: introduce fdtdec_get_config_property Rasmus Villemoes
2020-11-16 23:52 ` Simon Glass
2020-11-10 20:26 ` [PATCH 3/5] env: make env_set_default_vars() return void Rasmus Villemoes
2020-11-12 19:51 ` Wolfgang Denk
2020-11-10 20:26 ` [PATCH 4/5] env: allow default environment to be amended from control dtb Rasmus Villemoes
2020-11-12 19:58 ` Wolfgang Denk
2020-11-16 23:52 ` Simon Glass
2020-11-17 9:49 ` Rasmus Villemoes
2020-11-20 10:13 ` Wolfgang Denk
2020-11-20 10:33 ` Rasmus Villemoes
2020-11-20 10:53 ` Wolfgang Denk
2020-11-17 11:31 ` Wolfgang Denk
2020-11-17 18:23 ` Tom Rini
2020-11-18 14:37 ` Simon Glass
2020-11-20 10:28 ` Wolfgang Denk [this message]
2020-11-21 23:07 ` Simon Glass
2020-11-22 16:12 ` Wolfgang Denk
2020-11-20 10:16 ` Wolfgang Denk
2020-11-17 10:01 ` Stefano Babic
2020-11-10 20:26 ` [PATCH 5/5] test: add tests for default environment Rasmus Villemoes
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=13434.1605868104@gemini.denx.de \
--to=wd@denx.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