Determining barebox version from linux

Jean-Christophe PLAGNIOL-VILLARD plagnioj at
Thu Dec 23 02:07:07 EST 2010

On 08:18 Thu 23 Dec     , Baruch Siach wrote:
> Hi Marc,
> On Thu, Dec 23, 2010 at 11:03:31AM +1100, Marc Reilly wrote:
> > I want to be able to determine what version of barebox I have on my NOR 
> > flash, after booting into linux.
> [snip]
> > Does anybody else accomplish this in a better way? (I don't want to pass the 
> > barebox version as an arg when booting the kernel - I'd rather it be more 
> > "standalone").
> I set the board revision number, using armlinux_set_revision(), to pass the 
> version of the bootloader to the kernel, and then extract it from the 
> 'Revision' field in /proc/cpuinfo. This solution is ARM specific, though.
It will be better to have a std way as you mqy ise the system_rev for other
stuff as example on some at91

I sync we could generate a /etc/version in the env and then export it in linux
via the fs

I think we could do like this

in barebox itself we keep a default read only fs (default env) that we merge
the same way as a unionfs in barebox to avoid duplication and allow non
modifable file with the rw env

and we will do it in linux also

so linux can get the data from barebox and modify it

Best Regards,

More information about the barebox mailing list