Programatically write in a file in the environnent with a hush command

Sascha Hauer s.hauer at pengutronix.de
Tue May 26 23:53:00 PDT 2015


Hi Jean-Christophe,

On Tue, May 26, 2015 at 05:41:06PM +0200, Jean-Christophe BEGUE wrote:
> Hello,
> 
> I'm trying to pass a value from Barebox to the operating system, using
> the usreland command bareboxenv -l.
> 
> My problem is : How should I write that status from my hush barebox script?
> 
> echo $mystatus > /env/data/my_status_file
> 
> The above command doesn't work as '>' is not implemented.
> 
> I've the feeling that I'm missing something?

Besides the ways Alexander just mentioned you could also add something
to the kernel cmdline and parse /proc/cmdline later in userspace.
Still another possibility is to add nodes/properties to the device tree
using the of_* commands.

Sascha


-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



More information about the barebox mailing list