History log of /openbmc/phosphor-ipmi-flash/bmc/version-handler/test/ (Results 1 – 18 of 18)
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
42a44c2816-Aug-2024 Patrick Williams <patrick@stwcx.xyz>

clang-format: re-format for clang-18

clang-format-18 isn't compatible with the clang-format-17 output, so we
need to reformat the code with the latest version. The way clang-18
handles lambda forma

clang-format: re-format for clang-18

clang-format-18 isn't compatible with the clang-format-17 output, so we
need to reformat the code with the latest version. The way clang-18
handles lambda formatting also changed, so we have made changes to the
organization default style format to better handle lambda formatting.

See I5e08687e696dd240402a2780158664b7113def0e for updated style.
See Iea0776aaa7edd483fa395e23de25ebf5a6288f71 for clang-18 enablement.

Change-Id: I09e19a126d456dc184fd70e82d4e4e4217fa8ee7
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...


/openbmc/phosphor-ipmi-flash/.clang-format
/openbmc/phosphor-ipmi-flash/.gitignore
/openbmc/phosphor-ipmi-flash/OWNERS
/openbmc/phosphor-ipmi-flash/README.md
/openbmc/phosphor-ipmi-flash/bmc/README.md
/openbmc/phosphor-ipmi-flash/bmc/buildjson.cpp
/openbmc/phosphor-ipmi-flash/bmc/buildjson.hpp
/openbmc/phosphor-ipmi-flash/bmc/file_handler.cpp
/openbmc/phosphor-ipmi-flash/bmc/file_handler.hpp
/openbmc/phosphor-ipmi-flash/bmc/firmware-handler/data_handler.hpp
/openbmc/phosphor-ipmi-flash/bmc/firmware-handler/firmware_handler.cpp
/openbmc/phosphor-ipmi-flash/bmc/firmware-handler/firmware_handler.hpp
/openbmc/phosphor-ipmi-flash/bmc/firmware-handler/firmware_handlers_builder.cpp
/openbmc/phosphor-ipmi-flash/bmc/firmware-handler/lpc_aspeed.cpp
/openbmc/phosphor-ipmi-flash/bmc/firmware-handler/lpc_aspeed.hpp
/openbmc/phosphor-ipmi-flash/bmc/firmware-handler/lpc_nuvoton.cpp
/openbmc/phosphor-ipmi-flash/bmc/firmware-handler/lpc_nuvoton.hpp
/openbmc/phosphor-ipmi-flash/bmc/firmware-handler/main.cpp
/openbmc/phosphor-ipmi-flash/bmc/firmware-handler/mapper_errors.hpp
/openbmc/phosphor-ipmi-flash/bmc/firmware-handler/meson.build
/openbmc/phosphor-ipmi-flash/bmc/firmware-handler/net_handler.hpp
/openbmc/phosphor-ipmi-flash/bmc/firmware-handler/pci_handler.hpp
/openbmc/phosphor-ipmi-flash/bmc/firmware-handler/test/firmware_state_verificationstarted_unittest.cpp
/openbmc/phosphor-ipmi-flash/bmc/general_systemd.cpp
/openbmc/phosphor-ipmi-flash/bmc/general_systemd.hpp
/openbmc/phosphor-ipmi-flash/bmc/image_handler.hpp
/openbmc/phosphor-ipmi-flash/bmc/log-handler/log_handler.cpp
/openbmc/phosphor-ipmi-flash/bmc/log-handler/log_handlers_builder.cpp
/openbmc/phosphor-ipmi-flash/bmc/meson.build
/openbmc/phosphor-ipmi-flash/bmc/skip_action.cpp
version_mock.hpp
/openbmc/phosphor-ipmi-flash/bmc/version-handler/version_handler.cpp
/openbmc/phosphor-ipmi-flash/bmc/version-handler/version_handlers_builder.cpp
/openbmc/phosphor-ipmi-flash/bmc_json_config.md
/openbmc/phosphor-ipmi-flash/cleanup/cleanup.hpp
/openbmc/phosphor-ipmi-flash/internal/sys.cpp
/openbmc/phosphor-ipmi-flash/internal/sys.hpp
/openbmc/phosphor-ipmi-flash/ipmi_flash.md
/openbmc/phosphor-ipmi-flash/meson.build
/openbmc/phosphor-ipmi-flash/meson.options
/openbmc/phosphor-ipmi-flash/status.hpp
/openbmc/phosphor-ipmi-flash/subprojects/nlohmann_json.wrap
/openbmc/phosphor-ipmi-flash/tools/bt.hpp
/openbmc/phosphor-ipmi-flash/tools/handler.cpp
/openbmc/phosphor-ipmi-flash/tools/handler.hpp
/openbmc/phosphor-ipmi-flash/tools/helper.cpp
/openbmc/phosphor-ipmi-flash/tools/interface.hpp
/openbmc/phosphor-ipmi-flash/tools/io.hpp
/openbmc/phosphor-ipmi-flash/tools/io_interface.hpp
/openbmc/phosphor-ipmi-flash/tools/lpc.hpp
/openbmc/phosphor-ipmi-flash/tools/main.cpp
/openbmc/phosphor-ipmi-flash/tools/meson.build
/openbmc/phosphor-ipmi-flash/tools/net.cpp
/openbmc/phosphor-ipmi-flash/tools/net.hpp
/openbmc/phosphor-ipmi-flash/tools/p2a.cpp
/openbmc/phosphor-ipmi-flash/tools/p2a.hpp
/openbmc/phosphor-ipmi-flash/tools/pci.cpp
/openbmc/phosphor-ipmi-flash/tools/pci.hpp
/openbmc/phosphor-ipmi-flash/tools/pciaccess.cpp
/openbmc/phosphor-ipmi-flash/tools/pciaccess.hpp
/openbmc/phosphor-ipmi-flash/tools/progress.cpp
/openbmc/phosphor-ipmi-flash/tools/test/data_interface_mock.hpp
/openbmc/phosphor-ipmi-flash/tools/test/internal_sys_mock.hpp
/openbmc/phosphor-ipmi-flash/tools/test/io_unittest.cpp
/openbmc/phosphor-ipmi-flash/tools/test/tools_net_unittest.cpp
/openbmc/phosphor-ipmi-flash/tools/test/tools_pci_unittest.cpp
/openbmc/phosphor-ipmi-flash/tools/test/tools_updater_unittest.cpp
/openbmc/phosphor-ipmi-flash/tools/tool_errors.hpp
99d292a308-Feb-2022 Willy Tu <wltu@google.com>

