Re: Export firmware information to userspace

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Carlo Caione <carlo.caione@xxxxxxxxx> writes:
> On Fri, 2018-06-22 at 09:13 +1000, Stewart Smith wrote:
>> Olof Johansson <olof@xxxxxxxxx> writes:
>> > > Mmh, but a:
>> > >         u-boot-version = "2018.07-rc2 (21 Jun 2018 - 12:21:46
>> > > +0100)";
>> > > would be fairly small as well, wouldn't it?
>> > > Or is there any other data we would want to advertise?
>> > 
>> > That doesn't belong in chosen, but it'd be fine in something such
>> > as
>> > /firmware/u-boot/version
>> 
>> We have something that looks a bit like that for OpenPower systems,
>> perhaps something common could be achieved?
>> 
>> It looks something like this (key,value) = (component,version)
>> 
>> ibm,firmware-versions {
>>              version = "open-power-habanero-v1.14-45-g78d89280c3f9-
>> dirty";
>>              skiboot = "5.4.0";
>>              occ = "d7efe30";
>>              linux = "4.4.32-openpower1";
>> };
>> 
>> https://open-power.github.io/skiboot/doc/device-tree/ibm,firmware-ver
>> sions.html
>
> That's really good to encode the U-Boot version. Any other parameters
> that can be useful in userspace?
>
> It was already discussed that probably having the booting device would
> be really handy but I tried to think a way to detect the firmware
> booting device from U-Boot but it looks like it really is platform
> dependent and not always easy.

Something separate from /chosen ?

Or were you thinknig more along the lines of "there's several versions
of firmware that could be booted, here's a list of them and what one was
booted" ?

We have a need for that as well, but it's a bit more dynamic as these
could all change due to actions on the BMC at runtime, so a static
representation in the device tree isn't necessarily the best
representation.

> The other problem is that sometimes we have SPL in a device and the
> second stage in a different device (i.e. on the rk3288 you can have SPL
> into the SPI and U-Boot into eMMC) so that is adding one more layer.
> Maybe we should have also something like "spl,$key"?

I think that would fit in /chosen? So in /chosen it'd say "hey, here's
the device(s) I booted from" and in a separate node it'd say "here's the
versions of everything I booted".

-- 
Stewart Smith
OPAL Architect, IBM.

--
To unsubscribe from this list: send the line "unsubscribe devicetree-spec" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Device Tree]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux Audio Users]     [Photos]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]

  Powered by Linux