entity-manager: drop device tree overlay support

Don't suggest any support exists for something that is unused and
unsupported.  Remove all indicators of DT overlay support.

Change-Id: Ic7e72f4c4026e587c82f1ae437c9ee5b9649cad6
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 960f76d..821d4c7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -43,7 +43,6 @@
 set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fno-rtti")
 
 option (YOCTO "Enable Building in Yocto" OFF)
-option (USE_OVERLAYS "Enable Overlay Usage" ON)
 
 if (NOT YOCTO)
     externalproject_add (
@@ -156,10 +155,6 @@
 target_link_libraries (entity-manager stdc++fs)
 target_link_libraries (entity-manager ${Boost_LIBRARIES})
 target_link_libraries (entity-manager sdbusplus)
-if (USE_OVERLAYS) # overlays can be disabled because they require a kernel patch
-                  # as of today
-    target_compile_definitions (entity-manager PRIVATE OVERLAYS=1)
-endif ()
 
 if (NOT YOCTO)
     add_dependencies (entity-manager nlohmann-json)
@@ -186,7 +181,6 @@
 target_compile_definitions (fru-device PRIVATE PACKAGE_DIR="${PACKAGE_DIR}")
 install (TARGETS fru-device entity-manager DESTINATION bin)
 install (DIRECTORY configurations DESTINATION ${PACKAGE_DIR})
-install (DIRECTORY overlay_templates DESTINATION ${PACKAGE_DIR})
 install (DIRECTORY schemas DESTINATION ${PACKAGE_DIR}/configurations)
 install (FILES ${SERVICE_FILES} DESTINATION /lib/systemd/system/)
 install (FILES blacklist.json DESTINATION ${PACKAGE_DIR})
diff --git a/overlay_templates/IntelFanConnector.template b/overlay_templates/IntelFanConnector.template
deleted file mode 100644
index a835f69..0000000
--- a/overlay_templates/IntelFanConnector.template
+++ /dev/null
@@ -1,19 +0,0 @@
-/dts-v1/;
-/plugin/;
-/ {
-    compatible = "$Platform";
-    fragment@0{
-        target = <&pwm_tacho>;
-        __overlay__{
-            #address-cells = <1>;
-            #size-cells = <0>;
-            status = "okay";
-            oemname$Pwm = "$Name";
-            fan@$Pwm {
-                reg = <$Pwm>;
-                aspeed,fan-tach-ch = /bits/ 8 <$Tachs>;
-            };
-        };
-
-    };
-};
diff --git a/src/Overlay.cpp b/src/Overlay.cpp
index 8a9b906..e54d7bf 100644
--- a/src/Overlay.cpp
+++ b/src/Overlay.cpp
@@ -33,7 +33,6 @@
 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 = PACKAGE_DIR "overlay_templates";
 constexpr const char* TEMPLATE_CHAR = "$";
 constexpr const char* HEX_FORMAT_STR = "0x";
 constexpr const char* PLATFORM = "aspeed,ast2500";
@@ -356,16 +355,6 @@
 
 bool loadOverlays(const nlohmann::json& systemConfiguration)
 {
-
-    std::vector<std::filesystem::path> paths;
-    if (!findFiles(std::filesystem::path(TEMPLATE_DIR), R"(.*\.template)",
-                   paths))
-    {
-        std::cerr << "Unable to find any template files in " << TEMPLATE_DIR
-                  << "\n";
-        return false;
-    }
-
     std::filesystem::create_directory(OUTPUT_DIR);
     for (auto entity = systemConfiguration.begin();
          entity != systemConfiguration.end(); entity++)
@@ -392,19 +381,6 @@
                 continue;
             }
             std::string type = findType.value().get<std::string>();
-#if OVERLAYS
-
-            std::string typeFile = type + std::string(".template");
-            for (const auto& path : paths)
-            {
-                if (path.filename() != typeFile)
-                {
-                    continue;
-                }
-                createOverlay(path.string(), configuration);
-                break;
-            }
-#endif
             auto device = devices::exportTemplates.find(type.c_str());
             if (device != devices::exportTemplates.end())
             {