ubi: reset: Preserve the SECBOOT partition

With the implemenation of secure boot in Power9, skiboot requires the
SECBOOT partition to be preserved during factory resets, because it
contains keys provisioned for the system that cannot be recreated (are
not part of the read-only image).

Tested: Verified that the SECBOOT partition file is preserved after a
factory reset:

root@witherspoon:~# ls -l
/var/lib/phosphor-software-manager/pnor/prsv/
-rw-rw-r--    1 root     root        294912 Sep 27 20:21 CVPD
-rw-rw-r--    1 root     root        294912 Sep 27 20:23 DJVPD
-rw-rw-r--    1 root     root        589824 Sep 27 20:21 MVPD
-rw-rw-r--    1 root     root        589824 Sep 27 20:25 NVRAM
-rw-r--r--    1 root     root        147456 Sep 27 20:26 SECBOOT

root@witherspoon:~# busctl call
org.open_power.Software.Host.Updater /xyz/openbmc_project/software
xyz.openbmc_project.Common.FactoryReset Reset

root@witherspoon:~# ls -l
/var/lib/phosphor-software-manager/pnor/prsv/
-rw-r--r--    1 root     root        147456 Sep 27 20:26 SECBOOT

Change-Id: I762d03c937e8e4eff2f87aa087e6152a302180b2
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
1 file changed
tree: ec97089c3dde36aaa2bc9ec31bf9c36ce59dd75d
  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. OWNERS
  32. README.md
  33. utils.cpp
  34. utils.hpp
  35. version.cpp
  36. 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.