1.说明
openbmc
是基于systemd
的,dbus
的实现是在systemd
。对于用户(app
)使用来说,用的是sd-bus
相关接口,即lib
库,它也是在systemd
中已有提供。
总体而言,openbmc
做了一个sdbusplus
的c++ binding
,然后该binding
使用的是systemd
提供的函数接口等。systemd
的源码可以参考https://github.com/systemd/systemd. binding
简单理解就是c++
调用c
,其他c++
应用程序直接调用binding
函数,即是c++
层的库。
可以在https://en.wikipedia.org/wiki/D-Bus
中找到相关描述:
备注:openbmc 有关dbus的资料:
- 1.https://dbus.freedesktop.org/doc/dbus-specification.html
- 2.https://0pointer.net/blog/the-new-sd-bus-api-of-systemd.html
- 3.https://github.com/systemd/systemd
- 4.接口
api
:https://github.com/systemd/systemd/blob/main/src/systemd/sd-bus.h - 5.
openbmc
实现的sdbus c++ binding
: https://github.com/openbmc/sdbusplus
总体而言,对于开发openbmc
,可以先看d-bus
的基本概念,然后基于此,知道openbmc
用到systemd
和c++ binding
就差不多了。