phosphor-ipmi-flash: Code Health Cleanup

Removed the following warning.
- using decl '*' is unused
- 'push_back' is called inside a loop; consider pre-allocating the
container capacity before th

phosphor-ipmi-flash: Code Health Cleanup

Removed the following warning.
- using decl '*' is unused
- 'push_back' is called inside a loop; consider pre-allocating the
container capacity before the loop
- function '*' defined in a header file; function
definitions in header files can lead to ODR violations

Change-Id: I44e4b0f8056a853fb45b690394be1a8ebec45b20
Signed-off-by: Willy Tu <wltu@google.com>

show more ...


/openbmc/phosphor-ipmi-flash/MAINTAINERS
/openbmc/phosphor-ipmi-flash/OWNERS
/openbmc/phosphor-ipmi-flash/bmc/README.md
/openbmc/phosphor-ipmi-flash/bmc/firmware-handler/firmware_handler.cpp
/openbmc/phosphor-ipmi-flash/bmc/firmware-handler/test/create_action_map.hpp
/openbmc/phosphor-ipmi-flash/bmc/firmware-handler/test/meson.build
/openbmc/phosphor-ipmi-flash/bmc/log-handler/log_handler.cpp
/openbmc/phosphor-ipmi-flash/bmc/log-handler/log_handler.hpp
/openbmc/phosphor-ipmi-flash/bmc/log-handler/log_handlers_builder.cpp
/openbmc/phosphor-ipmi-flash/bmc/log-handler/log_handlers_builder.hpp
/openbmc/phosphor-ipmi-flash/bmc/log-handler/main.cpp
/openbmc/phosphor-ipmi-flash/bmc/log-handler/meson.build
/openbmc/phosphor-ipmi-flash/bmc/log-handler/test/log_canhandle_enumerate_unittest.cpp
/openbmc/phosphor-ipmi-flash/bmc/log-handler/test/log_close_unittest.cpp
/openbmc/phosphor-ipmi-flash/bmc/log-handler/test/log_createhandler_unittest.cpp
/openbmc/phosphor-ipmi-flash/bmc/log-handler/test/log_json_unittest.cpp
/openbmc/phosphor-ipmi-flash/bmc/log-handler/test/log_mock.hpp
/openbmc/phosphor-ipmi-flash/bmc/log-handler/test/log_open_unittest.cpp
/openbmc/phosphor-ipmi-flash/bmc/log-handler/test/log_read_unittest.cpp
/openbmc/phosphor-ipmi-flash/bmc/log-handler/test/log_stat_unittest.cpp
/openbmc/phosphor-ipmi-flash/bmc/log-handler/test/meson.build
/openbmc/phosphor-ipmi-flash/bmc/meson.build
/openbmc/phosphor-ipmi-flash/bmc/test/image_mock.cpp
/openbmc/phosphor-ipmi-flash/bmc/test/image_mock.hpp
/openbmc/phosphor-ipmi-flash/bmc/test/meson.build
/openbmc/phosphor-ipmi-flash/bmc/test/triggerable_mock.cpp
/openbmc/phosphor-ipmi-flash/bmc/test/triggerable_mock.hpp
version_mock.hpp
/openbmc/phosphor-ipmi-flash/bmc/version-handler/version_handlers_builder.cpp
/openbmc/phosphor-ipmi-flash/tools/test/tools_updater_unittest.cpp
/openbmc/phosphor-ipmi-flash/tools/updater.cpp
35b77c9b13-Sep-2021 Willy Tu <wltu@google.com>

build: remove autotool

Change-Id: I662c8a5d29453622744f44c1984416f1303354e6
Signed-off-by: Willy Tu <wltu@google.com>

