]> git.karo-electronics.de Git - karo-tx-linux.git/commit
of/lib: Allow scripts/dtc/libfdt to be used from kernel code
authorDavid Daney <david.daney@cavium.com>
Thu, 5 Jul 2012 16:12:38 +0000 (18:12 +0200)
committerRalf Baechle <ralf@linux-mips.org>
Thu, 5 Jul 2012 16:12:38 +0000 (18:12 +0200)
commitea34c9379d21284bdb85073526a6002660ae957b
tree40e414abd85ec83e04000e62f48a24304bd804b7
parent95608b758a3553280d6540683c9551930454a196
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 <david.daney@cavium.com>
Cc: linux-mips@linux-mips.org
Cc: devicetree-discuss@lists.ozlabs.org
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: linux-kernel@vger.kernel.org
Acked-by: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
include/linux/libfdt.h [new file with mode: 0644]
include/linux/libfdt_env.h [new file with mode: 0644]
lib/Kconfig
lib/Makefile
lib/fdt.c [new file with mode: 0644]
lib/fdt_ro.c [new file with mode: 0644]
lib/fdt_rw.c [new file with mode: 0644]
lib/fdt_strerror.c [new file with mode: 0644]
lib/fdt_sw.c [new file with mode: 0644]
lib/fdt_wip.c [new file with mode: 0644]