<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<span style="font-family: "Segoe UI Web (West European)", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif; font-size: 14.6667px; display: inline !important; background-color: rgb(255, 255, 255);" class="ContentPasted0">"you </span><span style="font-family: "Segoe UI Web (West European)", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif; font-size: 14.6667px; display: inline !important; background-color: rgb(255, 255, 255);" class="ContentPasted0">will
get there only devices that actually have I2C EEPROMs with FRU</span><br style="font-family: "Segoe UI Web (West European)", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif; font-size: 14.6667px; background-color: rgb(255, 255, 255);" class="ContentPasted0">
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<span style="font-family: "Segoe UI Web (West European)", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif; font-size: 14.6667px; display: inline !important; background-color: rgb(255, 255, 255);" class="ContentPasted0">data
written."</span><br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<span style="font-family: "Segoe UI Web (West European)", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif; font-size: 14.6667px; display: inline !important; background-color: rgb(255, 255, 255);" class="ContentPasted0"><br>
</span></div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<span style="font-family: "Segoe UI Web (West European)", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif; font-size: 14.6667px; display: inline !important; background-color: rgb(255, 255, 255);" class="ContentPasted0"><span style="display: inline !important; background-color: rgb(255, 255, 255);" class="ContentPasted1">Hi,
Andrei,</span><br>
</span></div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<span style="font-family: "Segoe UI Web (West European)", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif; font-size: 14.6667px; display: inline !important; background-color: rgb(255, 255, 255);" class="ContentPasted0">I
tried to port ethanolx to my board. It uses YAML to set the FRU information. But I can not see the list, either in dbus entity manager, or ipmitool fru list. I traced back the mail list and get an old thread.</span></div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
My question:</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<ol data-editing-info="{"orderedStyleType":1,"unorderedStyleType":1}" data-listchain="__List_Chain_69">
<li style="list-style-type: "1. ";"><span>Do I need to add information to the EEPROM to make dbus contain Fru? If yes, how is the fru.bin generated? </span></li><li style="list-style-type: "2. ";">Do I need to porting ipmi-intel-oem to make "ipmitool fru list" contain fru?</li></ol>
<div>Thanks.</div>
<div><br>
</div>
<div>Zheng</div>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<span style="font-family: "Segoe UI Web (West European)", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif; font-size: 14.6667px; display: inline !important; background-color: rgb(255, 255, 255);" class="ContentPasted0"><br>
</span></div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<span style="font-family: "Segoe UI Web (West European)", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif; font-size: 14.6667px; display: inline !important; background-color: rgb(255, 255, 255);" class="ContentPasted0"></span></div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<span style="font-family: "Segoe UI Web (West European)", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif; font-size: 14.6667px; display: inline !important; background-color: rgb(255, 255, 255);" class="ContentPasted0"><br>
</span></div>
<div id="appendonsend"></div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size: 11pt; color: rgb(0, 0, 0);"><b>From:</b> openbmc <openbmc-bounces+fishbaoz=hotmail.com@lists.ozlabs.org> on behalf of Andrei Kartashev <a.kartashev@yadro.com><br>
<b>Sent:</b> Wednesday, September 9, 2020 8:31 AM<br>
<b>To:</b> Jiandi An <jan@nvidia.com><br>
<b>Cc:</b> OpenBMC Maillist <openbmc@lists.ozlabs.org><br>
<b>Subject:</b> Re: OpenBMC - FRU inventory with Entity Manager</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt">
<div class="PlainText"><br>
> > <br>
> > At least it'll be there for the next person.<br>
> <br>
> Line 72 of the doc says the 3rd component to entity-manager is the<br>
> reactor.<br>
> It mentions one example is dbus-sensors, which contains a suite of<br>
> application that<br>
> input the Exposes records for sensor devices, then connect to the<br>
> filesystem to create<br>
> the sensors and scan loops to scan sensors for those devices.<br>
> <br>
> Could someone point a sample code that a platform is doing the flow<br>
> described above?<br>
> <br>
> For example after enable entity-manager and put in the device tree<br>
> for temp sensors<br>
> and FRU EEPROM devices, and the Exposes, probe config blocks in the<br>
> json file, still<br>
> struggling to get ipmitool sensor list and ipmitool fru to<br>
> work. "ipmitool fru" issue is<br>
> clear based on the feedback in this thread. But really want to have<br>
> a tutorial or code<br>
> example to walk through to understand the reactor side of things.<br>
> <br>
<br>
This reactors are just a services that are expected to read their<br>
configuration from dbus. EM expose something to dbus and then these<br>
services are read what they need.<br>
<br>
> > > Another thing I would like to have is even more high- level<br>
> > > document <br>
> > > describing the common architecture of EM-based inventory.<br>
> > > I can start with some drafts of what I dig, to make it more<br>
> > > clear.<br>
> <br>
> Really appreciate for this type of document if they are<br>
> available. We are adopting<br>
> entity-manager in our proof-of-concept project but really struggling<br>
> to find detailed<br>
> documentation and end up just copying and pasting existing entity<br>
> manager json<br>
> config files and tweaking them.<br>
> The two links we follow kind of as bibles for entity manager doesn't<br>
> provide a detail guide<br>
> for example in the json config file, what each field means and how<br>
> that field is being<br>
> consumed, causes what to be created on the d-bus side, and being<br>
> consumed by what reactor.<br>
> <br>
> <a href="https://github.com/openbmc/entity-manager/blob/master/docs/my_first_sensors.md" data-auth="NotApplicable">
https://github.com/openbmc/entity-manager/blob/master/docs/my_first_sensors.md</a><br>
> <a href="https://github.com/openbmc/entity-manager/blob/master/README.md" data-auth="NotApplicable">
https://github.com/openbmc/entity-manager/blob/master/README.md</a><br>
> <br>
> For example for sensors with entity manager do we still need the IPMI<br>
> YAML<br>
> configuration file described here?<br>
> <a href="https://github.com/openbmc/docs/blob/master/architecture/sensor-architecture.md#defining-sensors-in-an-ipmi-yaml-configuration-file" data-auth="NotApplicable">
https://github.com/openbmc/docs/blob/master/architecture/sensor-architecture.md#defining-sensors-in-an-ipmi-yaml-configuration-file</a><br>
> <a href="https://github.com/openbmc/phosphor-host-ipmid/blob/master/scripts/sensor-example.yaml" data-auth="NotApplicable">
https://github.com/openbmc/phosphor-host-ipmid/blob/master/scripts/sensor-example.yaml</a><br>
> <br>
> For FRUs, for example do we still need <br>
> <a href="https://github.com/ibm-openbmc/openbmc/blob/OP940/meta-ibm/meta-romulus/recipes-phosphor/configuration/romulus-yaml-config/romulus-ipmi-fru.yaml" data-auth="NotApplicable">
https://github.com/ibm-openbmc/openbmc/blob/OP940/meta-ibm/meta-romulus/recipes-phosphor/configuration/romulus-yaml-config/romulus-ipmi-fru.yaml</a><br>
> <br>
> Because I found out when doing "ipmitool fru" it always goes off of<br>
> the default Builtin FRU Device ID 0, dimm0 ID1, dimm1 ID2, cpu0 ID 3,<br>
> and cpu1 ID 4. <br>
> $ ipmitool -I lanplus -H $BMC_IP -U root -P 0penBmc -C 17 fru<br>
> FRU Device Description : Builtin FRU Device (ID 0)<br>
> Device not present (Unspecified error)<br>
> <br>
> FRU Device Description : dimm0 (ID 1)<br>
> Device not present (Unspecified error)<br>
> <br>
> FRU Device Description : dimm1 (ID 2)<br>
> Device not present (Unspecified error)<br>
> <br>
> FRU Device Description : cpu0 (ID 3)<br>
> Device not present (Unspecified error)<br>
> <br>
> FRU Device Description : cpu1 (ID 4)<br>
> Device not present (Unspecified error)<br>
> <br>
> And that's because <br>
> <a href="https://github.com/openbmc/phosphor-host-ipmid/blob/master/scripts/fru_gen.py" data-auth="NotApplicable">
https://github.com/openbmc/phosphor-host-ipmid/blob/master/scripts/fru_gen.py</a><br>
> always<br>
> taking <br>
> <a href="https://github.com/openbmc/phosphor-host-ipmid/blob/master/scripts/fru-read-example.yaml" data-auth="NotApplicable">
https://github.com/openbmc/phosphor-host-ipmid/blob/master/scripts/fru-read-example.yaml</a><br>
> from the as the default fru inventory yaml config.<br>
> unless custom fru yaml like the above is specified.<br>
> <br>
> Even after porting over intel-ipmi-oem or fb-ipmi-oem's oem command<br>
> fru handler for entity manager,<br>
> still has the above behavior when doing "ipmitool fru". Just really<br>
> trying to look for a high level flow<br>
> of the reactor side under entity manager, sensor and fru to begin<br>
> with.<br>
> <br>
> In porting intel-ipmi-oem's fru command handler for entity-manager,<br>
> first phosphor-ipmid-host.service<br>
> would coredump. Debugged it to be the startMatch() in<br>
> registerStorageFunctions() where it's calling<br>
> boost::asio::spawn with replaceCacheFru()<br>
> <a href="https://github.com/openbmc/intel-ipmi-oem/blob/master/src/storagecommands.cpp#L1311" data-auth="NotApplicable">
https://github.com/openbmc/intel-ipmi-oem/blob/master/src/storagecommands.cpp#L1311</a><br>
> <a href="https://github.com/openbmc/intel-ipmi-oem/blob/master/src/storagecommands.cpp#L361" data-auth="NotApplicable">
https://github.com/openbmc/intel-ipmi-oem/blob/master/src/storagecommands.cpp#L361</a><br>
> <br>
> So switched to fb-ipmi-oem's implementation which doesn't do the<br>
> replaceCacheFru with<br>
> the async handler.<br>
> <a href="https://github.com/openbmc/fb-ipmi-oem/blob/master/src/storagecommands.cpp#L185" data-auth="NotApplicable">
https://github.com/openbmc/fb-ipmi-oem/blob/master/src/storagecommands.cpp#L185</a><br>
> But still "ipmi fru" would still display the default Builtin FRU<br>
> Device ID 0, dimm0 ID1, dimm1 ID2, cpu0 ID 3, and cpu1 ID 4. <br>
> <br>
> So I guess need to go back and really understand the reactor side<br>
> under entity-manager<br>
> and how the d-bus objects are created by the entity-manager and how<br>
> they are consumed<br>
> by the reactors for each components (sensors, fru, etc.) Any<br>
> documentation on that will be so<br>
> helpful as a new adopter of entity-manager trying to dig in on what<br>
> different pieces need to line<br>
> up when switching to entity-manager.<br>
<br>
<br>
You don't need any YAML files when you use EM. However to get ipmitool<br>
fru list to work you need to replace ipmi command handlers by that from<br>
intel-ipmi-oem. If you have output like you show, then you probably<br>
make something wrong and you still have default handlers from phosphor-<br>
ipmid-host.<br>
Reactors are not related to what you see in fru list. They will<br>
construct sensors list, setup some parts of the system and so on, but<br>
fru list in the new model is only defined by FruDevice service: you<br>
will get there only devices that actually have I2C EEPROMs with FRU<br>
data written.<br>
<br>
<br>
</div>
</span></font></div>
</body>
</html>