entity-manager FruDevice & eeprom questions

Ed Tanous edtanous at google.com
Thu Apr 22 05:18:41 AEST 2021


On Wed, Apr 14, 2021 at 2:04 PM Srinivasan, Usha
<usha.srinivasan at cornelisnetworks.com> wrote:
>
> Hello.
>
> This is my first-time using entity-manager for inventory & the ability to create one binary image with different json files for different platform configurations.
>

Can you put your patches up somewhere we can see them (ideally gerrit
as a WIP).  That'll help us a lot in helping you troubleshoot.

>
>
> But, first, I am trying to initialize the eeprom on my development board and have it picked up by FruDevice.
>
> I defined the eeprom in my dts file but as 24lc128 so at24 driver didn’t pick it up but that allowed me to use i2ctransfer to initialize the eeprom contents.
> I initialized the eeprom contents following the layout in this doc:

Technically you don't have to declare your eeproms in your dts if you
don't want to, but it doesn't hurt anything to have them there.

> https://www.intel.com/content/dam/www/public/us/en/documents/product-briefs/platform-management-fru-document-rev-1-2-feb-2013.pdf
> I fixed the dts file to define the eeprom using generic “24c128” and now at24 is picking it up and I see:
> ls /sys/bus/i2c/devices/8-0051/
> 8-00510    eeprom     name       subsystem
> driver     modalias   of_node    uevent
>
> cat /sys/bus/i2c/devices/8-0051/name
>
> 24c128
>
> But I also see this:
> ls /sys/bus/i2c/devices/8-0051/8-00510/
> nvmem      of_node    subsystem  type       uevent
> In the json file for entity manager I have:
>
>         {
>
>             "Address": "0x51",
>
>             "Bus": 8,
>
>             "Name": "CN FRU EEPROM",
>
>             "Type": "EEPROM"
>
>         },
>
> But, FruDevice fails looking for "/etc/fru/baseboard.fru.bin".

FruDevice is set up (by default) to have the BMC store the baseboard
fru itself for ID 0.  That file can be written by using ipmitool (or
your favorite ipmi client) to write the content to fru ID 0.

>
> Questions:
>
> Can someone who has used entity-manager & FruDevice explain the reading/processing of the contents of the eeprom & the of "/etc/fru/baseboard.fru.bin” or in other words, what am I doing wrong that FruDevice won’t get off the ground?

Hard to say without seeing your config files;  The above looks right.

> Is there a recommended method for how to initialize the eeprom in manufacturing?

I don't know of any such "recommended" method, every manufacturing
line seems to have its own flow and requirements.

> Has someone developed a script or an application which given the important pieces of info(see pdf above) formats the contents of the eeprom?

Fru device makes the "important" sections of the fru available on dbus.

> In general, does one define the eeprom in the dts as well as in the entity-manager json?

Hard to make a general rule here, there are cases of both.  If EM
detects the device already exists, it won't try to create it a second
time.

>
>
>
> Thanks,
> Usha
>
>
>
>
>
> __________________________
>
> Usha Srinivasan
> Embedded Software Engineer
> Cornelis Networks
>
> 1500 Liberty Ridge Dr
>
> Chesterbrook, PA, 19087
>
> 484-498-8425
>
> 610-703-8475 (cell)
>
>


More information about the openbmc mailing list