[U-Boot] [RFC] Exporting defaul environment
Kristian Amlie
kristian.amlie at northern.tech
Mon May 7 06:30:58 UTC 2018
On 03/05/18 18:00, Stefano Babic wrote:
> On 03/05/2018 14:57, Kristian Amlie wrote:
>> I've been having another idea in the back of my head for while, using a
>> very different approach: Instead of requiring that the tool be able to
>> fall back to a default environment, require that U-Boot write the
>> environment to storage if the CRC check fails when it boots, and remove
>> the ability to write to an uninitialized environment from the tools.
>
> From my experience, this is often not desired by customers that do not
> like that flash is touched at first start. It does not work in case of
> CONFIG_ENV_IS_EMBEDDED, where we should skip the save. Anyway, I agree
> that this helps in User Space because it is guaranteed that a suitable
> environment is always present.
As long as it's possible to opt out, I think resiliency and ease of use
should take priority over such needs. Making the common case easy, and
the hard case possible. Also, with the patch you mentioned from Łukasz
below, if the proper environment is already in storage, no writing
should be necessary.
>> This would guarantee that the environment is available in its expected
>> storage location when entering userspace, and would also have the
>> benefit of exposing dangerous situations where a newly flashed root
>> filesystem has a /etc/fw_env.config which is wrong.
>
> Well, if /etc/fw_env.config is broken, we cannot do a lot. But this is
> like a bug and should be solved during the test phase.
Of course. This is just a bonus, and not an argument for choosing this
approach.
> Łukasz told me yesterday that he has already sent some patches to
> OE-Core to extract the default environment, even if this is not suitable
> for an "updater" (our use case).
>
> http://lists.openembedded.org/pipermail/openembedded-core/2018-April/150194.html
>
> The patch is useful to generate a ready-to-flash image, but the exported
> default environment could be used as input by the env tools in user
> space when no environment is found.
--
Kristian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180507/8ba3c9aa/attachment-0001.sig>
More information about the U-Boot
mailing list