Clean up exported Mtd* functions

A lot of functions were added some time ago, nominally to support keeping
the firmware in an MTD device that wasn't formatted with the GPT headers.
That work was never completed, so these functions aren't used anywhere.

We may want to resurrect this work at some future point. Until then, this CL
just moves some of the functions into an "unused" file.

BUG=chromium:231567
BRANCH=ToT
TEST=manual

All tests pass, all firmware and external repos build.

Change-Id: I420dd52d1cea0418cedf2f8e834c61145915f20c
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/207037
Reviewed-by: Randall Spangler <rspangler@chromium.org>
diff --git a/Makefile b/Makefile
index dff0a38..33ca966 100644
--- a/Makefile
+++ b/Makefile
@@ -362,9 +362,9 @@
 	cgpt/cgpt_repair.c \
 	cgpt/cgpt_prioritize.c \
 	cgpt/cgpt_common.c \
+	cgpt/flash_ts.c \
 	cgpt/flash_ts_drv.c \
 	firmware/lib/cgptlib/mtdlib.c \
-	firmware/lib/flash_ts.c \
 	host/arch/${ARCH}/lib/crossystem_arch.c \
 	host/lib/crossystem.c \
 	host/lib/file_keys.c \
@@ -391,12 +391,12 @@
 	cgpt/cgpt_common.c \
 	cgpt/cgpt_create.c \
 	cgpt/cgpt_prioritize.c \
+	cgpt/flash_ts.c \
 	cgpt/flash_ts_drv.c \
 	firmware/lib/cgptlib/cgptlib_internal.c \
 	firmware/lib/cgptlib/crc32.c \
 	firmware/lib/cgptlib/mtdlib.c \
 	firmware/lib/crc8.c \
-	firmware/lib/flash_ts.c \
 	firmware/lib/tpm_lite/tlcl.c \
 	firmware/lib/utility_string.c \
 	firmware/lib/vboot_nvstorage.c \
@@ -422,11 +422,11 @@
 	cgpt/cgpt_common.c \
 	cgpt/cgpt_create.c \
 	cgpt/cgpt_prioritize.c \
+	cgpt/flash_ts.c \
 	cgpt/flash_ts_drv.c \
 	firmware/lib/cgptlib/cgptlib_internal.c \
 	firmware/lib/cgptlib/crc32.c \
 	firmware/lib/cgptlib/mtdlib.c \
-	firmware/lib/flash_ts.c \
 	firmware/lib/utility_string.c \
 	firmware/stub/utility_stub.c \
 	utility/dump_kernel_config_lib.c
@@ -457,8 +457,8 @@
 	cgpt/cmd_prioritize.c \
 	cgpt/cmd_repair.c \
 	cgpt/cmd_show.c \
-	cgpt/flash_ts_drv.c \
-	firmware/lib/flash_ts.c
+	cgpt/flash_ts.c \
+	cgpt/flash_ts_drv.c
 
 CGPT_OBJS = ${CGPT_SRCS:%.c=${BUILD}/%.o}
 ALL_OBJS += ${CGPT_OBJS}
@@ -1021,6 +1021,10 @@
 ${BUILD}/tests/vboot_common2_tests: LDLIBS += ${CRYPTO_LIBS}
 ${BUILD}/tests/vboot_common3_tests: LDLIBS += ${CRYPTO_LIBS}
 
+${BUILD}/tests/cgptlib_test: OBJS += \
+	${BUILD}/firmware/lib/cgptlib/mtdlib_unused.o
+${BUILD}/tests/cgptlib_test: ${BUILD}/firmware/lib/cgptlib/mtdlib_unused.o
+
 ${BUILD}/utility/bmpblk_utility: LD = ${CXX}
 ${BUILD}/utility/bmpblk_utility: LDLIBS = -llzma -lyaml