summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xMakefile.am1
-rw-r--r--activation.cpp1
-rw-r--r--activation.hpp2
-rw-r--r--image_verify.cpp1
-rw-r--r--image_verify.hpp8
-rw-r--r--images.hpp23
-rw-r--r--item_updater.cpp2
-rw-r--r--static/flash.cpp2
-rwxr-xr-xtest/Makefile.am3
9 files changed, 31 insertions, 12 deletions
diff --git a/Makefile.am b/Makefile.am
index 859b35d..1ac3914 100755
--- a/Makefile.am
+++ b/Makefile.am
@@ -5,6 +5,7 @@ noinst_HEADERS = \
download_manager.hpp \
watch.hpp \
version.hpp \
+ images.hpp \
image_manager.hpp \
item_updater.hpp \
activation.hpp
diff --git a/activation.cpp b/activation.cpp
index 421902a..863ea56 100644
--- a/activation.cpp
+++ b/activation.cpp
@@ -1,4 +1,5 @@
#include "activation.hpp"
+#include "images.hpp"
#include "item_updater.hpp"
#include "serialize.hpp"
#include <phosphor-logging/log.hpp>
diff --git a/activation.hpp b/activation.hpp
index 7f0120f..654d21f 100644
--- a/activation.hpp
+++ b/activation.hpp
@@ -199,7 +199,7 @@ class ActivationProgress : public ActivationProgressInherit
* @details A concrete implementation for
* xyz.openbmc_project.Software.Activation DBus API.
*/
-class Activation : public ActivationInherit, Flash
+class Activation : public ActivationInherit, public Flash
{
public:
/** @brief Constructs Activation Software Manager
diff --git a/image_verify.cpp b/image_verify.cpp
index 7d59910..7ca2629 100644
--- a/image_verify.cpp
+++ b/image_verify.cpp
@@ -4,6 +4,7 @@
#include <fcntl.h>
#include <openssl/err.h>
+#include "images.hpp"
#include "image_verify.hpp"
#include "config.h"
#include "version.hpp"
diff --git a/image_verify.hpp b/image_verify.hpp
index 3c9c2a4..98fda6f 100644
--- a/image_verify.hpp
+++ b/image_verify.hpp
@@ -28,14 +28,6 @@ using EVP_PKEY_Ptr = std::unique_ptr<EVP_PKEY, decltype(&::EVP_PKEY_free)>;
using EVP_MD_CTX_Ptr =
std::unique_ptr<EVP_MD_CTX, decltype(&::EVP_MD_CTX_destroy)>;
-// BMC flash image file name list.
-#ifdef UBIFS_LAYOUT
-const std::vector<std::string> bmcImages = {"image-kernel", "image-rofs",
- "image-rwfs", "image-u-boot"};
-#else
-const std::vector<std::string> bmcImages = {"image-bmc"};
-#endif
-
/** @struct CustomFd
*
* RAII wrapper for file descriptor.
diff --git a/images.hpp b/images.hpp
new file mode 100644
index 0000000..c82725f
--- /dev/null
+++ b/images.hpp
@@ -0,0 +1,23 @@
+#include <string>
+#include <vector>
+
+#include "config.h"
+
+namespace phosphor
+{
+namespace software
+{
+namespace image
+{
+
+// BMC flash image file name list.
+#ifdef UBIFS_LAYOUT
+const std::vector<std::string> bmcImages = {"image-kernel", "image-rofs",
+ "image-rwfs", "image-u-boot"};
+#else
+const std::vector<std::string> bmcImages = {"image-bmc"};
+#endif
+
+} // namespace image
+} // namespace software
+} // namespace phosphor
diff --git a/item_updater.cpp b/item_updater.cpp
index 03bc591..51523d4 100644
--- a/item_updater.cpp
+++ b/item_updater.cpp
@@ -12,7 +12,7 @@
#include <experimental/filesystem>
#include "version.hpp"
#include "serialize.hpp"
-#include "image_verify.hpp"
+#include "images.hpp"
namespace phosphor
{
diff --git a/static/flash.cpp b/static/flash.cpp
index 59c7a67..3ca7bfc 100644
--- a/static/flash.cpp
+++ b/static/flash.cpp
@@ -3,7 +3,7 @@
#include "activation.hpp"
#include "config.h"
#include "flash.hpp"
-#include "image_verify.hpp" // For bmcImages
+#include "images.hpp"
namespace
{
diff --git a/test/Makefile.am b/test/Makefile.am
index 0c59399..f0a94c6 100755
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -9,7 +9,8 @@ TESTS = $(check_PROGRAMS)
# Build/add utest to test suite
utest_CPPFLAGS = -Igtest $(GTEST_CPPFLAGS) $(AM_CPPFLAGS)
utest_CXXFLAGS = $(PTHREAD_CFLAGS) $(PHOSPHOR_LOGGING_CFLAGS) \
- $(PHOSPHOR_DBUS_INTERFACES_CFLAGS)
+ $(PHOSPHOR_DBUS_INTERFACES_CFLAGS) \
+ -DUBIFS_LAYOUT
utest_LDFLAGS = -lgtest_main -lgtest $(PTHREAD_LIBS) \
$(PHOSPHOR_DBUS_INTERFACES_LIBS) $(OESDK_TESTCASE_FLAGS) \
$(PHOSPHOR_LOGGING_LIBS) -lstdc++fs -lssl -lcrypto
OpenPOWER on IntegriCloud