libmctp / libpldm / pldmtool

Ananth, Rajesh rajesh.ananth at smartm.com
Tue Sep 17 01:13:42 AEST 2024


Andrew,

Thank you so much. For people like us who are totally new to this development environment, the "siloed" aspect of information availability has been very difficult to navigate through.

The objective of ours is to use the PLDM and SPDM software tools with the MCTP support in the OpenBMC environment. We are totally new to this development, and hence based on our own research we went with Portwell's PCOMC660 board (for a charge) that came up with their own BB layer added to the OpenBMC source. This source is not in the OpenBMC github but in their own private tree that is forked downstream by them. Our thought was to have somebody who could help us directly, instead of going to a big forum like yours. We had so many new things to navigate through.

We make CXL controller cards, and for them PLDM Type-5 based Firmware update is very critical for our customers. Also, our customers need SPDM support for device authenticity. We want to have a development environment to validate what we build. Without a ready to run stack of MCTP, PLDM (libpldm, pldmtool, pldmresponder), and SPDM, for people like ours to put them all together  is becoming a huge project on its own.

In the downstream Portwell source we have:
1. xys.openbmc_project.mcptd.service is there, but is not discovering any endpoints. We tried over smbus as well as Pcie, as their board as well as our CXL firmware supports MCTP over both the interfaces.
2. Utilities such as  mctp-ast,  mctp-astpcie-test etc., are present.  No PLDM tools are present.

We have been asking the Portwell team to provide them. But we thought, we could do on our own with the delay that was really frustrating.
The documentation for OpenBMC support for PLDM, MCTP and SPDM, all refer to the full stack that is based on Linux  (the one you explained in your earlier email) and we went with integrating them in our source. That was a disaster as we just couldn't bake the recipe files properly (running in circle reference). The AF_MCTP reference that you mentioned was something we didn't know that existed at all.



Thanks,
Rajesh

Hi Rajesh,

In the future can you please make sure to reply-all? This way the list continues to be included on the conversation. It's important that the conversation remain public, as other people might have problems similar to yours, and having the conversation visible means they too can resolve their issues.

On Fri, 2024-09-13 at 14:31 +0000, Ananth, Rajesh wrote:
> Andrew,
>
> Thanks for the pointers.
>
> I was running around in circles trying to figure out ways to integrate
> the pldm tool chain. It has been a learning process by looking at
> different kinds of documentation. :-)

Can you elaborate on this? What documentation did you read and in what ways was it unhelpful? These are things we can fix, so it's important to identify where you got stuck.

Andrew


-----Original Message-----
From: Andrew Jeffery <andrew at codeconstruct.com.au>
Sent: Thursday, September 12, 2024 6:28 PM
To: Ananth, Rajesh <rajesh.ananth at smartm.com>; openbmc at lists.ozlabs.org
Subject: Re: libmctp / libpldm / pldmtool

SMART Modular Security Checkpoint: External email. Please make sure you trust this source before clicking links or opening attachments.

Hello,

On Thu, 2024-09-12 at 19:48 +0000, Ananth, Rajesh wrote:
> Hi,
>
> After I do the "bitbake obmc-phosphor-image"  I am not able to see "libmctp / libpldm / pldmtool" getting installed.
>
> I do see that these are present under "meta-phosphor/recipes-phosphor".

Unfortunately, just because the recipes exist, does not mean that the libraries/tools will appear in your rootfs. Some work is required to have them included in your build.

>
> In my build environment, I see these:
>
> rajesh at bld-ub20s-openbmc:~/openbmc-portwell/openbmc-pcomc660-v2.2.0/bu
> ild/pcomc660-ast2600$ find . -name pldmtool

This platform doesn't appear to be upstream so we don't really have any information on how it's configured and whether the artefacts should be included.

> ./tmp/deploy/licenses/pldmtool
> ./tmp/deploy/licenses/armv7ahf-vfpv4d16/pldmtool
> ./tmp/log/cleanlogs/pldmtool
> ./tmp/stamps/armv7ahf-vfpv4d16-openbmc-linux-gnueabi/pldmtool
> ./tmp/work/armv7ahf-vfpv4d16-openbmc-linux-gnueabi/pldmtool
> ./tmp/work/armv7ahf-vfpv4d16-openbmc-linux-gnueabi/pldmtool/1.0/licens
> e-destdir/pldmtool
> ./tmp/work/armv7ahf-vfpv4d16-openbmc-linux-gnueabi/pldmtool/1.0/licens
> e-destdir/armv7ahf-vfpv4d16/pldmtool
>
> In my build environment, I expected something under ".../bin/". The bb files are as is from the openbmc git.
> In the package generated, I am not seeing the pldmtool and the other associated libraries installed. Am I doing something wrong?

Likely :)

A further point is that libmctp is very likely not what you need. It's an implementation of a full MCTP stack, which can either run in hosted
(userspace) or freestanding software (firmware, operating systems, etc). While OpenBMC has historically used libmctp, it is considered legacy for OpenBMC purposes, and you should use the AF_MCTP sockets provided by Linux instead.

You can find more information on the Linux MCTP stack here:

https://codeconstruct.com.au/docs/mctp-on-linux-introduction/

libpldm and OpenBMC's PLDM daemon together use the AF_MCTP socket transport for Linux, and this is the supported way to implement MCTP and PLDM in OpenBMC.

You can integrate the supported MCTP and PLDM stack into your image by adding `require conf/distro/include/pldm.inc` to your platform's bitbake configuration.

Andrew


More information about the openbmc mailing list