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

Jean-Christophe BEGUE begue.jc at gmail.com
Wed May 27 06:52:00 PDT 2015


I didn't noticed -a and -o options for echo. That suits my needs, but
"nv" is exactly what I'm trying to acheive.

I'll use the kernel command line as well on early phases of my software boot.

Thank you!

Jean-Christophe BEGUE
http://www.devisubox.com


On Wed, May 27, 2015 at 8:53 AM, Sascha Hauer <s.hauer at pengutronix.de> wrote:
> 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