Move service files into repo and clean up OVERLAYS
Upstream request is to have service files in repo now.
Also limit scope of OVERLAYS flag to allow exports to
still work.
Change-Id: I61c8621a648556d277d4faf3dfe38a61343053ce
Signed-off-by: James Feist <james.feist@linux.intel.com>
diff --git a/src/Overlay.cpp b/src/Overlay.cpp
index f937dbe..0f25eb5 100644
--- a/src/Overlay.cpp
+++ b/src/Overlay.cpp
@@ -30,7 +30,7 @@
constexpr const char *DT_OVERLAY = "/usr/bin/dtoverlay";
constexpr const char *DTC = "/usr/bin/dtc";
constexpr const char *OUTPUT_DIR = "/tmp/overlays";
-constexpr const char *TEMPLATE_DIR = "/usr/share/overlay_templates";
+constexpr const char *TEMPLATE_DIR = PACKAGE_DIR "overlay_templates";
constexpr const char *TEMPLATE_CHAR = "$";
constexpr const char *HEX_FORMAT_STR = "0x";
constexpr const char *PLATFORM = "aspeed,ast2500";
@@ -356,6 +356,8 @@
continue;
}
std::string type = findType.value().get<std::string>();
+#if OVERLAYS
+
std::string typeFile = type + std::string(".template");
for (const auto &path : paths)
{
@@ -366,7 +368,7 @@
createOverlay(path.string(), configuration);
break;
}
-
+#endif
auto device = devices::exportTemplates.find(type.c_str());
if (device != devices::exportTemplates.end())
{