mirror of
https://xff.cz/git/u-boot/
synced 2025-10-03 08:21:30 +02:00
fdt: Rename existing python libfdt module
Now that this module has been accepted upstream we should stop using the local U-Boot one. In preparation for this, rename it to indicate it is for legacy use. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
@@ -1,5 +1,4 @@
|
|||||||
/* File: libfdt.i */
|
%module libfdt_legacy
|
||||||
%module libfdt
|
|
||||||
|
|
||||||
%{
|
%{
|
||||||
#define SWIG_FILE_WITH_INIT
|
#define SWIG_FILE_WITH_INIT
|
@@ -22,17 +22,17 @@ else:
|
|||||||
cflags = None
|
cflags = None
|
||||||
|
|
||||||
libfdt_module = Extension(
|
libfdt_module = Extension(
|
||||||
'_libfdt',
|
'_libfdt_legacy',
|
||||||
sources = files,
|
sources = files,
|
||||||
extra_compile_args = cflags
|
extra_compile_args = cflags
|
||||||
)
|
)
|
||||||
|
|
||||||
sys.argv = [progname, '--quiet', 'build_ext', '--inplace', '--force']
|
sys.argv = [progname, '--quiet', 'build_ext', '--inplace', '--force']
|
||||||
|
|
||||||
setup (name = 'libfdt',
|
setup (name = 'libfdt_legaacy',
|
||||||
version = '0.1',
|
version = '0.1',
|
||||||
author = "SWIG Docs",
|
author = "SWIG Docs",
|
||||||
description = """Simple swig libfdt from docs""",
|
description = """Simple swig libfdt from docs""",
|
||||||
ext_modules = [libfdt_module],
|
ext_modules = [libfdt_module],
|
||||||
py_modules = ["libfdt"],
|
py_modules = ["libfdt_legacy"],
|
||||||
)
|
)
|
||||||
|
@@ -117,16 +117,17 @@ fit_check_sign-objs := $(dumpimage-mkimage-objs) fit_check_sign.o
|
|||||||
# Build a libfdt Python module if swig is available
|
# Build a libfdt Python module if swig is available
|
||||||
# Use 'sudo apt-get install swig libpython-dev' to enable this
|
# Use 'sudo apt-get install swig libpython-dev' to enable this
|
||||||
hostprogs-y += \
|
hostprogs-y += \
|
||||||
$(if $(shell which swig 2> /dev/null),_libfdt.so)
|
$(if $(shell which swig 2> /dev/null),_libfdt_legacy.so)
|
||||||
_libfdt.so-sharedobjs += $(LIBFDT_OBJS)
|
_libfdt_legacy.so-sharedobjs += $(LIBFDT_OBJS)
|
||||||
libfdt:
|
libfdt:
|
||||||
|
|
||||||
tools/_libfdt.so: $(patsubst %.o,%.c,$(LIBFDT_OBJS)) tools/libfdt_wrap.c
|
tools/_libfdt_legacy.so: $(patsubst %.o,%.c,$(LIBFDT_OBJS)) \
|
||||||
|
tools/libfdt_legacy_wrap.c
|
||||||
LDFLAGS="$(HOSTLDFLAGS)" CFLAGS= ${PYTHON} $(srctree)/lib/libfdt/setup.py \
|
LDFLAGS="$(HOSTLDFLAGS)" CFLAGS= ${PYTHON} $(srctree)/lib/libfdt/setup.py \
|
||||||
"$(_hostc_flags)" $^
|
"$(_hostc_flags)" $^
|
||||||
mv _libfdt.so $@
|
mv _libfdt_legacy.so $@
|
||||||
|
|
||||||
tools/libfdt_wrap.c: $(srctree)/lib/libfdt/libfdt.swig
|
tools/libfdt_legacy_wrap.c: $(srctree)/lib/libfdt/libfdt_legacy.swig
|
||||||
swig -python -o $@ $<
|
swig -python -o $@ $<
|
||||||
|
|
||||||
# TODO(sjg@chromium.org): Is this correct on Mac OS?
|
# TODO(sjg@chromium.org): Is this correct on Mac OS?
|
||||||
|
@@ -12,7 +12,7 @@ import sys
|
|||||||
import fdt
|
import fdt
|
||||||
from fdt import Fdt, NodeBase, PropBase
|
from fdt import Fdt, NodeBase, PropBase
|
||||||
import fdt_util
|
import fdt_util
|
||||||
import libfdt
|
import libfdt_legacy as libfdt
|
||||||
|
|
||||||
# This deals with a device tree, presenting it as a list of Node and Prop
|
# This deals with a device tree, presenting it as a list of Node and Prop
|
||||||
# objects, representing nodes and properties, respectively.
|
# objects, representing nodes and properties, respectively.
|
||||||
|
Reference in New Issue
Block a user