bcae900212-Sep-2021 Willy Tu <wltu@google.com>

build: Add meson build

Changes to note,
- `with_systemdsystemunitdir` and `with_tmpfilesdir` is removed since it
is not being documented nor used in OpenBMC.
- Removed the Code coverage feature wi

build: Add meson build

Changes to note,
- `with_systemdsystemunitdir` and `with_tmpfilesdir` is removed since it
is not being documented nor used in OpenBMC.
- Removed the Code coverage feature with `-DDHAVE_GCOV`, since it is not
used and meson covers it.
- Removed `--enable-oe-sdk` for using the OpenBMC SDK. It should work
directly with no change required.

Tested:
```
Jan 01 00:01:54 ipmid[709]: Try loading blob from persistent data
Jan 01 00:01:54 ipmid[709]: Stale blob data, resetting internals...
Jan 01 00:01:56 ipmid[709]: config loaded: /flash/bios
Jan 01 00:01:56 ipmid[709]: config loaded: /flash/image
Jan 01 00:01:56 ipmid[709]: config loaded: /flash/dummy
...
```

```
$ ls /usr/lib/blob-ipmid/
libfirmwareblob.so
libfirmwarecleanupblob.so libversionblob.so
```

Testing the service,
```
$ echo "hello" > /tmp/test.txt
$ burn_my_bmc -command update -layout dummy -image /tmp/test.txt
Sending over the firmware image.
Opening the verification file
Committing to /flash/verify to trigger service
Calling stat on /flash/verify session to check status
running
success
Returned success
succeeded
```

On the BMC.
```
/run/initramfs$ cat dummy
hello
```

Change-Id: I21c7c33bd62c0ee40681cb40da90125c125bea2f
Signed-off-by: Willy Tu <wltu@google.com>

show more ...


