add a new yaml interface definition

Patrick Williams patrick at stwcx.xyz
Tue Jan 5 09:22:15 AEDT 2021


On Mon, Jan 04, 2021 at 09:14:19PM +0000, Mahesh Kurapati wrote:
> Hello,
Hi Mahesh,

> I am trying to expose some of the discrete GPIO signals, and methods to generate audio and visual alarms for our management software.  I will define two new yaml files describing these interfaces.  From the training video I understood that I should use the sbus++ to generate the cpp boilerplate code and make it part of the library.  I will extend my daemon code to implement the actual functionality as explained in the video.  Where I am stuck is on how do I add my yaml files to the phosphor-dbus-interfaces infrastructure?  How to do this in my yocto environment?  Please help.

You can use 'devtool modify phosphor-dbus-interface' to modify it within
a yocto / bitbake environment.  `devtool` is a common tool from Yocto
you can use to modify any recipe's source temporarily in your build
environment.

You should not need to modify sdbusplus itself for this, only
phosphor-dbus-interface.

There is one catch for adding a new interface.  We are using Meson now
and Meson needs to be told how to run `sdbus++` against your YAML to
create all the cpp/hpp parts.  There is a script `gen/regenerate-meson`
to assist with this but it needs to be able to find a copy of `sdbus++`.

What should work is:

   1. `devtool modify phosphor-dbus-interface`
   2. `cd workspace/sources/phosphor-dbus-interface`
   3. `meson subprojects download`
   4. << add your YAML file >>
   5. `gen/regenerate-meson`

The step 3 is the magic which will download sdbusplus into a
subdirectory inside the repository so that `regenerate-meson` finds it.

Let me know if you run into any trouble.

-- 
Patrick Williams
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20210104/40211237/attachment.sig>


More information about the openbmc mailing list