[PATCH v2 04/15] kconfig: introduce option to independently enable libfdt

Daniel P. Smith posted 15 patches 1 day, 10 hours ago
[PATCH v2 04/15] kconfig: introduce option to independently enable libfdt
Posted by Daniel P. Smith 1 day, 10 hours ago
Currently, the inclusion of libfdt is controlled by the CONFIG_HAS_DEVICE_TREE
kconfig flag. This flag also changes behavior in a few places, such as boot
module processing for XSM. To support the ability to include libfdt without
changing these behaviors, introduce CONFIG_LIB_DEVICE_TREE. The inclusion of
libfdt is then moved under CONFIG_LIB_DEVICE_TREE.

Signed-off-by: Daniel P. Smith <dpsmith@apertussolutions.com>
Reviewed-by: Jason Andryuk <jason.andryuk@amd.com>
---
Changes since v1:
- grammar and spelling fixes to commit message
- corrected indentation to Kconfig format
- relocated LIB_DEVICE_TREE to alphabet ordered location
---
 xen/common/Kconfig  | 4 ++++
 xen/common/Makefile | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/xen/common/Kconfig b/xen/common/Kconfig
index 6166327f4d14..028ed9c3631e 100644
--- a/xen/common/Kconfig
+++ b/xen/common/Kconfig
@@ -55,6 +55,7 @@ config HAS_COMPAT
 
 config HAS_DEVICE_TREE
 	bool
+	select LIB_DEVICE_TREE
 
 config HAS_DIT # Data Independent Timing
 	bool
@@ -89,6 +90,9 @@ config HAS_UBSAN
 config HAS_VMAP
 	bool
 
+config LIB_DEVICE_TREE
+	bool
+
 config MEM_ACCESS_ALWAYS_ON
 	bool
 
diff --git a/xen/common/Makefile b/xen/common/Makefile
index cba3b32733ba..3d29aef01155 100644
--- a/xen/common/Makefile
+++ b/xen/common/Makefile
@@ -79,7 +79,7 @@ obj-y += sched/
 obj-$(CONFIG_UBSAN) += ubsan/
 
 obj-$(CONFIG_NEEDS_LIBELF) += libelf/
-obj-$(CONFIG_HAS_DEVICE_TREE) += libfdt/
+obj-$(CONFIG_LIB_DEVICE_TREE) += libfdt/
 
 CONF_FILE := $(if $(patsubst /%,,$(KCONFIG_CONFIG)),$(objtree)/)$(KCONFIG_CONFIG)
 $(obj)/config.gz: $(CONF_FILE)
-- 
2.30.2