From ab25383983fb8d7786696f5371e75e79c3e9a405 Mon Sep 17 00:00:00 2001 From: David Daney Date: Thu, 5 Jul 2012 18:12:38 +0200 Subject: of/lib: Allow scripts/dtc/libfdt to be used from kernel code libfdt is part of the device tree support in scripts/dtc/libfdt. For some platforms that use the Device Tree, we want to be able to edit the flattened device tree form. We don't want to burden kernel builds that do not require it, so we gate compilation of libfdt files with CONFIG_LIBFDT. So if it is needed, you need to do this in your Kconfig: select LIBFDT And in the Makefile of the code using libfdt something like: ccflags-y := -I$(src)/../../../scripts/dtc/libfdt Signed-off-by: David Daney Cc: linux-mips@linux-mips.org Cc: devicetree-discuss@lists.ozlabs.org Cc: Grant Likely Cc: linux-kernel@vger.kernel.org Acked-by: Rob Herring Signed-off-by: Ralf Baechle --- lib/fdt_strerror.c | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 lib/fdt_strerror.c (limited to 'lib/fdt_strerror.c') diff --git a/lib/fdt_strerror.c b/lib/fdt_strerror.c new file mode 100644 index 000000000000..8713e3ff4707 --- /dev/null +++ b/lib/fdt_strerror.c @@ -0,0 +1,2 @@ +#include +#include "../scripts/dtc/libfdt/fdt_strerror.c" -- cgit v1.2.3