aboutsummaryrefslogtreecommitdiff
path: root/tools/Makefile
diff options
context:
space:
mode:
authorSimon Glass2016-07-04 11:58:11 -0600
committerSimon Glass2016-07-14 20:40:24 -0600
commit76bce10d2131938fcd5b1bbb0479cdb66daffa29 (patch)
treeedc401884865e52492e540588a87ffaec83489e5 /tools/Makefile
parentdbbe2e6401fc8539f456cab7ef1dd38f9495591d (diff)
dm: Add a more efficient libfdt library
Add a Python version of the libfdt library which contains enough features to support the dtoc tool. This is only a very bare-bones implementation. It requires the 'swig' to build. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/Makefile')
-rw-r--r--tools/Makefile11
1 files changed, 11 insertions, 0 deletions
diff --git a/tools/Makefile b/tools/Makefile
index f72294a98a5..2731b7ac9f5 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -107,6 +107,17 @@ mkimage-objs := $(dumpimage-mkimage-objs) mkimage.o
fit_info-objs := $(dumpimage-mkimage-objs) fit_info.o
fit_check_sign-objs := $(dumpimage-mkimage-objs) fit_check_sign.o
+hostprogs-$(CONFIG_SPL_OF_PLATDATA) += _libfdt.so
+_libfdt.so-sharedobjs += $(LIBFDT_OBJS)
+libfdt:
+
+tools/_libfdt.so: $(patsubst %.o,%.c,$(LIBFDT_OBJS)) tools/libfdt_wrap.c
+ python $(srctree)/lib/libfdt/setup.py "$(_hostc_flags)" $^
+ mv _libfdt.so $@
+
+tools/libfdt_wrap.c: $(srctree)/lib/libfdt/libfdt.swig
+ swig -python -o $@ $<
+
# TODO(sjg@chromium.org): Is this correct on Mac OS?
ifneq ($(CONFIG_MX23)$(CONFIG_MX28),)