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
diff --git a/bmc/version-handler/Makefile.am b/bmc/version-handler/Makefile.am
index 8370806..5f94379 100644
--- a/bmc/version-handler/Makefile.am
+++ b/bmc/version-handler/Makefile.am
@@ -5,6 +5,7 @@
noinst_LTLIBRARIES = libversionblob_common.la
libversionblob_common_la_SOURCES = \
+ version_handler.cpp \
version_handlers_builder.cpp
libversionblob_common_la_CXXFLAGS = \
@@ -21,4 +22,23 @@
-lstdc++fs
libversionblob_common_la_LIBADD = $(top_builddir)/libfirmware_common.la
libversionblob_common_la_LIBADD += $(top_builddir)/bmc/libbmc_common.la
+
+libversionblobdir = ${libdir}/ipmid-providers
+libversionblob_LTLIBRARIES = libversionblob.la
+libversionblob_la_SOURCES = \
+ main.cpp
+libversionblob_la_LIBADD = libversionblob_common.la
+libversionblob_la_LDFLAGS = \
+ $(SDBUSPLUS_LIBS) \
+ $(PHOSPHOR_LOGGING_LIBS) \
+ $(CODE_COVERAGE_LIBS) \
+ -lstdc++fs \
+ -version-info 0:0:0 -shared
+libversionblob_la_CXXFLAGS = \
+ -I$(top_srcdir) \
+ -I$(top_srcdir)/bmc \
+ $(SDBUSPLUS_CFLAGS) \
+ $(PHOSPHOR_LOGGING_CFLAGS) \
+ $(CODE_COVERAGE_CXXFLAGS) \
+ -flto
SUBDIRS = . test