commit | 3e1cb49d2d469b79cafbd6372d071acb66ee612e | [log] [tgz] |
---|---|---|
author | Souvik Roy <souvikroyofficial10@gmail.com> | Wed Aug 06 06:26:04 2025 +0000 |
committer | SunnySrivastava <sunnsr25@in.ibm.com> | Fri Aug 29 05:21:54 2025 +0000 |
tree | c5627d6abaf04c7f75c17c3a9b9aabc94410dc96 | |
parent | 5cd1b2d508ec8263609a5a0d9e43157e3318d387 [diff] |
Refactor wait-vpd-status from script to executable This commit implements wait-vpd-status.sh logic as an application written in C++. Moving the logic to C++ allows better error handling and more flexibility with respect to future requirements. Test: ``` 1. Ensure vpd-manager CollectionStatus property is in "Completed" state. 2. Run wait-vpd-parser executable 3. Observe executable waits for 2s, then reads vpd-manager CollectionStatus property and outputs a trace saying VPD collection is completed, and then exits with return code 0 4. Using busctl change vpd-manager CollectionStatus property to "InProgress" 5. Run wait-vpd-parser executable 6. Observe executable waits for 2s, and reads vpd-manager CollectionStatus property for a total of 100 retries. After 100 retries, it outputs a trace saying timeout and exits with return code 1 7. Using busctl change vpd-manager CollectionStatus property to "InProgress" 8. Run wait-vpd-parser executable 9. Observe executable waits for 2s, and reads vpd-manager with retry count starting from 100 and counting down. 10. Now change CollectionStatus property to "Completed" 11. Observe executable reads vpd-manager CollectionStatus property and outputs a trace saying VPD collection is completed, and then exits with return code 0. ``` Change-Id: Ifa96a1262b73f4eacc6e13d4e05c710d6e693035 Signed-off-by: Souvik Roy <souvikroyofficial10@gmail.com>
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 at a broken link.
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.