diff mbox series

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

Message ID 20241226165740.29812-5-dpsmith@apertussolutions.com (mailing list archive)
State New
Headers show
Series Hyperlaunch device tree for dom0 | expand

Commit Message

Daniel P. Smith Dec. 26, 2024, 4:57 p.m. UTC
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 mbox series

Patch

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)