From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Thu, 4 Feb 2021 12:06:08 -0500 Subject: [PATCH 1/3] cmd: env: Add 'env import -h' for Marvell hw_info formatted environments In-Reply-To: <20210204104637.342695-2-luka.kovacic@sartura.hr> References: <20210204104637.342695-1-luka.kovacic@sartura.hr> <20210204104637.342695-2-luka.kovacic@sartura.hr> Message-ID: <20210204170608.GD10169@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 > Cc: Luka Perkov > Cc: Robert Marko So, the implementation itself is fine: Reviewed-by: Tom Rini 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: