meson: use non-deprecated systemd packageconfig

Systemd's packageconfig file has both `systemdsystemunitdir` and
`systemd_system_unit_dir` defined.  The non-underscore one appears
to be a deprecated alias[1].  Move to the non-deprecated /
underscore-separated variant.

[1]: https://github.com/systemd/systemd/commit/4908de44b0a0409f84a7cdc5641b114d6ce8ba03

Change-Id: I9eea402eddbcd88e61be99886302d2e944db3c0a
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
1 file changed
tree: 58370c3d76579c25219dd8af2e30b51bac45820e
  1. inc/
  2. service_files/
  3. src/
  4. subprojects/
  5. .clang-format
  6. LICENSE
  7. meson.build
  8. meson.options
  9. OWNERS
  10. post-code-handlers.json
  11. README.md
README.md

phosphor-post-code-manager

This phosphor-post-code-manager repository provides an infrastructure to persist the POST codes in BMC filesystem & it also owns the systemd services that are responsible for exposing the BIOS Post Codes to rest of the world via redfish.

To Build

To build phosphor-post-code-manager package , do the following steps:

meson <build directory>
ninja -C <build directory>

Hosted Services

This repository ships xyz.openbmc_project.State.Boot.PostCode.service systemd service along with its template version and a tiny binary that exposes the necessary dbus interfaces & methods to extract the POST codes per boot cycle.

Architecture

This repository is tightly coupled with phosphor-host-postd OpenBMC repository which is responsible for emitting the dbus signals for every new POST Code.

phosphor-post-code-manager is architected to look for the property changed signals which are being emitted from the service that hosts Value property on xyz.openbmc_project.State.Boot.Raw interface & archive them per boot on the filesystem, so that those can be exposed over redfish

Special Post code handling/eventing

Platforms can provide custom configuration to allow for special handling of specific postcodes. Special handling include starting user configured systemd unit files and/or creating a structured event as defined by the user. The JSON configuration file can be passed in using the --config PATH or -c PATH options.

Configuration format:

[
  {
    "primary": [123],
    "secondary": [234, 123],
    "targets": ["my_special.service"]
  },
  {
    "primary": [999],
    "targets": ["power_failure.service"],
    "event": {
      "name": "xyz.openbmc_project.State.Power.PowerRailFault",
      "arguments": {
        "POWER_RAIL": "MyDevice",
        "FAILURE_DATA": ""
      }
    }
  }
]

Each entry in the array describes a special handler for a specific post code.

  • primary - [required] The primary post code to match.
  • secondary - [optional] The secondary post code to match. If not present, the match will be for all post codes which match just the primary
  • targets - [optional] List of systemd targets to start when the matching post code is received.
  • event - [optional] The descriptor of the event to create with phosphor-logging.
    • event::name - Name of the event log. See log-create --list for a list of possible events which can be created
    • event::arguments - The named argument list which will be used to create the event.