Fix IPMI firmware update programming failure

The IPMI Firmware Update sequence fails on some systems. The update
process receives the new firmware image data in the /tmp file
system. During the final update phase the image is copied into the
/tmp/images subdirectory. If /tmp and /tmp/images are not part of the
same filesystem the std::filesystem::rename() function fails.

This commit changes the update process. The rename() is still
attempted. In the event the rename() fails, a copy() operation is
performed in the belief the destination is on a separate filesystem.

Tested:
Confirmed this change works on systems with a common /tmp filesystem.
Confirmed this change works on systems with the source file and the
destination file on different filesystems.

Change-Id: I5e3da6c0f453941ea54cb829d2bcaeadda0db438
Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com>
1 file changed
tree: 1a5a5d32a89c07eb17ae719c63706820ec5ec8ac
  1. cmake/
  2. docs/
  3. include/
  4. non-yocto/
  5. src/
  6. tests/
  7. .clang-format
  8. .gitignore
  9. cmake-format.json
  10. CMakeLists.txt
  11. CMakeLists.txt.in
  12. generate-allowlist.py
  13. ipmi-allowlist.conf
  14. LICENSE
  15. OWNERS
  16. README.md
README.md

Intel IPMI OEM support library

This component is intended to provide Intel-specific IPMI[3] command handlers for OpenBMC. These handlers are intended to integrate BMC with servers based on Intel architecture.

Overview

intel-ipmi-oem serves as an extension[1] to OpenBMC IPMI daemon[2]. It is compiled as a shared library and intended to both:

  • override existing implementation of standard IPMI commands to comply with Intel-specific solutions,
  • provide implementation for non-standard OEM extensions.

Capabilities

Related features provided by the library are grouped in separate source files. Main extensions to vanilla OpenBMC IPMI stack are the following:

  • Acquiring SMBIOS data over IPMI
  • Commands for better integration with Intel hardware
  • Firmware update extensions
  • Extended parsing of IPMI Platform Events[4]

References

  1. OpenBMC IPMI Architecture
  2. Phosphor IPMI Host
  3. IPMI Specification v2.0
  4. Intel Platform Events parsing