frudevice: add i2c bus blacklist json
The fru-device daemon contained a black list internally of buses to not
rescan in the future. This list was generated automatically by talking
to each bus. On a system where scanning the devices on a specific bus
can cause problems, extend that blacklist to be something that can be
specified for a machine.
This adds a file blacklist.json, which currently contains one field. An
array of bus integers named "buses." This file can be overwritten by a
platform recipe to drop in a list of buses to avoid scanning.
Tested: Verified that an empty, but valid json file (the default file
has no effect).
Tested: Verified that the array with an invalid type of entry is caught,
reported and the program exited.
Tested: Verified that the array with three valid entries prevents the
daemon from scanning the devices on those buses.
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: I1c426ebed2f7ac073ee45ed8b205e4a176a519ab
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 497f886..c57956c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -133,6 +133,7 @@
add_dependencies (entity-manager nlohmann-json)
add_dependencies (entity-manager sdbusplus-project)
add_dependencies (entity-manager valijson)
+ add_dependencies (fru-device nlohmann-json)
add_dependencies (fru-device valijson)
add_dependencies (fru-device sdbusplus-project)
add_dependencies (valijson nlohmann-json)
@@ -147,8 +148,10 @@
set (PACKAGE_DIR /usr/share/entity-manager/)
target_compile_definitions (entity-manager PRIVATE PACKAGE_DIR="${PACKAGE_DIR}"
-DBOOST_ASIO_DISABLE_THREADS)
+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})