lib: utils/fdt: Use kconfig for enabling/disabling

We update FDT support makefile to use kconfig for enabling/disabling.
To avoid compilation errors, we also enable FDT for each platform.

Signed-off-by: Anup Patel <apatel@ventanamicro.com>
Tested-by: Andrew Jones <ajones@ventanamicro.com>
Acked-by: Atish Patra <atishp@rivosinc.com>
Tested-by: Atish Patra <atishp@rivosinc.com>
This commit is contained in:
Anup Patel
2022-08-08 09:34:08 +05:30
committed by Anup Patel
parent 5616aa4f4a
commit 68d7b85ec7
21 changed files with 66 additions and 6 deletions

18
lib/utils/fdt/Kconfig Normal file
View File

@@ -0,0 +1,18 @@
# SPDX-License-Identifier: BSD-2-Clause
menuconfig FDT
bool "Flattened Device Tree (FDT) support"
select LIBFDT
default n
if FDT
config FDT_DOMAIN
bool "FDT domain support"
default n
config FDT_PMU
bool "FDT performance monitoring unit (PMU) support"
default n
endif

View File

@@ -4,7 +4,7 @@
# Copyright (C) 2020 Bin Meng <bmeng.cn@gmail.com>
#
libsbiutils-objs-y += fdt/fdt_domain.o
libsbiutils-objs-y += fdt/fdt_pmu.o
libsbiutils-objs-y += fdt/fdt_helper.o
libsbiutils-objs-y += fdt/fdt_fixup.o
libsbiutils-objs-$(CONFIG_FDT_DOMAIN) += fdt/fdt_domain.o
libsbiutils-objs-$(CONFIG_FDT_PMU) += fdt/fdt_pmu.o
libsbiutils-objs-$(CONFIG_FDT) += fdt/fdt_helper.o
libsbiutils-objs-$(CONFIG_FDT) += fdt/fdt_fixup.o