Activation: store PSU image in persistent storage
When an activation succeeds, store the PSU image into persistent
storage, which will be used in future in case a PSU is replaced, and the
BMC will need to update the replaced PSU's firmware.
Only the latest image is saved, and old ones are removed for each model.
Tested: On witherspoon, verify the PSU image is saved in persistent
storage after a successful activation with dummy service, and
the FilePath inteface is updated with the stored path.
And after another successful activation, the new image is saved
and the old one is removed in persistent storage.
Signed-off-by: Lei YU <mine260309@gmail.com>
Change-Id: I11f3d4a91d045d2316242d8eef968f05250d862e
diff --git a/meson.build b/meson.build
index 9e5b3b3..abf2ddf 100644
--- a/meson.build
+++ b/meson.build
@@ -40,6 +40,8 @@
cdata.set_quoted('PSU_VERSION_UTIL', get_option('PSU_VERSION_UTIL'))
cdata.set_quoted('PSU_UPDATE_SERVICE', get_option('PSU_UPDATE_SERVICE'))
cdata.set_quoted('IMG_DIR', get_option('IMG_DIR'))
+cdata.set_quoted('IMG_DIR_PERSIST', get_option('IMG_DIR_PERSIST'))
+cdata.set_quoted('IMG_DIR_BUILTIN', get_option('IMG_DIR_BUILTIN'))
phosphor_dbus_interfaces = dependency('phosphor-dbus-interfaces')
phosphor_logging = dependency('phosphor-logging')