[U-Boot] tools/env: allow config filename to be passed via command line argument

Tom Rini trini at konsulko.com
Wed Nov 18 23:33:27 CET 2015


On Tue, Oct 27, 2015 at 10:34:49PM +0100, Michael Heimpold wrote:

> When for example generating/manipulating SD card/eMMC images which
> contain U-Boot and its environment(s), it is handy to use a given
> configuration file instead of the compiled-in default one.
> And since the default configuration file is expected under /etc
> it's hard for an usual linux user account without special permissions
> to use fw_printenv/fw_setenv for this purpose.
> So allow to pass an optional filename via a new '-c' command
> line argument.
> 
> Example:
> 
> $ ln -s fw_printenv tools/env/fw_setenv
> $ cat fw_env.config
> test.img 0x20000 0x20000
> test.img 0x40000 0x20000
> 
> $ tools/env/fw_printenv -c ./fw_env.config fdt_file
> fdt_file=imx28-duckbill.dtb
> 
> $ tools/env/fw_setenv -c ./fw_env.config fdt_file imx28-duckbill-spi.dtb
> 
> $ tools/env/fw_printenv -c ./fw_env.config fdt_file
> fdt_file=imx28-duckbill-spi.dtb
> 
> Signed-off-by: Michael Heimpold <mhei at heimpold.de>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20151118/83e9e253/attachment.sig>


More information about the U-Boot mailing list