/openbmc/phosphor-ipmi-flash/.gitignore
/openbmc/phosphor-ipmi-flash/OWNERS
/openbmc/phosphor-ipmi-flash/README.md
/openbmc/phosphor-ipmi-flash/bmc/file_handler.cpp
/openbmc/phosphor-ipmi-flash/bmc/firmware-handler/firmware_handler.cpp
/openbmc/phosphor-ipmi-flash/bmc/firmware-handler/meson.build
/openbmc/phosphor-ipmi-flash/bmc/firmware-handler/net_handler.cpp
/openbmc/phosphor-ipmi-flash/bmc/firmware-handler/pci_handler.cpp
/openbmc/phosphor-ipmi-flash/bmc/firmware-handler/pci_nuvoton_handler.cpp
/openbmc/phosphor-ipmi-flash/bmc/firmware-handler/test/crc_mock.hpp
/openbmc/phosphor-ipmi-flash/bmc/firmware-handler/test/data_mock.hpp
/openbmc/phosphor-ipmi-flash/bmc/firmware-handler/test/file_handler_unittest.cpp
/openbmc/phosphor-ipmi-flash/bmc/firmware-handler/test/firmware_close_unittest.cpp
/openbmc/phosphor-ipmi-flash/bmc/firmware-handler/test/firmware_commit_unittest.cpp
/openbmc/phosphor-ipmi-flash/bmc/firmware-handler/test/firmware_json_unittest.cpp
/openbmc/phosphor-ipmi-flash/bmc/firmware-handler/test/firmware_multiplebundle_unittest.cpp
/openbmc/phosphor-ipmi-flash/bmc/firmware-handler/test/firmware_open_unittest.cpp
/openbmc/phosphor-ipmi-flash/bmc/firmware-handler/test/firmware_sessionstat_unittest.cpp
/openbmc/phosphor-ipmi-flash/bmc/firmware-handler/test/firmware_state_notyetstarted_tarball_unittest.cpp
/openbmc/phosphor-ipmi-flash/bmc/firmware-handler/test/firmware_state_uploadinprogress_unittest.cpp
/openbmc/phosphor-ipmi-flash/bmc/firmware-handler/test/firmware_unittest.hpp
/openbmc/phosphor-ipmi-flash/bmc/firmware-handler/test/firmware_write_unittest.cpp
/openbmc/phosphor-ipmi-flash/bmc/firmware-handler/test/firmware_writemeta_unittest.cpp
/openbmc/phosphor-ipmi-flash/bmc/firmware-handler/test/meson.build
/openbmc/phosphor-ipmi-flash/bmc/firmware-handler/test/window_mapper_mock.hpp
/openbmc/phosphor-ipmi-flash/bmc/general_systemd.cpp
/openbmc/phosphor-ipmi-flash/bmc/meson.build
/openbmc/phosphor-ipmi-flash/bmc/test/image_mock.hpp
/openbmc/phosphor-ipmi-flash/bmc/test/meson.build
/openbmc/phosphor-ipmi-flash/bmc/test/triggerable_mock.hpp
/openbmc/phosphor-ipmi-flash/bmc/version-handler/meson.build
meson.build
/openbmc/phosphor-ipmi-flash/bmc/version-handler/version_handler.cpp
/openbmc/phosphor-ipmi-flash/bmc/version-handler/version_handler.hpp
/openbmc/phosphor-ipmi-flash/bootstrap.sh
/openbmc/phosphor-ipmi-flash/cleanup/cleanup.cpp
/openbmc/phosphor-ipmi-flash/cleanup/cleanup.hpp
/openbmc/phosphor-ipmi-flash/cleanup/meson.build
/openbmc/phosphor-ipmi-flash/cleanup/test/filesystem_mock.hpp
/openbmc/phosphor-ipmi-flash/cleanup/test/meson.build
/openbmc/phosphor-ipmi-flash/configure.ac
/openbmc/phosphor-ipmi-flash/meson.build
/openbmc/phosphor-ipmi-flash/meson_options.txt
/openbmc/phosphor-ipmi-flash/subprojects/fmt.wrap
/openbmc/phosphor-ipmi-flash/subprojects/googletest.wrap
/openbmc/phosphor-ipmi-flash/subprojects/pciaccess.wrap
/openbmc/phosphor-ipmi-flash/subprojects/phosphor-dbus-interfaces.wrap
/openbmc/phosphor-ipmi-flash/subprojects/phosphor-ipmi-blobs.wrap
/openbmc/phosphor-ipmi-flash/subprojects/phosphor-logging.wrap
/openbmc/phosphor-ipmi-flash/subprojects/sdbusplus.wrap
/openbmc/phosphor-ipmi-flash/subprojects/stdplus.wrap
/openbmc/phosphor-ipmi-flash/tools/bt.cpp
/openbmc/phosphor-ipmi-flash/tools/handler.cpp
/openbmc/phosphor-ipmi-flash/tools/handler.hpp
/openbmc/phosphor-ipmi-flash/tools/helper.cpp
/openbmc/phosphor-ipmi-flash/tools/helper.hpp
/openbmc/phosphor-ipmi-flash/tools/io.hpp
/openbmc/phosphor-ipmi-flash/tools/io_interface.hpp
/openbmc/phosphor-ipmi-flash/tools/lpc.cpp
/openbmc/phosphor-ipmi-flash/tools/main.cpp
/openbmc/phosphor-ipmi-flash/tools/meson.build
/openbmc/phosphor-ipmi-flash/tools/net.cpp
/openbmc/phosphor-ipmi-flash/tools/p2a.cpp
/openbmc/phosphor-ipmi-flash/tools/pci.hpp
/openbmc/phosphor-ipmi-flash/tools/test/data_interface_mock.hpp
/openbmc/phosphor-ipmi-flash/tools/test/internal_sys_mock.hpp
/openbmc/phosphor-ipmi-flash/tools/test/io_mock.hpp
/openbmc/phosphor-ipmi-flash/tools/test/meson.build
/openbmc/phosphor-ipmi-flash/tools/test/pciaccess_mock.hpp
/openbmc/phosphor-ipmi-flash/tools/test/tools_bt_unittest.cpp
/openbmc/phosphor-ipmi-flash/tools/test/tools_helper_unittest.cpp
/openbmc/phosphor-ipmi-flash/tools/test/tools_lpc_unittest.cpp
/openbmc/phosphor-ipmi-flash/tools/test/tools_net_unittest.cpp
/openbmc/phosphor-ipmi-flash/tools/test/tools_pci_unittest.cpp
/openbmc/phosphor-ipmi-flash/tools/test/tools_updater_unittest.cpp
/openbmc/phosphor-ipmi-flash/tools/test/updater_mock.hpp
/openbmc/phosphor-ipmi-flash/tools/updater.cpp
/openbmc/phosphor-ipmi-flash/tools/updater.hpp
/openbmc/phosphor-ipmi-flash/util.hpp
c8b456e019-Mar-2021 Jie Yang <jjy@google.com>

version-handler: remove unused tests

Those tests are repeated in "version_json_unittest.cpp" and never built.

Signed-off-by: Jie Yang <jjy@google.com>
Change-Id: I004237307ef0581f47e8517d5988b755f7

version-handler: remove unused tests

Those tests are repeated in "version_json_unittest.cpp" and never built.

Signed-off-by: Jie Yang <jjy@google.com>
Change-Id: I004237307ef0581f47e8517d5988b755f7d56935

show more ...

7d39eb0416-Feb-2021 Patrick Venture <venture@google.com>

bmc/ver.../test/.close_unittest: add missing header

Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: I836986ee7108caa651a374c3f08e96029d01cd9c

84904b9722-Jan-2021 William A. Kennington III <wak@google.com>

version-handler/test: Remove unused declarations

Change-Id: If9bc7dd4c58bd9ba3430ffee6319da5ed194cb9f
Signed-off-by: William A. Kennington III <wak@google.com>

cc7f385b21-Jan-2021 William A. Kennington III <wak@google.com>

handler_config: Split out from buildjson

This allows us to build the version-handler without the json
infrastructure.

Change-Id: I8c0a5715cb66f6cbb3e72cb714759f6e11e3f409
Signed-off-by: William A.

handler_config: Split out from buildjson

This allows us to build the version-handler without the json
infrastructure.

Change-Id: I8c0a5715cb66f6cbb3e72cb714759f6e11e3f409
Signed-off-by: William A. Kennington III <wak@google.com>

