Skip to contentSkip to conversation

IPMI implementation of Get Device ID command

DISCUSSION TOM JOSEPH 4 participants 9 messages Aug 14, 2020 – Sep 1, 2020

lore
Share & tools
lore

TOM JOSEPH

author
#0 lore raw

Hello,

We have an implementation of this command https://github.com/openbmc/phosphor-host-ipmid/blob/master/apphandler.cpp#L571 . The current version of the code derives the major and minor firmware revision from the VERSION_ID field, and the auxiliary firmware revision is picked from dev_id.json. The auxiliary firmware revision is populated at build time https://github.com/openbmc/openbmc/blob/master/meta-ibm/recipes-phosphor/ipmi/phosphor-ipmi-config.bbappend.

The implementation of the code is obsolete, as it was based on an earlier format. The current format of VERSION_ID for example is, 2.9.0-dev-609-g56f86d23c. There is already a WIP patch to fix this for the master tag format https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-host-ipmid/+/33893. <https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-host-ipmid/+/33893>

IBM tagging format is different from the tag format of master builds. One choice is to have the major and minor version added to the dev_id.json and if the format of VERSION_ID does not match the master tag format,  pick from the json.

How are other companies converting their arbitrary tag formats to IPMI firmware revision fields? Does every company maintain their own downstream implementation of this command?

Is a common code possible for converting arbitrary tag formats to IPMI firmware revision fields?

Regards,
Tom

#1 lore raw
Quoted 3 lines · TOM JOSEPH

How are other companies converting their arbitrary tag formats to IPMI firmware revision fields? Does every company maintain their own downstream implementation of this command?

I'm not sure if this is helpful but our current tagging format is:

v<year>.<week>.<patch> - ex. v2020.33.0

I don't think we have code now that creates this field from the tagging though.

Signature · 1 line
Patrick Williams
#2 lore raw
In reply to TOM JOSEPH
Quoted 10 lines · TOM JOSEPH

Hello,

We have an implementation of this command https://github.com/openbmc/phosphor-host-ipmid/blob/master/apphandler.cpp#L571 . The current version of the code derives the major and minor firmware revision from the VERSION_ID field, and the auxiliary firmware revision is picked from dev_id.json. The auxiliary firmware revision is populated at build time https://github.com/openbmc/openbmc/blob/master/meta-ibm/recipes-phosphor/ipmi/phosphor-ipmi-config.bbappend.

The implementation of the code is obsolete, as it was based on an earlier format. The current format of VERSION_ID for example is, 2.9.0-dev-609-g56f86d23c. There is already a WIP patch to fix this for the master tag format https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-host-ipmid/+/33893.

IBM tagging format is different from the tag format of master builds. One choice is to have the major and minor version added to the dev_id.json and if the format of VERSION_ID does not match the master tag format, pick from the json.

How are other companies converting their arbitrary tag formats to IPMI firmware revision fields? Does every company maintain their own downstream implementation of this command?

Google currently maintains a downstream implementation of this command based on parsing the DISTRO_VERSION in VERSION_ID directly from /etc/os-release. We set this using an environment variable at build time rather than with a git tag.

We also export 4 version points, with the last two being set in the aux version info.

Quoted 1 line

Is a common code possible for converting arbitrary tag formats to IPMI firmware revision fields?

We'd definitely be interested in finding a common solution, or at least one that's easier for us to customize downstream or in meta-google.

Quoted 5 lines

Regards,
Tom

#3 lore raw
In reply to TOM JOSEPH
Quoted 10 lines · TOM JOSEPH

Hello,

We have an implementation of this command https://github.com/openbmc/phosphor-host-ipmid/blob/master/apphandler.cpp#L571 . The current version of the code derives the major and minor firmware revision from the VERSION_ID field, and the auxiliary firmware revision is picked from dev_id.json. The auxiliary firmware revision is populated at build time https://github.com/openbmc/openbmc/blob/master/meta-ibm/recipes-phosphor/ipmi/phosphor-ipmi-config.bbappend.

The implementation of the code is obsolete, as it was based on an earlier format. The current format of VERSION_ID for example is, 2.9.0-dev-609-g56f86d23c. There is already a WIP patch to fix this for the master tag format https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-host-ipmid/+/33893. <https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-host-ipmid/+/33893>

