commit | b7552f0cbc6692693ef3430e0faa4f145f7b08c3 | [log] [tgz] |
---|---|---|
author | Bob King <Bob_King@wistron.com> | Thu Oct 15 14:34:17 2020 +0800 |
committer | Shawn McCarney <shawnmm@us.ibm.com> | Tue Nov 03 00:07:39 2020 +0000 |
tree | bfe54889cdc1d666f7014fa4883400f3ad1e76ca | |
parent | 070c1bc6aec44e2b980f59825921f77865ba6d10 [diff] |
regulators: Improve config file validator Improve error checking in config file validator. Add checking if config file does not exist, config file is not readable, and config file is not a JSON file. Add checking if schema file does not exist, schema file is not readable, and schema file is not a JSON file. Tested: Run local CI with -Dlong-tests=enabled to enable tests for validate-regulators-config.py. 1/7 phosphor-regulators-tests OK 32.49s Signed-off-by: Bob King <Bob_King@wistron.com> Change-Id: I5a84949e89be004a20a04c00d16b49286cb42f37
This repository contains applications for configuring and monitoring devices that deliver power to the system.
To build all applications in this repository:
meson build ninja -C build
To clean the repository and remove all build output:
rm -rf build
You can specify meson options to customize the build process. For example, you can specify:
Several applications in this repository require a PSU JSON config to run. The JSON config file provides information for:
There is an example psu.json to describe the necessary configurations.
inventoryPMBusAccessType
defines the pmbus access type, which tells the service which sysfs type to use to read the attributes. The possible values are:/sys/bus/i2c/devices/3-0069/
/sys/bus/i2c/devices/3-0069/hwmon/hwmonX/
/sys/kernel/debug/pmbus/hwmonX/
/sys/kernel/debug/pmbus/hwmonX/cffps1/
fruConfigs
defines the mapping between the attribute file and the FRU inventory interface and property. The configuration example below indicates that the service will read part_number
attribute file from a directory specified by the above pmbus access type, and assign to PartNumber
property in xyz.openbmc_project.Inventory.Decorator.Asset
interface."fruConfigs": [ { "propertyName": "PartNumber", "fileName": "part_number", "interface": "xyz.openbmc_project.Inventory.Decorator.Asset" } ]
psuDevices
defines the kernel device dir for each PSU in inventory. The configuration example below indicates that powersupply0
's device is located in /sys/bus/i2c/devices/3-0069
."psuDevices": { "/xyz/openbmc_project/inventory/system/chassis/motherboard/powersupply0" : "/sys/bus/i2c/devices/3-0069", }