show more ...

0674a6d712-Jan-2021 William A. Kennington III <wak@google.com>

version-handler: Produce errors for unavailable data

We want to make it clear to the reader that the data is actually
unavailable vs reading outside the bounds of the data space.

Change-Id: Ifb63df

version-handler: Produce errors for unavailable data

We want to make it clear to the reader that the data is actually
unavailable vs reading outside the bounds of the data space.

Change-Id: Ifb63dfe600c268af9e7df24397c28e20316dbb8f
Signed-off-by: William A. Kennington III <wak@google.com>

show more ...

eba0c34a12-Jan-2021 William A. Kennington III <wak@google.com>

version-handler: Add session stat

We need to be able to inform the blob user of the readiness of blob data
and how large the contents are.

Change-Id: Ic90f6e344160b48e7e58cb009558586c7c2fab9b
Signe

version-handler: Add session stat

We need to be able to inform the blob user of the readiness of blob data
and how large the contents are.

Change-Id: Ic90f6e344160b48e7e58cb009558586c7c2fab9b
Signed-off-by: William A. Kennington III <wak@google.com>

show more ...

9936c45624-Dec-2020 William A. Kennington III <wak@google.com>

version_handler: Support multiple sessions

We want to be able to support multiple concurrent readers of version
information. Otherwise, upstream version checks might fail if they end
up being sequen

version_handler: Support multiple sessions

We want to be able to support multiple concurrent readers of version
information. Otherwise, upstream version checks might fail if they end
up being sequenced concurrently.

Change-Id: I5420ad667622b7906e633562a5373e0be042c0c1
Signed-off-by: William A. Kennington III <wak@google.com>

show more ...

12e6e75623-Dec-2020 William A. Kennington III <wak@google.com>

version_handler: Read doesn't need to catch missing sessions

The read() interface from phosphor-ipmi-blobs will never call read with
an invalid session, so we don't need to catch the exception if th

version_handler: Read doesn't need to catch missing sessions

The read() interface from phosphor-ipmi-blobs will never call read with
an invalid session, so we don't need to catch the exception if the
session doesn't exist.

Change-Id: I2ccb351b85d18a6eb96d4f92cfb3167a95f0509e
Signed-off-by: William A. Kennington III <wak@google.com>

show more ...

007c016623-Dec-2020 William A. Kennington III <wak@google.com>

version_handler: Don't store session information immediately

This can cause spurious trigger aborts when open's fail and cleanup is
called on the failed session.

Change-Id: I1c49f248b6f56bbecc0d51f

version_handler: Don't store session information immediately

This can cause spurious trigger aborts when open's fail and cleanup is
called on the failed session.

Change-Id: I1c49f248b6f56bbecc0d51fafaabe871d23b1d7d
Signed-off-by: William A. Kennington III <wak@google.com>

show more ...

fbf4c53223-Dec-2020 William A. Kennington III <wak@google.com>

version-handler: Remove superfluous open session check

The phosphor-ipmi-flash API guarantees that calls to open() will not
happen with duplicate session IDs.

Change-Id: Ife88b2743322387e5cc6ebe2b3

version-handler: Remove superfluous open session check

The phosphor-ipmi-flash API guarantees that calls to open() will not
happen with duplicate session IDs.

Change-Id: Ife88b2743322387e5cc6ebe2b34567c3d2d2957a
Signed-off-by: William A. Kennington III <wak@google.com>

show more ...

abf1735422-Dec-2020 William A. Kennington III <wak@google.com>

version-handler: Refactor handler construction

Instead of requiring callers to build maps and info blobs, take the
minimal required amount of information about the blob configuration and
build requi

version-handler: Refactor handler construction

Instead of requiring callers to build maps and info blobs, take the
minimal required amount of information about the blob configuration and
build required datastructures internally.

This reduces the amount of code, and nearly eliminates all of the
untested code in main.cpp.

Change-Id: Iaa398eb404814e9263e6707b71b38a9831d96697
Signed-off-by: William A. Kennington III <wak@google.com>

show more ...

a62c170422-Dec-2020 William A. Kennington III <wak@google.com>

version-handler: Remove create special cases

Our builder is validated to not pass invalid configurations to the
handler. Since we can guarantee the invariant that we will never
construct handlers wi

version-handler: Remove create special cases

Our builder is validated to not pass invalid configurations to the
handler. Since we can guarantee the invariant that we will never
construct handlers with null paramemters, we don't need have extra
checks.

Change-Id: I48d24874298c1c5ead74724921c86ea0a022a53c
Signed-off-by: William A. Kennington III <wak@google.com>

show more ...

c78bfc8205-Nov-2020 Jason Ling <jasonling@google.com>

version-handler: add version-handler, blob handler

Implement version-handler: a blob handler for retrieving version
information about a blob.

Problem: ipmi-flash(firmware-handler) provides a mechan

version-handler: add version-handler, blob handler

Implement version-handler: a blob handler for retrieving version
information about a blob.

Problem: ipmi-flash(firmware-handler) provides a mechanism to transfer
firmware updates, verify them and perform updates but there is no
mechanism to interrogate the firmware for its version.

Solution: version-handler provides handlers for retrieving information
about firmware blobs. Adding "version" syntax to "/flash/blob" entries
in the json configuration file enables this feature.
The mechanism to retrieve version is identical to the mechanism used by
firmware-handler to perform preparation, verification and updates (kick
off systemd targets).

Signed-off-by: Jason Ling <jasonling@google.com>
Change-Id: I28868ca8dd76d63af668d2e46b9359401d45f0bc

show more ...

85e54f1b05-Nov-2020 Jason Ling <jasonling@google.com>

version-handler: implement json parser

version-handler adds the following capability

- ipmi-flash blobs can add a "version" along with the required
nested properties. This enables versioning suppor

version-handler: implement json parser

version-handler adds the following capability

- ipmi-flash blobs can add a "version" along with the required
nested properties. This enables versioning support for that
flash blob.
For instance,
{
"blob" : "/flash/sink_seq",
"version":{ //now a /version/sink_seq blob will appear
"handler": {
"type: : "file", //only file type is supported
"path" : "/tmp/version_info" // file contents
// contain textual version.
// Content returned on read
},
"actions":{
"open" : { //on open launch a systemd target
"type" : "systemd",
"unit" : "version.target"
}
}
}
}

In the above example (pretend that the rest of the required
firmware-handler fields are present) firmware handler will create the
normal ipmi-flash blobs needed for updating firmware.
The addition of the "version" section activates the version-handler
which exposes a blob named /version/sink_seq.

Opening /version/sink_seq will kick off the action specified. In this
case the systemd target version.target will be launched. This service
should retrieve the version information and then place the contents in
the file specified by handler - path (/tmp/version_info).

The user at this point can poll (stat) the blob until the meta-data
indicates that read data is ready.

A read can be issued for /version/sink_seq. What is returned will be the
contents of /tmp/version_info.

Signed-off-by: Jason Ling <jasonling@google.com>
Change-Id: I7cc7bec2e08b013c6b77f8dfd2a502272ad2d3bd

show more ...