IBM tagging format is different from the tag format of master builds. One choice is to have the major and minor version added to the dev_id.json and if the format of VERSION_ID does not match the master tag format,  pick from the json.

How are other companies converting their arbitrary tag formats to IPMI firmware revision fields? Does every company maintain their own downstream implementation of this command?

We have a two-hash version scheme (one for openbmc, the other for the downstream meta-intel layer) that looks something like wht-0.2-3-gab3500-38384ac. We override the Get Device ID command
https://github.com/openbmc/intel-ipmi-oem/blob/master/src/appcommands.cpp#L200
to expose part of both of those hashes in the aux bytes. But to get the full version string, we use redfish.

Quoted 1 line

Is a common code possible for converting arbitrary tag formats to IPMI firmware revision fields?

Not that I am aware of. I think this leads to lots of string parsing.

--Vernon

author
#4 lore raw

Hello,

Thanks for the response on this. Every company seems to have a different version scheme and the parsing might not fit into upstream implementation of the Get Device ID command.

My proposal is to add major and minor version to the dev_id.json and this can be populated in the meta-xxx layer (something like this https://github.com/openbmc/openbmc/blob/master/meta-ibm/recipes-phosphor/ipmi/phosphor-ipmi-config.bbappend). If the format of the VERSION_ID does not match the master tag format, then major and minor version will be picked from the dev_id.json. With this approach every company can share the upstream implementation of the command. Thoughts?

Regards,
Tom

Quoted 22 lines · Vernon
Quoted 11 lines · TOM JOSEPH

Hello,

We have an implementation of this command https://github.com/openbmc/phosphor-host-ipmid/blob/master/apphandler.cpp#L571 . The current version of the code derives the major and minor firmware revision from the VERSION_ID field, and the auxiliary firmware revision is picked from dev_id.json. The auxiliary firmware revision is populated at build time https://github.com/openbmc/openbmc/blob/master/meta-ibm/recipes-phosphor/ipmi/phosphor-ipmi-config.bbappend.

The implementation of the code is obsolete, as it was based on an earlier format. The current format of VERSION_ID for example is, 2.9.0-dev-609-g56f86d23c. There is already a WIP patch to fix this for the master tag format https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-host-ipmid/+/33893. <https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-host-ipmid/+/33893>

IBM tagging format is different from the tag format of master builds. One choice is to have the major and minor version added to the dev_id.json and if the format of VERSION_ID does not match the master tag format,  pick from the json.

How are other companies converting their arbitrary tag formats to IPMI firmware revision fields? Does every company maintain their own downstream implementation of this command?

We have a two-hash version scheme (one for openbmc, the other for the downstream meta-intel layer) that looks something like wht-0.2-3-gab3500-38384ac. We override the Get Device ID command
https://github.com/openbmc/intel-ipmi-oem/blob/master/src/appcommands.cpp#L200

to expose part of both of those hashes in the aux bytes. But to get the full version string, we use redfish.

Quoted 1 line

Is a common code possible for converting arbitrary tag formats to IPMI firmware revision fields?

Not that I am aware of. I think this leads to lots of string parsing.

--Vernon

#5 lore raw
Quoted 7 lines · TOM JOSEPH

Hello,

Thanks for the response on this. Every company seems to have a different version scheme and the parsing might not fit into upstream implementation of the Get Device ID command.

Quoted 7 lines

My proposal is to add major and minor version to the dev_id.json and this can be populated in the meta-xxx layer (something like this
https://github.com/openbmc/openbmc/blob/master/meta-ibm/recipes-phosphor/ipmi/phosphor-ipmi-config.bbappend).
If the format of the VERSION_ID does not match the master tag format, then major and minor version will be picked from the dev_id.json. With this approach every company can share the upstream implementation of the command. Thoughts?

That approach sounds good to me.

Quoted 47 lines

Regards,
Tom

Quoted 42 lines · Vernon
Quoted 18 lines · TOM JOSEPH

Hello,

We have an implementation of this command
https://github.com/openbmc/phosphor-host-ipmid/blob/master/apphandler.cpp#L571
. The current version of the code derives the major and minor firmware revision from the VERSION_ID field, and the auxiliary firmware revision is picked from dev_id.json. The auxiliary firmware revision is populated at build time
https://github.com/openbmc/openbmc/blob/master/meta-ibm/recipes-phosphor/ipmi/phosphor-ipmi-config.bbappend.

The implementation of the code is obsolete, as it was based on an earlier format. The current format of VERSION_ID for example is, 2.9.0-dev-609-g56f86d23c. There is already a WIP patch to fix this for the master tag format
https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-host-ipmid/+/33893.
<https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-host-ipmid/+/33893>

Quoted 9 lines

IBM tagging format is different from the tag format of master builds. One choice is to have the major and minor version added to the dev_id.json and if the format of VERSION_ID does not match the master tag format, pick from the json.

How are other companies converting their arbitrary tag formats to IPMI firmware revision fields? Does every company maintain their own downstream implementation of this command?

We have a two-hash version scheme (one for openbmc, the other for the downstream meta-intel layer) that looks something like wht-0.2-3-gab3500-38384ac. We override the Get Device ID command
https://github.com/openbmc/intel-ipmi-oem/blob/master/src/appcommands.cpp#L200

to expose part of both of those hashes in the aux bytes. But to get the full version string, we use redfish.

Quoted 2 lines

Is a common code possible for converting arbitrary tag formats to IPMI firmware revision fields?

Not that I am aware of. I think this leads to lots of string parsing.

--Vernon

#6 lore raw
In reply to TOM JOSEPH
Quoted 7 lines · TOM JOSEPH

My proposal is to add major and minor version to the dev_id.json and this can be populated in the meta-xxx layer (something like this
https://github.com/openbmc/openbmc/blob/master/meta-ibm/recipes-phosphor/ipmi/phosphor-ipmi-config.bbappend).
If the format of the VERSION_ID does not match the master tag format, then major and minor version will be picked from the dev_id.json. With this approach every company can share the upstream implementation of the command. Thoughts?

Hi Tom,

Would you be able to work out an example where the git-describe is used to create this, similar to what we do with os-release? I think this is going to be the typical use case and we had a huge trouble getting os-release to be done "correctly" at the beginning. I think having a well-tested example to copy from should limit the issues others will have in trying to implement their own.

Signature · 1 line
Patrick Williams
author
#7 lore raw

Hello Patrick,

For translating IBM firmware revision to IPMI firmware version, the plan is to continue using VERSION_ID in os-release. This translation is obsolete (https://github.com/openbmc/openbmc/blob/master/meta-ibm/recipes-phosphor/ipmi/phosphor-ipmi-config.bbappend), but I will update this to handle the major and minor firmware revision. I will work on pushing a patch for that.

Regards,
Tom

Quoted 17 lines · Patrick Williams
Quoted 7 lines · TOM JOSEPH

My proposal is to add major and minor version to the dev_id.json and this can be populated in the meta-xxx layer (something like this
https://github.com/openbmc/openbmc/blob/master/meta-ibm/recipes-phosphor/ipmi/phosphor-ipmi-config.bbappend).
If the format of the VERSION_ID does not match the master tag format, then major and minor version will be picked from the dev_id.json. With this approach every company can share the upstream implementation of the command. Thoughts?

Hi Tom,

Would you be able to work out an example where the git-describe is used to create this, similar to what we do with os-release? I think this is going to be the typical use case and we had a huge trouble getting os-release to be done "correctly" at the beginning. I think having a well-tested example to copy from should limit the issues others will have in trying to implement their own.

#8 lore raw
Quoted 6 lines · TOM JOSEPH

For translating IBM firmware revision to IPMI firmware version, the plan is to continue using VERSION_ID in os-release. This translation is obsolete
(https://github.com/openbmc/openbmc/blob/master/meta-ibm/recipes-phosphor/ipmi/phosphor-ipmi-config.bbappend),
but I will update this to handle the major and minor firmware revision. I will work on pushing a patch for that.

Sounds good, thanks. I just wanted to make sure there was an example to point people to that did what was being suggested. Looks like this .bbappend is it.

Signature · 1 line
Patrick Williams