All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vernon Mauery <vernon.mauery@linux.intel.com>
To: Adriana Kobylak <anoo@linux.ibm.com>
Cc: OpenBMC Development <openbmc@lists.ozlabs.org>,
	openbmc <openbmc-bounces+anoo=linux.ibm.com@lists.ozlabs.org>
Subject: Re: U-Boot environment management from userspace
Date: Thu, 30 May 2019 10:20:04 -0700	[thread overview]
Message-ID: <20190530172004.GA46814@mauery.jf.intel.com> (raw)
In-Reply-To: <e42fb92effbc990f60239377b05e3f4e@linux.vnet.ibm.com>

On 29-May-2019 10:30 AM, Adriana Kobylak wrote:
>>Am I the only one that has a need for this or is there a wider
>>audience that would benefit?
>
>The software manager (phosphor-bmc-code-mgmt) relies on U-Boot 
>environment
>variables for managing the images like for determining which image to 
>boot
>from.
>
>>3) Use a one-shot service that parses the 'instance' to extract a
>>variable name and variable value. Then the variable could be activated
>>by launching ubootenv@foo=bar.service. This would require some fancy
>>parameter encoding to make it all work correctly to avoid string
>>injections.
>
>Yeah, we went that route with an obmc-flash-bmc-setenv@.service[1], with
>like you mentioned uses some 'fancy parameter encoding', ex:
>"obmc-flash-bmc-setenv@" + entryId + "\\x3d" + std::to_string(value) + 
>".service";
>
>This has worked so far but I'd be open on having a mapping of the env
>variables to D-Bus properties.
>
>>Reading U-Boot environment variables from userspace is not difficult,
>>but to do it in a standard way, (fw_printenv), it requires a fork and
>>exec.
>
>We're actually reading the mtd device to get the values of the variables
>to avoid having a 'system' or 'fork/exec' call, then we put those values
>in D-Bus properties under the software/ path. Having some other app do 
>that
>parsing would be nice especially if we're to expand the use of the 
>U-Boot
>env vars.
>
>---
>[1] https://github.com/openbmc/phosphor-bmc-code-mgmt/blob/master/obmc-flash-bmc-setenv%40.service
>
>

Brad,

It sounds like Intel is not the only ones that might benefit from a 
service like this, so it might be a good time for a new project/repo. 

Could you create a new repo for us: phosphor-u-boot-env-mgr

--Vernon

  reply	other threads:[~2019-05-30 17:20 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-28 18:40 U-Boot environment management from userspace Vernon Mauery
2019-05-29 15:26 ` Thomaiyar, Richard Marian
2019-05-29 15:30 ` Adriana Kobylak
2019-05-30 17:20   ` Vernon Mauery [this message]
2019-06-05 12:35     ` Brad Bishop
2019-06-05 15:27       ` krtaylor
2019-06-12 21:00       ` Brad Bishop
2019-05-30 17:25 ` Ed Tanous
2019-05-31  0:35 ` Joel Stanley

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=20190530172004.GA46814@mauery.jf.intel.com \
    --to=vernon.mauery@linux.intel.com \
    --cc=anoo@linux.ibm.com \
    --cc=openbmc-bounces+anoo=linux.ibm.com@lists.ozlabs.org \
    --cc=openbmc@lists.ozlabs.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.