| commit | 1f0b1e6d2aaaebdabc2767081e809b5486ef9223 | [log] [tgz] |
|---|---|---|
| author | PriyangaRamasamy <priyanga24@in.ibm.com> | Thu Feb 20 20:48:25 2020 +0530 |
| committer | Priyanga Ramasamy <priyanga24@in.ibm.com> | Sun Jun 21 16:57:30 2020 +0000 |
| tree | 4f87175ca360293e79981b0689ee83cde05d3621 | |
| parent | 31970ded12a125ec04ac11f506bad8251d2a9f22 [diff] |
VPD tool : dumpInventory & dumpObject
VPD tool has four options.
a) Dump Complete Inventory - no additional arguments are needed.
b) Dump Specific Object - by providing the object name.
c) Read the keyword - by providing the object name, record name and keyword to be read.
d) Write/Update the keyword - by providing the object name, record name, keyword and the value to be updated.
{value - in ascii or hex & all the other arguments in string}
"--help" option provides details on how to use the above mentioned options.
This commit has implementation of dump inventory and dump specific object.
Output:
---------Dump Inventory---------
Not displaying the complete output.
root@rainier:/tmp# ./vpd-tool -i
[
{
"/system": {
"LocationCode": "U9105.22A.SIMP10R",
"Model": "9105-22A",
"SerialNumber": "SIMP10R",
"type": "xyz.openbmc_project.Inventory.Item.System"
},
"/system/chassis": {
"LocationCode": "U78DA.ND1.1234567",
"type": "xyz.openbmc_project.Inventory.Item.Chassis"
},
.
.
.
.
and so on..
]
---------Dump Object----------
root@rainier:/tmp# ./vpd-tool -o -O /system/chassis/motherboard/ebmc_card_bmc
[
{
"/system/chassis/motherboard/ebmc_card_bmc": {
"CC": "6B58",
"DR": "EBMC ",
"FN": "F191014",
"LocationCode": "U78DA.ND1.1234567-P0-C5",
"PN": "PN12345",
"SN": "YL6B58010000",
"type": "xyz.openbmc_project.Inventory.Item.Bmc"
}
}
]
Flag to enable VPD tool:
There is no seperate flag for VPD tool.
ibm-parser flag will generate the vpd-tool binary.
Steps to build and generate the executable using meson:
meson -Denabled=ibm-parser build
ninja -C build
Test:
Tested on simics.
Signed-off-by: PriyangaRamasamy <priyanga24@in.ibm.com>
Change-Id: I712f7ad4303eefa68f232685b6b0e53646f859f5
#Overview 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.