]> git.karo-electronics.de Git - karo-tx-uboot.git/commit
fdt: Add fdtgrep tool
authorSimon Glass <sjg@chromium.org>
Tue, 23 Jun 2015 21:38:28 +0000 (15:38 -0600)
committerLothar Waßmann <LW@KARO-electronics.de>
Wed, 9 Sep 2015 11:34:26 +0000 (13:34 +0200)
commit11b2789ad2509b18eead658ddc9ee956871ddf95
tree753d06f7be822d4894f14dc9aa17e891dcaad592
parent3499d6a5369b3577a6687ea5e4d6fef5372c61d9
fdt: Add fdtgrep tool

This tool allows us to extract subsets of a device tree file. It is used by
the SPL vuild, which needs to cut down the device tree size for use in
limited memory.

This tool was originally written for libfdt but it has not been accepted
upstream, so for now, include it in U-Boot. Several utilfdt library
functions been included inline here.

If fdtgrep is eventually accepted in libfdt then we can bring that version
of libfdt in here, and drop fdtgrep (requiring that fdtgrep is provided by
the user).

If it is not accepted then another approach would be to write a special
tool for chopping down device tree files for SPL. While it would use the
same libfdt support, it would be less code than fdtgrep.c because it would
not have general-purpose functions.

Another approach (which was used with v1 of this series) is to sprinkler all
the device tree files with #ifdef. I don't like that idea.

Signed-off-by: Simon Glass <sjg@chromium.org>
tools/Makefile
tools/fdtgrep.c [new file with mode: 0644]