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
diff --git a/configure.ac b/configure.ac
index 6657b52..739ec37 100644
--- a/configure.ac
+++ b/configure.ac
@@ -63,7 +63,7 @@
[CLI/CLI.hpp],
[],
[AC_MSG_ERROR([Could not find CLI11 CLI.hpp])]
- )
+)
AC_CHECK_HEADER(
[nlohmann/json.hpp],
[],
@@ -72,6 +72,8 @@
AX_APPEND_COMPILE_FLAGS([-DIPZ_PARSER], [CXXFLAGS])
AC_DEFINE(INVENTORY_JSON, "/usr/share/vpd/vpd_inventory.json", [JSON file that defines inventory blueprint])
])
+ AC_DEFINE(INVENTORY_PATH, "/xyz/openbmc_project/inventory", [Prefix for inventory D-Bus objects])
+ AC_DEFINE(INVENTORY_MANAGER_SERVICE, "xyz.openbmc_project.Inventory.Manager", [Inventory manager service])
# Check/set gtest specific functions.
AX_PTHREAD([GTEST_CPPFLAGS="-DGTEST_HAS_PTHREAD=1"],[GTEST_CPPFLAGS="-DGTEST_HAS_PTHREAD=0"])