tree: 3653de5e5dbd5db81e74f847510ebaa5303bac4b [path history] [tgz]
  1. firmware-handler/
  2. log-handler/
  3. test/
  4. version-handler/
  5. buildjson.cpp
  6. buildjson.hpp
  7. file_handler.cpp
  8. file_handler.hpp
  9. fs.cpp
  10. fs.hpp
  11. general_systemd.cpp
  12. general_systemd.hpp
  13. handler_config.hpp
  14. image_handler.hpp
  15. meson.build
  16. README.md
  17. skip_action.cpp
  18. skip_action.hpp
bmc/README.md

Format of Config file

This document gives details about the format of the config file useed by log, version and firmware handler. The config file is a .json file.

Parameters

There are 3 important parameters in this config file

  1. blob
  2. handler
  3. actions

An example config file -

{
    "blob": "/flash/adm1266_sink0",
    "handler": {
        "type": "file",
        "path": "/var/run/adm1266/adm1266_sink0.hex"
    },
    "actions": {
        "preparation": {
            "type": "skip"
        },
        "verification": {
            "type": "systemd",
            "unit": "adm1266-verify@sink0.service"
        },
        "update": {
            "type": "systemd",
            "unit": "adm1266-update@sink0.service"
        }
    }
}

blob

This parameter defines the unique name of the blob. This parameter must be defined for each blob.

handler

A blob must have a handler with a type. Currently only "file" type is supported. With file type, a path of the handler file must be provided.

actions

"actions" define various steps to be performed and are required for each blob. These actions can be triggered from ipmi-blob commands. Currently there are 2 types of actions supported: systemd to invoke a systemd service, or skip to not perform any action.

Workflow of log handler

{
    "blob": "/log/blackbox_adm1266_sink0",
    "handler": {
        "type": "file",
        "path": "/var/run/adm1266/adm1266_sink0.log"
    },
    "actions":{
        "open": {
            "type": "systemd",
            "unit": "adm1266-read-blackbox-log@sink0.service"
        },
        "delete": {
            "type": "systemd",
            "unit": "adm1266-clear-blackbox-data@sink0.service"
        }
    }
}

In this example the blob handler is the log file that will store the blackbox data from adm1266 and will be returned on BmcBlobRead.

Here log_blob supports 2 actions. These actions are performed on the handler file.

  1. open : adm1266-read-blackbox-log@sink0.service gets launched on BmcBlobOpen command. This service should read the blackbox data from adm1266 and place the into blob handler file. This also enables BmcBlobSessionStat command to indicate that the blob is ready to read.

  2. delete : adm1266-clear-blackbox-data@sink0.service gets launched on BmcBlobDelete command. This service should delete the cached blackbox data in the handler file and erase the blackbox data from adm1266.