Hi Francesco,

On 4/11/22 2:17 PM, Francesco Dolcini wrote:
> Hello all,
> I have a need to pass the u-boot version string to the operating
> system and I'm thinking at adding `u-boot,version` property storing
> `version_string` in it in the FDT `chosen` node.
> 
> Is this something that would be generally useful? Would be a patch like
> that acceptable in upstream u-boot? Is there any other obvious way to
> achieve something like that already implemented (using the cmdline would
> work without any code change, but probably not the nicest solution).
> 
> Francesco
> 

I think a standard way to communicate this would be nice. In the last
project I needed to do this, I put the following in my board file

/* Use a version without spaces so we don't have to quote it */
const char version_string[] = PLAIN_VERSION;

and then I added "my-prefix.u_boot_ver=${ver}" to my bootargs. This
works OK, but it's a bit ugly to read (you have to grep on
/proc/cmdline).

Somethins to consider would be how we want to expose versions from
different bootloader stages. For example, should SPL's version be
added?

--Sean

Reply via email to