openbmc Digest, Vol 30, Issue 51
James Feist
james.feist at linux.intel.com
Sat Mar 3 05:10:44 AEDT 2018
Hi Guhan,
I don't believe there is a way to do this today, but I have posted an
RFC to dynamically collect the SDR info from dbus that you might be
interested here: https://gerrit.openbmc-project.xyz/#/c/8521/
The ipmi maintainers I believe like this approach and plan on moving
towards this once this code is integrated into the current ipmi libraries.
Thanks,
James
On 03/01/2018 05:49 PM, guhan balasubramanian wrote:
> Hi,
>
> Currently in the IPMID (net and host) shared libraries, SDR and sensor
> ipmi commands are addressed by querying the "IdInfoMap" data structure
> (sensorhandler.cpp). This data structure is being filled up using
> phosphor-sensor-inventory/config.yaml, during build time (as mentioned
> by Patrick and Lei).
>
> Assuming that we are not able to pre-fill the config yaml, is there a
> way in the current implementation, where we can add sensors to this
> sensors "IdInfoMap" data structure dynamically during run time?
>
> Thanks,
> Guhan
>
> Date: Wed, 14 Feb 2018 10:36:23 -0800
> From: Patrick Venture <venture at google.com <mailto:venture at google.com>>
> To: Lei YU <mine260309 at gmail.com <mailto:mine260309 at gmail.com>>
> Cc: "Sachin Naik (sachnaik)" <sachnaik at cisco.com
> <mailto:sachnaik at cisco.com>>,
> "openbmc at lists.ozlabs.org
> <mailto:openbmc at lists.ozlabs.org>" <openbmc at lists.ozlabs.org
> <mailto:openbmc at lists.ozlabs.org>>
> Subject: Re: Porting hwmon sensors to openBMC
> Message-ID:
>
> <CAO=notwMecK=GhvVUtgeVUZFV38K71Q5SSF0TeCS0CxY2W+axw at mail.gmail.com
> <mailto:GhvVUtgeVUZFV38K71Q5SSF0TeCS0CxY2W%2Baxw at mail.gmail.com>>
> Content-Type: text/plain; charset="UTF-8"
>
> Lei is correct. If you want, however, to read the sensors over IPMI
> you'll need to add a yaml configuration for the sensors as well for
> phosphor-host-ipmid.
> See
> https://github.com/openbmc/openbmc/blob/master/meta-openbmc-machines/meta-x86/meta-quanta/meta-q71l/recipes-phosphor/ipmi/q71l-ipmi-sensor-map/config.yaml
> <https://github.com/openbmc/openbmc/blob/master/meta-openbmc-machines/meta-x86/meta-quanta/meta-q71l/recipes-phosphor/ipmi/q71l-ipmi-sensor-map/config.yaml>
> for an example.
>
> On Tue, Jan 23, 2018 at 11:04 PM, Lei YU <mine260309 at gmail.com
> <mailto:mine260309 at gmail.com>> wrote:
> > On Tue, Jan 23, 2018 at 3:33 PM, Sachin Naik (sachnaik)
> > <sachnaik at cisco.com <mailto:sachnaik at cisco.com>> wrote:
> >> Hi All
> >>
> >> I am porting a new board to openbmc.
> >> I have question on mapping hwmon type sensors to Dbus
> >>
> >> So far I have created machine layer and added U-boot config,
> Kernel config and device tree. In kernel config I have enabled lm75
> hwmon driver for LM75 temperature device. Corresponding entry added
> in device tree.
> >>
> >> Right now I have created hwmon temperature sensors entry in our
> machine layer by extending
> recipes-phosphor/sensors/phosphor-hwmon%.bbappend
> >> and created conf file with temperature sensors label.
> >>
> >> Now my question is how do implement/map dbus temperature sensor
> value interface to our hwmon temperature sensors? Is above
> implementation is enough or it requires
> >> Some mapping for dbus to hwmon instance?
> >
> > After you added config files for the temperature sensors with
> > phosphor-hwmon%.bbappend, phosphor-hwmon will read from
> > hwmon instance and create dbus objects at
> > /xyz/openbmc_project/sensors/, which will at least have "Value",
> > “Scale" and "Unit" properties.
> >
> > I do not think it requires other configs, unless I misunderstand
> > your case?
> >
> >>
> >> Thanks and regards
> >> Sachin
> >>
> >>
>
More information about the openbmc
mailing list