Refactor: Move serialize to ubi

Functions in serialize are specific to UBI, move it to ubi dir.

Tested: On the last commit of the patch series, run code update and
        factory reset on Witherspoon and all work fine.

Change-Id: I9176e638d9f3bfe0d424b57f8da4667a751cb5bd
Signed-off-by: Lei YU <mine260309@gmail.com>
diff --git a/Makefile.am b/Makefile.am
index 716e453..63601de 100755
--- a/Makefile.am
+++ b/Makefile.am
@@ -9,7 +9,6 @@
 openpower_update_manager_SOURCES = \
 	activation.cpp \
 	version.cpp \
-	serialize.cpp \
 	item_updater.cpp \
 	item_updater_main.cpp
 
diff --git a/activation.cpp b/activation.cpp
index 1660572..ce8cd07 100644
--- a/activation.cpp
+++ b/activation.cpp
@@ -3,7 +3,6 @@
 #include "activation.hpp"
 
 #include "item_updater.hpp"
-#include "serialize.hpp"
 
 #include <experimental/filesystem>
 #include <phosphor-logging/log.hpp>
diff --git a/test/Makefile.am b/test/Makefile.am
index c4165ec..1a94d0d 100755
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -33,7 +33,7 @@
 utest_LDADD = \
 	$(top_builddir)/openpower_update_manager-activation.o \
 	$(top_builddir)/openpower_update_manager-version.o \
-	$(top_builddir)/openpower_update_manager-serialize.o \
+	$(top_builddir)/ubi/openpower_update_manager-serialize.o \
 	$(top_builddir)/ubi/openpower_update_manager-watch.o \
 	$(top_builddir)/openpower_update_manager-item_updater.o \
 	$(top_builddir)/org/openbmc/Associations/openpower_update_manager-server.o \
diff --git a/ubi/Makefile.am.include b/ubi/Makefile.am.include
index c75293d..decf1e9 100644
--- a/ubi/Makefile.am.include
+++ b/ubi/Makefile.am.include
@@ -1,4 +1,5 @@
 openpower_update_manager_SOURCES += \
 	%reldir%/activation_ubi.cpp \
 	%reldir%/item_updater_ubi.cpp \
+	%reldir%/serialize.cpp \
 	%reldir%/watch.cpp
diff --git a/serialize.cpp b/ubi/serialize.cpp
similarity index 100%
rename from serialize.cpp
rename to ubi/serialize.cpp
diff --git a/serialize.hpp b/ubi/serialize.hpp
similarity index 100%
rename from serialize.hpp
rename to ubi/serialize.hpp