summaryrefslogtreecommitdiff
path: root/tools/Makefile
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2015-06-23 21:38:28 (GMT)
committerSimon Glass <sjg@chromium.org>2015-07-21 23:39:20 (GMT)
commit1043d0a0296a8580fd497a2eb1f411eb07ba98c1 (patch)
treed0ba49124779a39bcb4dc0a9050c1e3211ac5d63 /tools/Makefile
parentc3c4c00563abfca63f5b846f4f4f6fc390e58563 (diff)
downloadu-boot-1043d0a0296a8580fd497a2eb1f411eb07ba98c1.tar.xz
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>
Diffstat (limited to 'tools/Makefile')
-rw-r--r--tools/Makefile6
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/Makefile b/tools/Makefile
index 8ff9c2e..98414f7 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -58,7 +58,8 @@ hostprogs-$(CONFIG_FIT_SIGNATURE) += fit_info fit_check_sign
FIT_SIG_OBJS-$(CONFIG_FIT_SIGNATURE) := common/image-sig.o
# Flattened device tree objects
LIBFDT_OBJS := $(addprefix lib/libfdt/, \
- fdt.o fdt_ro.o fdt_rw.o fdt_strerror.o fdt_wip.o)
+ fdt.o fdt_ro.o fdt_rw.o fdt_strerror.o fdt_wip.o \
+ fdt_region.o)
RSA_OBJS-$(CONFIG_FIT_SIGNATURE) := $(addprefix lib/rsa/, \
rsa-sign.o rsa-verify.o rsa-checksum.o \
rsa-mod-exp.o)
@@ -155,6 +156,9 @@ hostprogs-$(CONFIG_ARMADA_XP) += kwboot
hostprogs-y += proftool
hostprogs-$(CONFIG_STATIC_RELA) += relocate-rela
+hostprogs-y += fdtgrep
+fdtgrep-objs += $(LIBFDT_OBJS) fdtgrep.o
+
# We build some files with extra pedantic flags to try to minimize things
# that won't build on some weird host compiler -- though there are lots of
# exceptions for files that aren't complaint.