commit | d46d081895ada3ab411996dc3a681f796f4a0926 | [log] [tgz] |
---|---|---|
author | Anton D. Kachalov <gmouse@google.com> | Wed Feb 03 23:25:37 2021 +0100 |
committer | Anton D. Kachalov <gmouse@google.com> | Fri May 07 00:30:03 2021 +0200 |
tree | fc6e6f13af0b8da88fcd22f3edbce35fc252cdd1 | |
parent | 5b520cf494ad65be2d336f60ee622efc456c2e3f [diff] |
Add sensor instance id command line argument. Introduce `-i|--sensor-id` flag to explicitly set sensor suffix for dbus name. Sample usage: phosphor-hwmon-readd -i test_sensor_id -o /apb/... Will register the service with the following busname: xyz.openbmc_project.Hwmon-test_sensor_id.Hwmon1 This change required as a part of privilege separation work: https://github.com/openbmc/openbmc/issues/3383 Signed-off-by: Anton D. Kachalov <gmouse@google.com> Change-Id: I48ff9c3efe0edb84718ff8f695e7e932af5445de
Exposes generic hwmon entries as DBus objects. More information can be found at Sensor Architecture
To build this package, do the following steps: 1. meson build 2. ninja -C build To clean the repository run `rm -rf build`.
To enable the use of Linux features like cgroups prioritization and udev/systemd control, one instance of phosphor-hwmon is intended to be run per hwmon sysfs class instance. This requires an algorithm for selecting a stable, well-known D-Bus busname. The algorithm is <PREFIX>-<ID>.Hwmon<N> where PREFIX is an autoconf configurable prefix (BUSNAME_PREFIX, xyz.openbmc_project by default), ID is either a std::hash of the /sys/devices path backing the hwmon class instance or provided suffix value from the command line, and N is the implemented phosphor-hwmon D-Bus API version.