Activation: initially support psu update

Initial support for PSU update by starting a systemd unit with PSU
inventory path and image dir as arguments.

Add an example psu-update@.service that shows how the arguments are
passed to systemd unit and expanded to command line arguments.

Tested: Upload a dummy tarball, create a dummy service that only prints
        the arguments, and verify the service is invoked correctly when
        the RequestedActivation is set to Active.

Signed-off-by: Lei YU <mine260309@gmail.com>
Change-Id: I7e122f1cce234caf4951d3e3daad5bee406b507b
7 files changed
tree: bc31a5421080f659e0f5164b59c8e853ee81637a
  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