Skip to content
Commit 9884f44c authored by Michael Heimpold's avatar Michael Heimpold Committed by Tom Rini
Browse files

tools/env: allow config filename to be passed via command line argument



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: default avatarMichael Heimpold <mhei@heimpold.de>
parent f5b76de4
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment