openbmc.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* FRU access configuration
@ 2022-02-15  3:13 damon3000
  2022-02-15 19:34 ` Patrick Williams
  0 siblings, 1 reply; 5+ messages in thread
From: damon3000 @ 2022-02-15  3:13 UTC (permalink / raw)
  To: openbmc

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

Hi All,

I am new to openbmc. I am started porting openbmc features to new hardware.
So, I want to add support for FRUID EEPROM. FRUID contents should be available as dbus objects. What changes needs to done in the application side.

Please provide the steps or suggestions to follow.

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

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

* Re: FRU access configuration
  2022-02-15  3:13 FRU access configuration damon3000
@ 2022-02-15 19:34 ` Patrick Williams
  2022-02-17 11:10   ` damon3000
  0 siblings, 1 reply; 5+ messages in thread
From: Patrick Williams @ 2022-02-15 19:34 UTC (permalink / raw)
  To: damon3000; +Cc: openbmc

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

On Tue, Feb 15, 2022 at 11:13:22AM +0800, damon3000 wrote:
> Hi All,
> 
> I am new to openbmc. I am started porting openbmc features to new hardware.
> So, I want to add support for FRUID EEPROM. FRUID contents should be available as dbus objects. What changes needs to done in the application side.
> 
> Please provide the steps or suggestions to follow.

You should probably look at https://github.com/openbmc/entity-manager and
existing systems that leverage it.  There is already support for specifying the
location of your EEPROM and interpreting it / exposing as dbus objects.

'FruDevice' is typically involved in the EEPROM parsing and then there is
entity-manager JSON that exposes specific EEPROM fields as the Inventory
object(s).

-- 
Patrick Williams

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re:Re: FRU access configuration
  2022-02-15 19:34 ` Patrick Williams
@ 2022-02-17 11:10   ` damon3000
  2022-02-18  3:48     ` Zev Weiss
  2022-02-18  6:08     ` damon3000
  0 siblings, 2 replies; 5+ messages in thread
From: damon3000 @ 2022-02-17 11:10 UTC (permalink / raw)
  To: Patrick Williams; +Cc: openbmc

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

Hi Patrick,


  1.  According to your suggestion, I can scan my FRU information via busctl command, but entity-manager did not start and can not be accessed.
The log is as below:

"
busctl tree --no-pager xyz.openbmc_project.FruDevice
`-/xyz
  `-/xyz/openbmc_project
    `-/xyz/openbmc_project/FruDevice
      |-/xyz/openbmc_project/FruDevice/10_64
      |-/xyz/openbmc_project/FruDevice/10_65
      |-/xyz/openbmc_project/FruDevice/10_67
      |-/xyz/openbmc_project/FruDevice/3_80
      |-/xyz/openbmc_project/FruDevice/6_72
      |-/xyz/openbmc_project/FruDevice/6_74
      |-/xyz/openbmc_project/FruDevice/6_76
      |-/xyz/openbmc_project/FruDevice/7_81
      |-/xyz/openbmc_project/FruDevice/7_89
      `-/xyz/openbmc_project/FruDevice/test


busctl introspect --no-pager xyz.openbmc_project.FruDevice \
>  /xyz/openbmc_project/FruDevice/Brahma______________
NAME                                TYPE      SIGNATURE RESULT/VALUE                       FLAGS
org.freedesktop.DBus.Introspectable interface -         -                                  -
.Introspect                         method    -         s                                  -
org.freedesktop.DBus.Peer           interface -         -                                  -
.GetMachineId                       method    -         s                                  -
.Ping                               method    -         -                                  -
org.freedesktop.DBus.Properties     interface -         -                                  -
.Get                                method    ss        v                                  -
.GetAll                             method    s         a{sv}                              -
.Set                                method    ssv       -                                  -
.PropertiesChanged                  signal    sa{sv}as  -                                  -
xyz.openbmc_project.FruDevice       interface -         -                                  -
.ADDRESS                            property  u         80                                 emits-change
.BOARD_FRU_VERSION_ID               property  s         "UVD050"                           emits-change
.BOARD_INFO_AM1                     property  s         "V1  "                             emits-change
.BOARD_INFO_AM2                     property  s         "0123456789ABCDE001TAG0000002  " emits-change
.BOARD_INFO_AM3                     property  s         "R1B "                             emits-change
.BOARD_INFO_AM4                     property  s         "XX1 "                             emits-change
.BOARD_INFO_AM5                     property  s         "0E11223344E0"                     emits-change
.BOARD_INFO_AM6                     property  s         "02"                               emits-change
.BOARD_LANGUAGE_CODE                property  s         "0"                                emits-change
.BOARD_MANUFACTURER                 property  s         "Huaqin Telecom  "                 emits-change
.BOARD_MANUFACTURE_DATE             property  s         "1996-07-07 - 10:57:00"            emits-change
.BOARD_PART_NUMBER                  property  s         "NA                  "             emits-change
.BOARD_PRODUCT_NAME                 property  s         "test              "             emits-change
.BOARD_SERIAL_NUMBER                property  s         "3120E33900011X0010            " emits-change



root@sky:/etc/default/obmc/eeproms/system/chassis# echo "24c64 0x50 > /sys/bus/i2c/devices/i2c-3/new_device"
24c64 0x50 > /sys/bus/i2c/devices/i2c-3/new_device
root@sky:/etc/default/obmc/eeproms/system/chassis# busctl tree --no-pager xyz.openbmc_project.EntityManager
Failed to introspect object / of service xyz.openbmc_project.EntityManager: The name is not activatable
No objects discovered.

"


I modified one of the configuration which is in entity-manager/configuration folder, its name is Mt_jade.json, The modification is as below from line 759:
      "Name": "$bus test",
      "Probe": "xyz.openbmc_project.FruDevice({'PRODUCT_PRODUCT_NAME': 'test'})",
        "Type": "Chassis",


Still occurred the above log.



2. According to meta-quanta's commit, I did not find they modify entity-manager/configuration files. And I tried the method, however I can not display them to "ipmitool fru"



"
commit 0de4856d037ff2525b3dd74ce2cbafdd4dcff443
Author: Joseph Fu <joseph.fu@quantatw.com>
Date:   Wed Jan 26 14:37:42 2022 +0800

    meta-quanta: s6q: add fru yaml config files
    
    Add fru setting config and device json file.

"



Could you provide some suggestions?

















At 2022-02-16 03:34:38, "Patrick Williams" <patrick@stwcx.xyz> wrote:
>On Tue, Feb 15, 2022 at 11:13:22AM +0800, damon3000 wrote:
>> Hi All,
>> 
>> I am new to openbmc. I am started porting openbmc features to new hardware.
>> So, I want to add support for FRUID EEPROM. FRUID contents should be available as dbus objects. What changes needs to done in the application side.
>> 
>> Please provide the steps or suggestions to follow.
>
>You should probably look at https://github.com/openbmc/entity-manager and
>existing systems that leverage it.  There is already support for specifying the
>location of your EEPROM and interpreting it / exposing as dbus objects.
>
>'FruDevice' is typically involved in the EEPROM parsing and then there is
>entity-manager JSON that exposes specific EEPROM fields as the Inventory
>object(s).
>
>-- 
>Patrick Williams

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

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

* Re: Re: FRU access configuration
  2022-02-17 11:10   ` damon3000
@ 2022-02-18  3:48     ` Zev Weiss
  2022-02-18  6:08     ` damon3000
  1 sibling, 0 replies; 5+ messages in thread
From: Zev Weiss @ 2022-02-18  3:48 UTC (permalink / raw)
  To: damon3000; +Cc: openbmc

On Thu, Feb 17, 2022 at 03:10:33AM PST, damon3000 wrote:
>Hi Patrick,
>
>
>  1.  According to your suggestion, I can scan my FRU information via busctl command, but entity-manager did not start and can not be accessed.
>The log is as below:
>
>"
>busctl tree --no-pager xyz.openbmc_project.FruDevice
>`-/xyz
>  `-/xyz/openbmc_project
>    `-/xyz/openbmc_project/FruDevice
>      |-/xyz/openbmc_project/FruDevice/10_64
>      |-/xyz/openbmc_project/FruDevice/10_65
>      |-/xyz/openbmc_project/FruDevice/10_67
>      |-/xyz/openbmc_project/FruDevice/3_80
>      |-/xyz/openbmc_project/FruDevice/6_72
>      |-/xyz/openbmc_project/FruDevice/6_74
>      |-/xyz/openbmc_project/FruDevice/6_76
>      |-/xyz/openbmc_project/FruDevice/7_81
>      |-/xyz/openbmc_project/FruDevice/7_89
>      `-/xyz/openbmc_project/FruDevice/test
>
>
>busctl introspect --no-pager xyz.openbmc_project.FruDevice \
>>  /xyz/openbmc_project/FruDevice/Brahma______________
>NAME                                TYPE      SIGNATURE RESULT/VALUE                       FLAGS
>org.freedesktop.DBus.Introspectable interface -         -                                  -
>.Introspect                         method    -         s                                  -
>org.freedesktop.DBus.Peer           interface -         -                                  -
>.GetMachineId                       method    -         s                                  -
>.Ping                               method    -         -                                  -
>org.freedesktop.DBus.Properties     interface -         -                                  -
>.Get                                method    ss        v                                  -
>.GetAll                             method    s         a{sv}                              -
>.Set                                method    ssv       -                                  -
>.PropertiesChanged                  signal    sa{sv}as  -                                  -
>xyz.openbmc_project.FruDevice       interface -         -                                  -
>.ADDRESS                            property  u         80                                 emits-change
>.BOARD_FRU_VERSION_ID               property  s         "UVD050"                           emits-change
>.BOARD_INFO_AM1                     property  s         "V1  "                             emits-change
>.BOARD_INFO_AM2                     property  s         "0123456789ABCDE001TAG0000002  " emits-change
>.BOARD_INFO_AM3                     property  s         "R1B "                             emits-change
>.BOARD_INFO_AM4                     property  s         "XX1 "                             emits-change
>.BOARD_INFO_AM5                     property  s         "0E11223344E0"                     emits-change
>.BOARD_INFO_AM6                     property  s         "02"                               emits-change
>.BOARD_LANGUAGE_CODE                property  s         "0"                                emits-change
>.BOARD_MANUFACTURER                 property  s         "Huaqin Telecom  "                 emits-change
>.BOARD_MANUFACTURE_DATE             property  s         "1996-07-07 - 10:57:00"            emits-change
>.BOARD_PART_NUMBER                  property  s         "NA                  "             emits-change
>.BOARD_PRODUCT_NAME                 property  s         "test              "             emits-change
>.BOARD_SERIAL_NUMBER                property  s         "3120E33900011X0010            " emits-change
>
>
>
>root@sky:/etc/default/obmc/eeproms/system/chassis# echo "24c64 0x50 > /sys/bus/i2c/devices/i2c-3/new_device"
>24c64 0x50 > /sys/bus/i2c/devices/i2c-3/new_device

I haven't closely followed what else you're doing here, but this
definitely looks wrong -- I think you meant to do

  $ echo "24c64 0x50" > /sys/bus/i2c/devices/i2c-3/new_device

Note the position of the close quote -- as you had it above it's just
writing a long string to stdout instead of sending the device name and
i2c address to the sysfs 'new_device' file.


Zev

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

* Re:Re:Re: FRU access configuration
  2022-02-17 11:10   ` damon3000
  2022-02-18  3:48     ` Zev Weiss
@ 2022-02-18  6:08     ` damon3000
  1 sibling, 0 replies; 5+ messages in thread
From: damon3000 @ 2022-02-18  6:08 UTC (permalink / raw)
  To: Patrick Williams; +Cc: openbmc

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













Hi Zev


     That maybe occurred question when I copied the log.
    

      I mainly care that why entity manager did not start and there is no service in /lib/system/systemd.
```

root@sky:/lib/systemd/system# ls xyz.openbmc_project.EntityManager
ls: xyz.openbmc_project.EntityManager: No such file or directory
root@sky:/lib/systemd/system# ls *EntityManager*
ls: *EntityManager*: No such file or directory
root@sky:/lib/systemd/system# systemctl xyz.openbmc_project.EntityManager
Unknown command verb xyz.openbmc_project.EntityManager.
root@sky:/lib/systemd/system#

