starting phosphor-hwmon with 4.13
Matt Spinler
mspinler at linux.vnet.ibm.com
Fri Mar 2 09:29:42 AEDT 2018
Patrick, others,
With the 4.13 kernel, the OCCs moved out of the device tree. As such,
the udev rule that is currently used to start phosphor-hwmon that starts
the service with the OF_FULLNAME udev attribute will no longer work.
In addition, the systemd capability of using SYSTEMD_WANTS in a udev
rule to start a templated service is something that upstream rejected
(maybe just needs further work?), and we are just carrying as a patch,
so if we can get rid of it that would be a bonus.
So this is what I'm proposing:
Change the udev rule to start and stop hwmon without systemd's help:
SUBSYSTEM=="hwmon", ACTION=="add", RUN="/usr/bin/start_hwmon.sh start
%p $env{OF_FULLNAME}"
SUBSYSTEM=="hwmon", ACTION=="remove", RUN="/usr/bin/start_hwmon.sh stop
%p $env{OF_FULLNAME}"
where start_hwmon.sh does a systemctl start of
xyz.openbmc_project.Hwmon at .service, passing it OF_FULLNAME if it's
there, otherwise a shortened version of the devpath (takes out the hwmon
instance, since that is variable so we can't use it to look up env files).
Then I would just need make a minor modification to phosphor-hwmon to
handle the devpath, and move the OCC config files into a new location in
/etc/default/obmc/hwmon, and nothing else should really need to change.
Please let me know if anyone has any better ideas, or other comments.
More information about the openbmc
mailing list