openbmc.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* entity-manager FruDevice & eeprom questions
@ 2021-04-14 21:03 Srinivasan, Usha
  2021-04-21 19:18 ` Ed Tanous
  0 siblings, 1 reply; 2+ messages in thread
From: Srinivasan, Usha @ 2021-04-14 21:03 UTC (permalink / raw)
  To: openbmc

[-- Attachment #1: Type: text/plain, Size: 2126 bytes --]

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.

But, first, I am trying to initialize the eeprom on my development board and have it picked up by FruDevice.

  1.  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.
  2.  I initialized the eeprom contents following the layout in this doc:
https://www.intel.com/content/dam/www/public/us/en/documents/product-briefs/platform-management-fru-document-rev-1-2-feb-2013.pdf
  3.  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

  1.  But I also see this:
ls /sys/bus/i2c/devices/8-0051/8-00510/
nvmem      of_node    subsystem  type       uevent
  2.  In the json file for entity manager I have:

        {

            "Address": "0x51",

            "Bus": 8,

            "Name": "CN FRU EEPROM",

            "Type": "EEPROM"

        },

  1.  But, FruDevice fails looking for "/etc/fru/baseboard.fru.bin".
Questions:

  1.  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?
  2.  Is there a recommended method for how to initialize the eeprom in manufacturing?
  3.  Has someone developed a script or an application which given the important pieces of info(see pdf above) formats the contents of the eeprom?
  4.  In general, does one define the eeprom in the dts as well as in the entity-manager json?

Thanks,
Usha


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


[-- Attachment #2: Type: text/html, Size: 9882 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: entity-manager FruDevice & eeprom questions
  2021-04-14 21:03 entity-manager FruDevice & eeprom questions Srinivasan, Usha
@ 2021-04-21 19:18 ` Ed Tanous
  0 siblings, 0 replies; 2+ messages in thread
From: Ed Tanous @ 2021-04-21 19:18 UTC (permalink / raw)
  To: Srinivasan, Usha; +Cc: openbmc

On Wed, Apr 14, 2021 at 2:04 PM Srinivasan, Usha
<usha.srinivasan@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)
>
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-04-21 19:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-14 21:03 entity-manager FruDevice & eeprom questions Srinivasan, Usha
2021-04-21 19:18 ` Ed Tanous

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).