commit | 25a0f634cd7dd209d58bf326a41d7bfd51a7eda3 | [log] [tgz] |
---|---|---|
author | Chicago Duan <duanzhijia01@inspur.com> | Thu Nov 11 16:32:07 2021 +0800 |
committer | Chicago Duan <duanzhijia01@inspur.com> | Fri Feb 25 00:48:50 2022 +0000 |
tree | baa4f377fd04f8b8620b24b80ff107673e863768 | |
parent | f2744893b77b9dd8903bb13113f4c3ef62c18f04 [diff] |
ADD USB Code Update enable/disable phosphor_usb_code_update is an application that use USB to do FW update. phosphor_usb_code_update service is not a daemon, but an app that will be called after inserting a USB flash disk. This commit creates an object of phosphor_usb_code_update when phosphor_usb_code_update is not started. We can enable/disable phosphor_usb_code_update by setting the "Enabled" property to true/false. Please configure the “usb-code-update” option in your bb/bbappend to enable this feature. For phosphor_usb_code_update, useful rules files is /lib/udev/rules.d/70-bmc-usb.rules. When usb code update is disabled, srvcfg_manager creates an empty symlink /etc/udev/rules.d/70-bmc-usb.rules, which causes /lib/udev/rules.d/70-bmc-usb.rules inoperative. When usb code update is enabled, srvcfg_manager deletes /etc/udev/rules.d/70-bmc-usb.rules. The commits of phosphor_usb_code_update is: https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-bmc-code-mgmt/+/48742/1 Test: get "Enabled" property: busctl get-property xyz.openbmc_project.Control.Service.Manager /xyz/openbmc_project/control/service/phosphor_2dusb_2dcode_2dupdate xyz.openbmc_project.Control.Service.Attributes Enabled b true set "Enabled" property to false: busctl set-property xyz.openbmc_project.Control.Service.Manager /xyz/openbmc_project/control/service/phosphor_2dusb_2dcode_2dupdate xyz.openbmc_project.Control.Service.Attributes Enabled b false busctl get-property xyz.openbmc_project.Control.Service.Manager /xyz/openbmc_project/control/service/phosphor_2dusb_2dcode_2dupdate xyz.openbmc_project.Control.Service.Attributes Enabled b false The "Enabled" property will be persisted,reboot the BMC, then get the "Enabled" property: busctl get-property xyz.openbmc_project.Control.Service.Manager /xyz/openbmc_project/control/service/phosphor_2dusb_2dcode_2dupdate xyz.openbmc_project.Control.Service.Attributes Enabled b false Signed-off-by: Chicago Duan <duanzhijia01@inspur.com> Change-Id: Iba7ffb541628d563e2c54c3e1c8c4dbe85f1507b
The service config manager provides a D-Bus interface to manage BMC services as described by the service management D-Bus interfaces.
The configuration settings are intended to persist across BMC reboots.
An example use case for this service is BMCWeb's implementation of the Redfish NetworkProtocol schema.
Implementation details are described in the D-Bus interface README.
The service config manager generally makes configuration changes to systemd
units via D-Bus interfaces.
The design pattern to add new services or controls is:
Running
and Enabled
properties of a service: