functions: Parse json file to set bios attr table

The elements.json file have entries as follow:
    "lids": [
        {
            "element_name": "HBD.RAINIER_2U_XML",
            "short_lid_name": "81e00630",
        },
        {
            "element_name": "HBD.RAINIER_2U_XML.iplTime",
            "short_lid_name": "81e0068d",
        },
        {
            "element_name": "NVRAM.P10",
            "short_lid_name": "81e0066b",
        },
        {
            "element_name": "HDAT.RAINIER_4U_XML",
            "short_lid_name": "81e00675",
        },

Need to parse the element name and lid name depending on the system. The
.P10 files are common to all P10 systems, the .<system> applies only to
the system name provided by Entity Manager. The .iplTIme takes
precedence and should be the lid number that it's picked up, so use []
instead of insert to overwrite an entry if it had already being set.

In the example above, the string for a rainier 2U should look like:
HBD=81e0068d,NVRAM=81e0066b.

Change-Id: I55b317ffef6a7fbe3fd5ee92e7f0188d831b7972
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
3 files changed
tree: 27c15c386513f2a4c79c20b184be403d4ffeb698
  1. dbus/
  2. mmc/
  3. static/
  4. test/
  5. ubi/
  6. vpnor/
  7. .clang-format
  8. .gitignore
  9. .shellcheck
  10. activation.cpp
  11. activation.hpp
  12. functions.cpp
  13. functions.hpp
  14. generate-tar
  15. generate-ubi
  16. image_verify.cpp
  17. image_verify.hpp
  18. item_updater.cpp
  19. item_updater.hpp
  20. item_updater_main.cpp
  21. LICENSE
  22. MAINTAINERS
  23. meson.build
  24. meson_options.txt
  25. msl_verify.cpp
  26. msl_verify.hpp
  27. msl_verify_main.cpp
  28. op-pnor-msl.service
  29. openpower-pnor-update@.service
  30. org.open_power.Software.Host.Updater.service
  31. README.md
  32. utils.cpp
  33. utils.hpp
  34. version.cpp
  35. version.hpp
README.md

openpower-pnor-code-mgmt

OpenPower PNOR (Processor NOR) Code Management provides a set of host software management applications for OpenPower systems. The host firmware is stored on the PNOR chip. More information can be found at Software Architecture or Host Code Update

To Build

To build this package, do the following steps:

  1. meson build
  2. ninja -C build

To clean the repository run rm -r build.