Re: [PATCH] globalvar: Create Kconfig symbol for NVVAR

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Trent,

On Tue, Apr 26, 2016 at 06:05:05PM +0000, Trent Piepho wrote:
> On Tue, 2016-04-26 at 11:30 +0200, Sascha Hauer wrote:
> > nvvar support not only needs globalvar, but also persistent
> > environment storage. Add a separate default-y option which
> > depends on ENV_HANDLING for this case.
> 
> It seems like other commands, defaultenv, saveenv, loadenv, will
> select ENV_HANDLING.  Shouldn't CMD_NV do the same?

'select' always has the problem that it's easy to get broken
dependencies once the selected option has other dependencies, that's why
I used 'depends on'.

> 
> From what I can tell, the only way to turn on ENV_HANDLING is to enable
> a command that uses it.

Yes, right. So now we have to turn on loadenv/saveenv to get nvvar
support. That's not good and wasn't intended. Similarly with
loadenv/savenv: These commands have to be enabled to get environment
storage, even though the feature should not depend on the command.

> One of those three above or the option to
> compile in an environment.  But isn't it possible to not have any of
> those options on, yet still get an env via a flash sector or file from
> the OF driver or board code?  And thus make use of nv.  IOW,
> CMD_DEFAULT/LOAD/SAVEENV=n
> DEFAULT_ENVIRONMENT=n
> CMD_NV=y
> 
> should work.  It would allow env vars with default values, coming from a
> external flash env, yet not have any commands that might not be needed
> or wanted (e.g., production device not intended to support users
> modifying anything from the barebox prompt).
> 
> In fact, it seems one could use nv without even having the nv command?

Yes. I created a new series making these options user visible
(default-y to not change the existing defconfigs). This should make
it possible to have persistent environment, globalvar and nvvar without
enabling the commands. Also using "depends on" rather than "select"
should reduce dependency hassles. Let me know what you think

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@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux