Refactor: Split item_updater to common and ubi

The existing item_updater is highly coupled with ubifs.
It will support static layout and ubi in future.
So split the functions in to common ones and ubi specific ones, and move
the ubi specific code in ubi dir.

1. Keep common functions and make them virtual for extension.
    createActiveAssociation()
    updateFunctionalAssociation()
    removeAssociation()
    erase()
2. Create ubi/item_updater_ubi and move other functions into it.
3. Change updateFunctionalAssociation() parameter for future use.

To support static layout, a new item_updater_static will be written.

Tested: On the last commit of the patch series, run code update and
        factory reset on Witherspoon and all work fine.

Change-Id: I4cc55b31ee3f37c5b27168611305dee8ce02880a
Signed-off-by: Lei YU <mine260309@gmail.com>
11 files changed
tree: 41e793e1a1144d50a1fba6c23dac7d2f1b117452
  1. m4/
  2. org/
  3. static/
  4. test/
  5. ubi/
  6. .clang-format
  7. .gitignore
  8. activation.cpp
  9. activation.hpp
  10. bootstrap.sh
  11. configure.ac
  12. generate-squashfs
  13. generate-ubi
  14. image_verify.cpp
  15. image_verify.hpp
  16. item_updater.cpp
  17. item_updater.hpp
  18. item_updater_main.cpp
  19. LICENSE
  20. MAINTAINERS
  21. Makefile.am
  22. msl_verify.cpp
  23. msl_verify.hpp
  24. msl_verify_main.cpp
  25. README.md
  26. serialize.cpp
  27. serialize.hpp
  28. utils.cpp
  29. utils.hpp
  30. version.cpp
  31. version.hpp
  32. watch.cpp
  33. watch.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`.