/openbmc/phosphor-ipmi-flash/.clang-format
/openbmc/phosphor-ipmi-flash/.gitignore
/openbmc/phosphor-ipmi-flash/.lcovrc
/openbmc/phosphor-ipmi-flash/LICENSE
/openbmc/phosphor-ipmi-flash/MAINTAINERS
/openbmc/phosphor-ipmi-flash/Makefile.am
/openbmc/phosphor-ipmi-flash/README.md
/openbmc/phosphor-ipmi-flash/bmc/Makefile.am
/openbmc/phosphor-ipmi-flash/bmc/buildjson.cpp
/openbmc/phosphor-ipmi-flash/bmc/buildjson.hpp
/openbmc/phosphor-ipmi-flash/bmc/file_handler.cpp
/openbmc/phosphor-ipmi-flash/bmc/file_handler.hpp
/openbmc/phosphor-ipmi-flash/bmc/firmware-handler/Makefile.am
/openbmc/phosphor-ipmi-flash/bmc/firmware-handler/config-bios.json.in
/openbmc/phosphor-ipmi-flash/bmc/firmware-handler/config-static-bmc-reboot.json.in
/openbmc/phosphor-ipmi-flash/bmc/firmware-handler/config-static-bmc-with-update-status.json.in
/openbmc/phosphor-ipmi-flash/bmc/firmware-handler/config-static-bmc.json.in
/openbmc/phosphor-ipmi-flash/bmc/firmware-handler/data_handler.hpp
/openbmc/phosphor-ipmi-flash/bmc/firmware-handler/firmware_handler.cpp
/openbmc/phosphor-ipmi-flash/bmc/firmware-handler/firmware_handler.hpp
/openbmc/phosphor-ipmi-flash/bmc/firmware-handler/firmware_handlers_builder.cpp
/openbmc/phosphor-ipmi-flash/bmc/firmware-handler/firmware_handlers_builder.hpp
/openbmc/phosphor-ipmi-flash/bmc/firmware-handler/lpc_aspeed.cpp
/openbmc/phosphor-ipmi-flash/bmc/firmware-handler/lpc_aspeed.hpp
/openbmc/phosphor-ipmi-flash/bmc/firmware-handler/lpc_handler.cpp
/openbmc/phosphor-ipmi-flash/bmc/firmware-handler/lpc_handler.hpp
/openbmc/phosphor-ipmi-flash/bmc/firmware-handler/lpc_nuvoton.cpp
/openbmc/phosphor-ipmi-flash/bmc/firmware-handler/lpc_nuvoton.hpp
/openbmc/phosphor-ipmi-flash/bmc/firmware-handler/main.cpp
/openbmc/phosphor-ipmi-flash/bmc/firmware-handler/mapper_errors.hpp
/openbmc/phosphor-ipmi-flash/bmc/firmware-handler/net_handler.cpp
/openbmc/phosphor-ipmi-flash/bmc/firmware-handler/net_handler.hpp
/openbmc/phosphor-ipmi-flash/bmc/firmware-handler/pci_handler.cpp
/openbmc/phosphor-ipmi-flash/bmc/firmware-handler/pci_handler.hpp
/openbmc/phosphor-ipmi-flash/bmc/firmware-handler/pci_nuvoton_handler.cpp
/openbmc/phosphor-ipmi-flash/bmc/firmware-handler/phosphor-ipmi-flash-bios-prepare.target.in
/openbmc/phosphor-ipmi-flash/bmc/firmware-handler/phosphor-ipmi-flash-bios-update.target.in
/openbmc/phosphor-ipmi-flash/bmc/firmware-handler/phosphor-ipmi-flash-bios-verify.target.in
/openbmc/phosphor-ipmi-flash/bmc/firmware-handler/phosphor-ipmi-flash-bmc-prepare.target.in
/openbmc/phosphor-ipmi-flash/bmc/firmware-handler/phosphor-ipmi-flash-bmc-update.target.in
/openbmc/phosphor-ipmi-flash/bmc/firmware-handler/phosphor-ipmi-flash-bmc-verify.target.in
/openbmc/phosphor-ipmi-flash/bmc/firmware-handler/test/Makefile.am
/openbmc/phosphor-ipmi-flash/bmc/firmware-handler/test/crc_mock.hpp
/openbmc/phosphor-ipmi-flash/bmc/firmware-handler/test/create_action_map.hpp
/openbmc/phosphor-ipmi-flash/bmc/firmware-handler/test/data_mock.hpp
/openbmc/phosphor-ipmi-flash/bmc/firmware-handler/test/file_handler_unittest.cpp
/openbmc/phosphor-ipmi-flash/bmc/firmware-handler/test/firmware_canhandle_unittest.cpp
/openbmc/phosphor-ipmi-flash/bmc/firmware-handler/test/firmware_close_unittest.cpp
/openbmc/phosphor-ipmi-flash/bmc/firmware-handler/test/firmware_commit_unittest.cpp
/openbmc/phosphor-ipmi-flash/bmc/firmware-handler/test/firmware_handler_unittest.cpp
/openbmc/phosphor-ipmi-flash/bmc/firmware-handler/test/firmware_json_unittest.cpp
/openbmc/phosphor-ipmi-flash/bmc/firmware-handler/test/firmware_multiplebundle_unittest.cpp
/openbmc/phosphor-ipmi-flash/bmc/firmware-handler/test/firmware_open_unittest.cpp
/openbmc/phosphor-ipmi-flash/bmc/firmware-handler/test/firmware_sessionstat_unittest.cpp
/openbmc/phosphor-ipmi-flash/bmc/firmware-handler/test/firmware_skip_unittest.cpp
/openbmc/phosphor-ipmi-flash/bmc/firmware-handler/test/firmware_stat_unittest.cpp
/openbmc/phosphor-ipmi-flash/bmc/firmware-handler/test/firmware_state_notyetstarted_tarball_unittest.cpp
/openbmc/phosphor-ipmi-flash/bmc/firmware-handler/test/firmware_state_notyetstarted_unittest.cpp
/openbmc/phosphor-ipmi-flash/bmc/firmware-handler/test/firmware_state_updatecompleted_unittest.cpp
/openbmc/phosphor-ipmi-flash/bmc/firmware-handler/test/firmware_state_updatepending_unittest.cpp
/openbmc/phosphor-ipmi-flash/bmc/firmware-handler/test/firmware_state_updatestarted_unittest.cpp
/openbmc/phosphor-ipmi-flash/bmc/firmware-handler/test/firmware_state_uploadinprogress_unittest.cpp
/openbmc/phosphor-ipmi-flash/bmc/firmware-handler/test/firmware_state_verificationcompleted_unittest.cpp
/openbmc/phosphor-ipmi-flash/bmc/firmware-handler/test/firmware_state_verificationpending_unittest.cpp
/openbmc/phosphor-ipmi-flash/bmc/firmware-handler/test/firmware_state_verificationstarted_unittest.cpp
/openbmc/phosphor-ipmi-flash/bmc/firmware-handler/test/firmware_unittest.hpp
/openbmc/phosphor-ipmi-flash/bmc/firmware-handler/test/firmware_write_unittest.cpp
/openbmc/phosphor-ipmi-flash/bmc/firmware-handler/test/firmware_writemeta_unittest.cpp
/openbmc/phosphor-ipmi-flash/bmc/firmware-handler/test/window_mapper_mock.hpp
/openbmc/phosphor-ipmi-flash/bmc/firmware-handler/window_hw_interface.hpp
/openbmc/phosphor-ipmi-flash/bmc/fs.cpp
/openbmc/phosphor-ipmi-flash/bmc/fs.hpp
/openbmc/phosphor-ipmi-flash/bmc/general_systemd.cpp
/openbmc/phosphor-ipmi-flash/bmc/general_systemd.hpp
/openbmc/phosphor-ipmi-flash/bmc/image_handler.hpp
/openbmc/phosphor-ipmi-flash/bmc/skip_action.cpp
/openbmc/phosphor-ipmi-flash/bmc/skip_action.hpp
/openbmc/phosphor-ipmi-flash/bmc/test/image_mock.hpp
/openbmc/phosphor-ipmi-flash/bmc/test/triggerable_mock.hpp
/openbmc/phosphor-ipmi-flash/bmc/version-handler/Makefile.am
Makefile.am
version_json_unittest.cpp
/openbmc/phosphor-ipmi-flash/bmc/version-handler/version_handler.hpp
/openbmc/phosphor-ipmi-flash/bmc/version-handler/version_handlers_builder.cpp
/openbmc/phosphor-ipmi-flash/bmc/version-handler/version_handlers_builder.hpp
/openbmc/phosphor-ipmi-flash/bmc_json_config.md
/openbmc/phosphor-ipmi-flash/bootstrap.sh
/openbmc/phosphor-ipmi-flash/cleanup/Makefile.am
/openbmc/phosphor-ipmi-flash/cleanup/cleanup.cpp
/openbmc/phosphor-ipmi-flash/cleanup/cleanup.hpp
/openbmc/phosphor-ipmi-flash/cleanup/fs.cpp
/openbmc/phosphor-ipmi-flash/cleanup/fs.hpp
/openbmc/phosphor-ipmi-flash/cleanup/main.cpp
/openbmc/phosphor-ipmi-flash/cleanup/test/Makefile.am
/openbmc/phosphor-ipmi-flash/cleanup/test/cleanup_handler_unittest.cpp
/openbmc/phosphor-ipmi-flash/cleanup/test/filesystem_mock.hpp
/openbmc/phosphor-ipmi-flash/configure.ac
/openbmc/phosphor-ipmi-flash/data.hpp
/openbmc/phosphor-ipmi-flash/flags.hpp
/openbmc/phosphor-ipmi-flash/internal/sys.cpp
/openbmc/phosphor-ipmi-flash/internal/sys.hpp
/openbmc/phosphor-ipmi-flash/ipmi_flash.md
/openbmc/phosphor-ipmi-flash/status.hpp
/openbmc/phosphor-ipmi-flash/tools/Makefile.am
/openbmc/phosphor-ipmi-flash/tools/bt.cpp
/openbmc/phosphor-ipmi-flash/tools/bt.hpp
/openbmc/phosphor-ipmi-flash/tools/handler.cpp
/openbmc/phosphor-ipmi-flash/tools/handler.hpp
/openbmc/phosphor-ipmi-flash/tools/helper.cpp
/openbmc/phosphor-ipmi-flash/tools/helper.hpp
/openbmc/phosphor-ipmi-flash/tools/interface.hpp
/openbmc/phosphor-ipmi-flash/tools/io.cpp
/openbmc/phosphor-ipmi-flash/tools/io.hpp
/openbmc/phosphor-ipmi-flash/tools/lpc.cpp
/openbmc/phosphor-ipmi-flash/tools/lpc.hpp
/openbmc/phosphor-ipmi-flash/tools/main.cpp
/openbmc/phosphor-ipmi-flash/tools/net.cpp
/openbmc/phosphor-ipmi-flash/tools/net.hpp
/openbmc/phosphor-ipmi-flash/tools/p2a.cpp
/openbmc/phosphor-ipmi-flash/tools/p2a.hpp
/openbmc/phosphor-ipmi-flash/tools/pci.cpp
/openbmc/phosphor-ipmi-flash/tools/pci.hpp
/openbmc/phosphor-ipmi-flash/tools/pciaccess.cpp
/openbmc/phosphor-ipmi-flash/tools/pciaccess.hpp
/openbmc/phosphor-ipmi-flash/tools/progress.cpp
/openbmc/phosphor-ipmi-flash/tools/progress.hpp
/openbmc/phosphor-ipmi-flash/tools/test/Makefile.am
/openbmc/phosphor-ipmi-flash/tools/test/data_interface_mock.hpp
/openbmc/phosphor-ipmi-flash/tools/test/internal_sys_mock.hpp
/openbmc/phosphor-ipmi-flash/tools/test/io_mock.hpp
/openbmc/phosphor-ipmi-flash/tools/test/io_unittest.cpp
/openbmc/phosphor-ipmi-flash/tools/test/pciaccess_mock.hpp
/openbmc/phosphor-ipmi-flash/tools/test/progress_mock.hpp
/openbmc/phosphor-ipmi-flash/tools/test/tools_bt_unittest.cpp
/openbmc/phosphor-ipmi-flash/tools/test/tools_helper_unittest.cpp
/openbmc/phosphor-ipmi-flash/tools/test/tools_lpc_unittest.cpp
/openbmc/phosphor-ipmi-flash/tools/test/tools_net_unittest.cpp
/openbmc/phosphor-ipmi-flash/tools/test/tools_pci_unittest.cpp
/openbmc/phosphor-ipmi-flash/tools/test/tools_updater_unittest.cpp
/openbmc/phosphor-ipmi-flash/tools/test/updater_mock.hpp
/openbmc/phosphor-ipmi-flash/tools/tool_errors.hpp
/openbmc/phosphor-ipmi-flash/tools/updater.cpp
/openbmc/phosphor-ipmi-flash/tools/updater.hpp
/openbmc/phosphor-ipmi-flash/util.hpp