commit | 8ccc653ef5add92b874664188e6333d5d486740f | [log] [tgz] |
---|---|---|
author | Lei YU <mine260309@gmail.com> | Mon Dec 23 17:15:25 2019 +0800 |
committer | Lei YU <mine260309@gmail.com> | Mon Dec 23 17:33:42 2019 +0800 |
tree | 140995d4d639ba853595b2b037122f6d4d193787 | |
parent | 99ac18a7cb8b0077d0ecac54f126e01c1ae17543 [diff] |
README: Introduce vendor-specific tools Add detailed description about what the vendor-specific tools shall do, and how to configure meson to specify the vendor-specific tools. It also updates meson_options.txt to use updated psutils from phosphor-power by default. Signed-off-by: Lei YU <mine260309@gmail.com> Change-Id: I17a508b675a754e76645d08d49547f669385813e
phosphor-psu-code-mgmt is a service to provide management for PSU code, including:
meson build/ && ninja -C build
meson -Doe-sdk=enabled -Dtests=enabled build/ ninja -C build/ test # Meson skips running the case due to it thinks it's cross compiling # Manually run the tests for t in `find build/test/ -maxdepth 1 -name "test_*"`; do ./$t || break ; done
This repo contains generic code to handle the PSU versions and updates. It depends on vendor-specific tools to provide the below functions on the real PSU hardware:
It provides configure options for vendor-specific tools for the above functions:
PSU_VERSION_UTIL
: It shall be defined as a command-line tool that accepts the PSU inventory path as input, and outputs the PSU version string to stdout.PSU_VERSION_COMPARE_UTIL
: It shall be defined as a command-line tool that accepts one or more PSU version strings, and outputs the latest version string to stdout.PSU_UPDATE_SERVICE
: It shall be defined as a systemd service that accepts two arguments:For example:
meson -Dtests=disabled \ '-DPSU_VERSION_UTIL=/usr/bin/psutils --raw --get-version' \ '-DPSU_VERSION_COMPARE_UTIL=/usr/bin/psutils --raw --compare' \ '-DPSU_UPDATE_SERVICE=psu-update@.service' \ build
The above configures the vendor-specific tools to use psutils
from phosphor-power to get and compare the PSU versions, and use psu-update@.service
to perform the PSU firmware update, where internally it invokes psutils
as well.