How to integrate new libraray in openbmc

Joseph Reynolds jrey at linux.ibm.com
Fri Nov 6 10:00:48 AEDT 2020


On 11/5/20 10:45 AM, Ed Tanous wrote:
> On Thu, Nov 5, 2020 at 2:49 AM khader basha shaik ...
> This Message Is From an External Sender
> This message came from outside your organization.
>
>
>
> On Thu, Nov 5, 2020 at 2:49 AM khader basha shaik 
> <shaikkhaderbasha601 at gmail.com <mailto:shaikkhaderbasha601 at gmail.com>> 
> wrote:
>
>     Hi Team,
>
>     I have a custom library and need to integrate it with openbmc.The
>     library provides various output related to system information.
>     I need this information to show up in phosphor-webUI.
>
>     In my understanding we need to register it with dbus interface.
>     So I need to integrate my custom library with dbus.
>
>     But I do not have much information about where to start?
>
>
>     Any help or information on this would be really helpful.
>
>
>
> If you point us to the code for the library you're wanting to 
> integrate, as well as what you're hoping to see as a result we can 
> probably give you better advice.  As is, your request is quite vague, 
> and I'm personally finding it very hard to answer with non-generic 
> advice.  The openbmc documentation is a pretty good place to start in 
> your case. Once you have some handle on it, put the code up somewhere 
> that we can see it, and we'll be able to give you more specific advice 
> on where to go from there.
>
> -Ed

Welcome!

I assume you saw the [contributing][] guide.  Have you seen the 
[development tutorials][]?

Are you asking about OpenBMC's internal architecture?  The layers are:
   Web user <--> Web application <--> Web Server (BMCWeb) <--> D-Bus 
interfaces <--> your new service

The way I understand your new function, some of the basic technical 
steps to create your interface include:
1. Create your new service.  Create new [D-Bus interfaces][] to model 
your service.  Expose all of your "library functions" as D-Bus 
interfaces.  See the [hello world tutorial][] as an example of the 
development process.
2. Enhance [BMCWeb][].  Create new REST APIs and map them to your new 
D-Bus interfaces.
3. Enhance the web application to allow web users to use your new 
functions.  Invoke your new REST APIs as needed.  Have you seen the new 
[webui-vue][]?

For example, you should be trace the functions in the tutorial through 
D-Bus interfaces to BMCWeb to REST APIs to the web application.

But before you do any of this: please consider the project's advice for 
[planning changes][].

- Joseph

[contributing]: https://github.com/openbmc/docs/blob/master/CONTRIBUTING.md
[development tutorials]: 
https://github.com/openbmc/docs/blob/master/development
[D-Bus interfaces]: https://github.com/openbmc/phosphor-dbus-interfaces
[hello world tutorial]: 
https://github.com/openbmc/docs/blob/master/development/sdk-hello-world.md
[OpenBMC interfaces]: 
https://github.com/openbmc/docs/blob/master/architecture/interface-overview.md
[BMCWeb]: https://github.com/openbmc/bmcweb
[webui-vue]: https://github.com/openbmc/webui-vue
[planning changes]: 
https://github.com/openbmc/docs/blob/master/CONTRIBUTING.md#planning-changes


More information about the openbmc mailing list