Activation: support updating PSU from stored image

The previous code assume the image to update is from IMG_DIR.
Now it needs to update PSU from pre-built or stored images.

This commit adds the support, by constructing the systemd unit based on
Activation's Path property instead of IMG_DIR.

Tested: Verify on Witherspoon that it is able to activate a stored
        image.

Signed-off-by: Lei YU <mine260309@gmail.com>
Change-Id: I0936bb921b22c7f67aee9689e3695e6b21703a29
3 files changed
tree: 62ba5b9dd320bcfc66527b04710d1965fceab3e4
  1. service/
  2. src/
  3. test/
  4. vendor-example/
  5. .clang-format
  6. .gitignore
  7. LICENSE
  8. MAINTAINERS
  9. meson.build
  10. meson_options.txt
  11. README.md
README.md

phosphor-psu-code-mgmt

phosphor-psu-code-mgmt is a service to provide management for PSU code, including:

  • PSU code version
  • PSU code update

Building

meson build/ && ninja -C build

Unit test

  • Run it in OpenBMC CI, refer to local-ci-build.md
  • Run it in OE SDK, run below commands in a x86-64 SDK env:
    meson -Doe-sdk=enabled -Dtests=enabled build/
    ninja -C build/ test  # Meson skips running the case due to it thinks it's cross compiling
    # Manually run the tests
    for t in `find build/test/ -maxdepth 1 -name "test_*"`; do ./$t || break ; done