[PATCH] env: Remove all dependencies for SYS_REDUNDAND_ENVIRONMENT

Tom Rini trini at konsulko.com
Wed Jan 13 15:43:32 CET 2021


On Wed, Jan 13, 2021 at 03:24:24PM +0100, Michal Simek wrote:
> On 13. 01. 21 15:02, Tom Rini wrote:
> > On Wed, Jan 13, 2021 at 01:26:27PM +0100, Michal Simek wrote:
> > 
> >> CONFIG_SYS_REDUNDAND_ENVIRONMENT is changing in env_internal.h how u-boot
> >> works with variables. struct environment_s has one byte flags property
> >> which also affects ENV_SIZE macro.
> >>
> >> I have reached the case where CONFIG_ENV_IS_NOWHERE is default setup
> >> but custom scripts can be designed in a way that u-boot is asked to
> >> import/export variables from/to file which can be in certain format.
> >> That's why also for this configuration make sense to enable
> >> CONFIG_SYS_REDUNDAND_ENVIRONMENT because it depends on environment file
> >> format.
> >>
> >> The patch is removing dependency on this configuration to support selecting
> >> environment file format without any specific dependency where variables are
> >> stored.
> > 
> > Are you importing a binary of the environment in, which was generated
> > with redundant env set, is what the problem is?
> 
> Yes exactly.

OK, so env import/export -b require compatible env structs, that makes
sense.  I assume you've ruled out env import/export -t instead already.
I would rather see the struct be identical (so, always have flags)
rather than say that we can enable redundant environment in all cases
(since functionally, we can't for "nowhere" and don't for some others)
as it also means that for your case you would still need to know to
enable the redundant feature to get what you're aiming for to work.
Does that make sense?  Thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210113/1c9701d8/attachment.sig>


More information about the U-Boot mailing list