public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de
Subject: [PATCH 1/3] cmd: env: Add 'env import -h' for Marvell hw_info formatted environments
Date: Thu, 4 Feb 2021 12:06:08 -0500	[thread overview]
Message-ID: <20210204170608.GD10169@bill-the-cat> (raw)
In-Reply-To: <20210204104637.342695-2-luka.kovacic@sartura.hr>

On Thu, Feb 04, 2021 at 11:46:35AM +0100, Luka Kovacic wrote:

> The '-h' flag is added to the 'env import' command to enable parsing
> Marvell hw_info formatted environments.
> This format is often used on Marvell Armada A37XX based devices to store
> parameters like the board serial number, factory MAC addresses and some
> other information.
> 
> Currently this environment format can only be imported, not exported.
> These parameters are usually written to the flash in the factory.
> 
> This functionality has been tested on the GST ESPRESSOBin-Ultra board
> successfully.
> 
> Usage example:
>  => sf probe
>  => sf read ${loadaddr} 0x003E000A 0x1F0 # Read the environment from
> SPI flash
>  => env import -h ${loadaddr}
> 
> Signed-off-by: Luka Kovacic <luka.kovacic@sartura.hr>
> Cc: Luka Perkov <luka.perkov@sartura.hr>
> Cc: Robert Marko <robert.marko@sartura.hr>

So, the implementation itself is fine:

Reviewed-by: Tom Rini <trini@konsulko.com>

And I take it as a given that we can't get the boards populated with an
existing separator, so we need to solve this somehow or another.  I am
however loathe to increase every platform by a handful of bytes (help
text, code text) to cover this case, and adding #ifdef around the help
text in particular would be very ugly.  Is there any clean way to write
this as a board-specific command?  I assume the overall intention is to
import the factory env for the required information, store it in regular
U-Boot environment and then never touch the factory area again.  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/20210204/dcd89772/attachment.sig>

  reply	other threads:[~2021-02-04 17:06 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-04 10:46 [PATCH 0/3] Add support for the GST ESPRESSOBin-Ultra board Luka Kovacic
2021-02-04 10:46 ` [PATCH 1/3] cmd: env: Add 'env import -h' for Marvell hw_info formatted environments Luka Kovacic
2021-02-04 17:06   ` Tom Rini [this message]
2021-02-05 22:02     ` Luka Kovacic
2021-02-05 22:04       ` Tom Rini
2021-02-05 22:36         ` Luka Kovacic
2021-02-05 22:40           ` Tom Rini
2021-02-05 22:51             ` Luka Kovacic
2021-02-09  8:12               ` Stefan Roese
2021-02-04 10:46 ` [PATCH 2/3] arm: mvebu: mvebu_armada-37xx: Define the loadaddr environment variable Luka Kovacic
2021-02-04 10:46 ` [PATCH 3/3] arm: mvebu: Initial ESPRESSOBin-Ultra board support Luka Kovacic

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=20210204170608.GD10169@bill-the-cat \
    --to=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    /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