From: Tom Rini Date: Wed, 18 Nov 2015 17:33:27 -0500 Subject: [U-Boot] tools/env: allow config filename to be passed via command line argument In-Reply-To: <1445981689-9385-1-git-send-email-mhei@heimpold.de> References: <1445981689-9385-1-git-send-email-mhei@heimpold.de> Message-ID: <20151118223327.GE8060@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 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 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: