mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Barebox List <barebox@lists.infradead.org>
Subject: Introduce non volatile device variables
Date: Wed,  6 Jul 2016 10:20:24 +0200	[thread overview]
Message-ID: <1467793227-29416-1-git-send-email-s.hauer@pengutronix.de> (raw)

So far we have non volatile (nv) variables which keep their values
over reboots. This series extends the concept to device
parameters. This can be used to configure devices and to preserve
the configuration over reboots. The non volatile device variables
are implemented as regular nv variables with a special namespace.
Every nv variable with the form "nv.dev.<devname>.<paramname>"
acts on the parameter <paramname> of the device named <devname>.

With this for example mtd partitioning can be stored:

 nv dev.nand0.partitions=4M(barebox),-(root)

Or videomodes:

 nv dev.fb0.mode="1280x1024"

It's planned to also replace the current network settings in /env/network/*
with this mechanism, but additional patches are necessary to make
dhcp work.

This is another step to make scripts in barebox simpler and sometimes
unnecessary.

Sascha

----------------------------------------------------------------
Sascha Hauer (3):
      nvvar: Simplify by using nv_set()
      nvvar: Simplify by using dev_set_param()
      Introduce non volatile device variables

 Documentation/user/variables.rst |  18 +++++
 common/globalvar.c               | 151 ++++++++++++++++++++++++++++++++-------
 include/globalvar.h              |   6 ++
 lib/parameter.c                  |   3 +
 4 files changed, 154 insertions(+), 24 deletions(-)

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

             reply	other threads:[~2016-07-06  8:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-06  8:20 Sascha Hauer [this message]
2016-07-06  8:20 ` [PATCH 1/3] nvvar: Simplify by using nv_set() Sascha Hauer
2016-07-06  8:20 ` [PATCH 2/3] nvvar: Simplify by using dev_set_param() Sascha Hauer
2016-07-06  8:20 ` [PATCH 3/3] Introduce non volatile device variables Sascha Hauer

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=1467793227-29416-1-git-send-email-s.hauer@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /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