mmc: Setup hostfw directories

The BMC updater will take care of writing the new hostfw image
to flash since it's delivered in the single tarball file, but
when the BMC starts up, need to setup the directories so that
the contents of the host FW are visible to consumers like pldm.

The first service is to setup the patch directory. This is
similar to UBI. The path that mboxd expects (pnor) will point to
a directory in the hostfw partition. Then create a similar
symlink (hostfw) for pldm to use. Eventually pldm will replace
mboxd.

The second service is an init setup. We need to make the 2 hostfw
versions visible. The secondary (non-running) will just be a
read-only mount of the non-running image. The primary (running)
version needs to be read-write. The mboxd code currently
handles 3 directories: ro, rw, prsv. This was deemed too complex
for pldm to replicate, so it was decided to have a single rw
directory, then pldm would determine if it allowed a write or not.
To handle the preserved files (that are not updated on an update),
need to copy them off to a tmp space, then set up the primary
directory with the contents of the running image, then restore the
preserved files. Currently only the PNOR contents are preserved,
at a later point the pldm files will be preserved and a different
list like the pnor.toc file will be added.

Finally, like the vpnor util does, if the version has changed on,
remove the patch files. Just that we need to do this when the init
service starts because the symlinks will not change at runtime
(the host fw version is tied to the bmc version).

Change-Id: I32b456bd363671404f573cb941a0f2f374a3eab2
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
4 files changed
tree: b4985e207a7b0546d26e9942e4736435f1d41684
  1. m4/
  2. mmc/
  3. static/
  4. test/
  5. ubi/
  6. vpnor/
  7. .clang-format
  8. .gitignore
  9. activation.cpp
  10. activation.hpp
  11. bootstrap.sh
  12. configure.ac
  13. generate-tar
  14. generate-ubi
  15. image_verify.cpp
  16. image_verify.hpp
  17. item_updater.cpp
  18. item_updater.hpp
  19. item_updater_main.cpp
  20. LICENSE
  21. MAINTAINERS
  22. Makefile.am
  23. msl_verify.cpp
  24. msl_verify.hpp
  25. msl_verify_main.cpp
  26. op-pnor-msl.service
  27. openpower-pnor-update@.service
  28. org.open_power.Software.Host.Updater.service
  29. README.md
  30. utils.cpp
  31. utils.hpp
  32. version.cpp
  33. 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. ./bootstrap.sh
    2. ./configure ${CONFIGURE_FLAGS}
    3. make

To clean the repository run `./bootstrap.sh clean`.