| commit | 0086dd11597df44f19c822a2a473c194c7eed18d | [log] [tgz] |
|---|---|---|
| author | Priyanga Ramasamy <priyanga24@in.ibm.com> | Tue Sep 28 10:31:50 2021 -0500 |
| committer | Santosh Puranik <santosh.puranik@in.ibm.com> | Fri Jan 07 08:57:51 2022 +0000 |
| tree | 38e7505c7ae89bb1dcac678de4e4082d4c824dc8 | |
| parent | 32c687f5a145008c7b725278b3b23589f315e4a7 [diff] |
VPD Tool: Emplace Present property
This commit adds logic which emplaces fru's
"Present" property in vpd-tool output.
Some frus doesn't have Present property by itself.
In such case, vpd-tool emplaces the fru's parent's
present property value and displays it to the user.
Test:
Tested on rainier.
1.
root@rain148bmc:/tmp# ./vpd-tool -i
[
{
"/system": {
"LocationCode": "U9105.42B.13BE920",
"Model": "9105-42B",
"Present": "true",
"SerialNumber": "13BE920",
"SubModel": "S0",
"TYPE": "FRU",
"type": "xyz.openbmc_project.Inventory.Item.System"
},
..
.
}
]
2.
root@p10bmc:/tmp# ./vpd-tool -o -O "/system/chassis/motherboard/vdd_vrm1"
[
{
"/system/chassis/motherboard/vdd_vrm1": {
"CC": "ABCD",
"DR": "CABCDARD ",
"FN": "1234",
"LocationCode": "U7123.ABC.12342-P0-C23",
"PN": "02CW34F",
"Present": "true",
"SN": "YH30W3R8X12D",
"TYPE": "FRU",
"type": "xyz.openbmc_project.Inventory.Item.Vrm"
}
}
]
3.
root@rain148bmc:/tmp# ./vpd-tool -o -O /system
[
{
"/system": {
"LocationCode": "U9105.42B.13BE920",
"Model": "9105-42B",
"Present": "true",
"SerialNumber": "13BE920",
"SubModel": "S0",
"TYPE": "FRU",
"type": "xyz.openbmc_project.Inventory.Item.System"
}
}
]
Signed-off-by: Priyanga Ramasamy <priyanga24@in.ibm.com>
Change-Id: Ic2ff978a499f13b21e34fe37aa7ebd067ffcd34e
This repository hosts code for OpenPower and IBM IPZ format VPD parsers. Both OpenPower VPD and IPZ VPD formats are structured binaries that consist of records and keywords. A record is a collection of multiple keywords. More information about the format can be found here.
The repository consists of two distinct applications, which are:
This is a build-time YAML driven application that parses the OpenPower VPD format and uses the YAML configuration (see extra-properties-example.yaml and writefru.yaml) to determine:
The application instance must be passed in the file path to the VPD (this can, for example, be a sysfs path exposed by the EEPROM device driver) and also the D-Bus object path(s) that EEPROM data needs to be published under.
This parser is can be built by passing in the --enable-ibm-parser configure option. This parser differs from the OpenPower VPD parser in the following ways:
# and are > 255 bytes in length).Making the application runtime JSON driven allows us to support multiple systems (with different FRU configurations) to be supported in a single code image as well as making the application more flexible for future improvements.