mirror of
https://github.com/dgibson/dtc.git
synced 2026-10-09 23:53:08 -04:00
Add an initial Python library for libfdt
Add Python bindings for a bare-bones set of libfdt functions. These allow navigating the tree and reading node names and properties. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
cdbb2b6c7a
commit
50f2507016
5 changed files with 488 additions and 0 deletions
17
pylibfdt/Makefile.pylibfdt
Normal file
17
pylibfdt/Makefile.pylibfdt
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
# Makefile.pylibfdt
|
||||
#
|
||||
|
||||
PYLIBFDT_srcs = $(addprefix $(LIBFDT_srcdir)/,$(LIBFDT_SRCS))
|
||||
WRAP = $(PYLIBFDT_objdir)/libfdt_wrap.c
|
||||
PYMODULE = $(PYLIBFDT_objdir)/_libfdt.so
|
||||
|
||||
$(PYMODULE): $(PYLIBFDT_srcs) $(WRAP)
|
||||
@$(VECHO) PYMOD $@
|
||||
python $(PYLIBFDT_objdir)/setup.py "$(CPPFLAGS)" $^
|
||||
mv _libfdt.so $(PYMODULE)
|
||||
|
||||
$(WRAP): $(PYLIBFDT_srcdir)/libfdt.swig
|
||||
@$(VECHO) SWIG $@
|
||||
$(SWIG) -python -o $@ $<
|
||||
|
||||
PYLIBFDT_cleanfiles = libfdt_wrap.c libfdt.py libfdt.pyc _libfdt.so
|
||||
Loading…
Add table
Add a link
Reference in a new issue