```


At 2022-02-17 19:10:33, "damon3000" <damon3000@163.com> wrote:

Hi Patrick,


  1.  According to your suggestion, I can scan my FRU information via busctl command, but entity-manager did not start and can not be accessed.
The log is as below:

"
busctl tree --no-pager xyz.openbmc_project.FruDevice
`-/xyz
  `-/xyz/openbmc_project
    `-/xyz/openbmc_project/FruDevice
      |-/xyz/openbmc_project/FruDevice/10_64
      |-/xyz/openbmc_project/FruDevice/10_65
      |-/xyz/openbmc_project/FruDevice/10_67
      |-/xyz/openbmc_project/FruDevice/3_80
      |-/xyz/openbmc_project/FruDevice/6_72
      |-/xyz/openbmc_project/FruDevice/6_74
      |-/xyz/openbmc_project/FruDevice/6_76
      |-/xyz/openbmc_project/FruDevice/7_81
      |-/xyz/openbmc_project/FruDevice/7_89
      `-/xyz/openbmc_project/FruDevice/test


busctl introspect --no-pager xyz.openbmc_project.FruDevice \
>  /xyz/openbmc_project/FruDevice/test
NAME                                TYPE      SIGNATURE RESULT/VALUE                       FLAGS
org.freedesktop.DBus.Introspectable interface -         -                                  -
.Introspect                         method    -         s                                  -
org.freedesktop.DBus.Peer           interface -         -                                  -
.GetMachineId                       method    -         s                                  -
.Ping                               method    -         -                                  -
org.freedesktop.DBus.Properties     interface -         -                                  -
.Get                                method    ss        v                                  -
.GetAll                             method    s         a{sv}                              -
.Set                                method    ssv       -                                  -
.PropertiesChanged                  signal    sa{sv}as  -                                  -
xyz.openbmc_project.FruDevice       interface -         -                                  -
.ADDRESS                            property  u         80                                 emits-change
.BOARD_FRU_VERSION_ID               property  s         "UVD050"                           emits-change
.BOARD_INFO_AM1                     property  s         "V1  "                             emits-change
.BOARD_INFO_AM2                     property  s         "0123456789ABCDE001TAG0000002  " emits-change
.BOARD_INFO_AM3                     property  s         "R1B "                             emits-change
.BOARD_INFO_AM4                     property  s         "XX1 "                             emits-change
.BOARD_INFO_AM5                     property  s         "0E11223344E0"                     emits-change
.BOARD_INFO_AM6                     property  s         "02"                               emits-change
.BOARD_LANGUAGE_CODE                property  s         "0"                                emits-change
.BOARD_MANUFACTURER                 property  s         "Huaqin Telecom  "                 emits-change
.BOARD_MANUFACTURE_DATE             property  s         "1996-07-07 - 10:57:00"            emits-change
.BOARD_PART_NUMBER                  property  s         "NA                  "             emits-change
.BOARD_PRODUCT_NAME                 property  s         "test              "             emits-change
.BOARD_SERIAL_NUMBER                property  s         "3120E33900011X0010            " emits-change



root@sky:/etc/default/obmc/eeproms/system/chassis# echo "24c64 0x50 > /sys/bus/i2c/devices/i2c-3/new_device"
24c64 0x50 > /sys/bus/i2c/devices/i2c-3/new_device
root@sky:/etc/default/obmc/eeproms/system/chassis# busctl tree --no-pager xyz.openbmc_project.EntityManager
Failed to introspect object / of service xyz.openbmc_project.EntityManager: The name is not activatable
No objects discovered.

"


I modified one of the configuration which is in entity-manager/configuration folder, its name is Mt_jade.json, The modification is as below from line 759:
      "Name": "$bus test",
      "Probe": "xyz.openbmc_project.FruDevice({'PRODUCT_PRODUCT_NAME': 'test'})",
        "Type": "Chassis",


Still occurred the above log.



2. According to meta-quanta's commit, I did not find they modify entity-manager/configuration files. And I tried the method, however I can not display them to "ipmitool fru"



"
commit 0de4856d037ff2525b3dd74ce2cbafdd4dcff443
Author: Joseph Fu <joseph.fu@quantatw.com>
Date:   Wed Jan 26 14:37:42 2022 +0800

    meta-quanta: s6q: add fru yaml config files
    
    Add fru setting config and device json file.

"



Could you provide some suggestions?

















At 2022-02-16 03:34:38, "Patrick Williams" <patrick@stwcx.xyz> wrote:
>On Tue, Feb 15, 2022 at 11:13:22AM +0800, damon3000 wrote:
>> Hi All,
>> 
>> I am new to openbmc. I am started porting openbmc features to new hardware.
>> So, I want to add support for FRUID EEPROM. FRUID contents should be available as dbus objects. What changes needs to done in the application side.
>> 
>> Please provide the steps or suggestions to follow.
>
>You should probably look at https://github.com/openbmc/entity-manager and
>existing systems that leverage it.  There is already support for specifying the
>location of your EEPROM and interpreting it / exposing as dbus objects.
>
>'FruDevice' is typically involved in the EEPROM parsing and then there is
>entity-manager JSON that exposes specific EEPROM fields as the Inventory
>object(s).
>
>-- 
>Patrick Williams





 



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

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

end of thread, other threads:[~2022-02-21  5:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-15  3:13 FRU access configuration damon3000
2022-02-15 19:34 ` Patrick Williams
2022-02-17 11:10   ` damon3000
2022-02-18  3:48     ` Zev Weiss
2022-02-18  6:08     ` damon3000

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).