u-boot: fix binman/libfdt/pylibfdt build issue

Binman host tool in u-boot depends on libfdt library and pylibfdt module.
All the needed libraries and python modules are a part of u-boot.
This patch adds libfdt and pylibfdt to u-boot build:
- add required dependencies swig-native and python3-native
- fix python setup-tools issue: pass proper shared lib linker

Signed-off-by: Sergey Matyukevich <geomatsi@gmail.com>
This commit is contained in:
Sergey Matyukevich 2017-12-03 21:53:46 +03:00
parent 6499191c36
commit 1af0ae84d1
2 changed files with 16 additions and 1 deletions

View File

@ -0,0 +1,12 @@
diff --git a/tools/Makefile b/tools/Makefile
index 5db2a54..54bd224 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -134,6 +134,7 @@ tools/_libfdt.so: $(LIBFDT_SRCS) $(LIBFDT_SWIG)
$(Q)unset CC; \
unset CROSS_COMPILE; \
LDFLAGS="$(HOSTLDFLAGS)" CFLAGS= VERSION="u-boot-$(UBOOTVERSION)" \
+ CC="$(HOSTCC)" LDSHARED="$(HOSTLDSHARED)" \
CPPFLAGS="$(_hostc_flags)" OBJDIR=tools \
SOURCES="$(LIBFDT_SRCS) tools/libfdt.i" \
SWIG_OPTS="-I$(srctree)/lib/libfdt -I$(srctree)/lib" \

View File

@ -2,7 +2,7 @@ DESCRIPTION="Upstream's U-boot configured for sunxi devices"
require recipes-bsp/u-boot/u-boot.inc
DEPENDS += "dtc-native"
DEPENDS += " bc-native dtc-native swig-native python3-native "
LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://Licenses/README;md5=a2c678cfd4a4d97135585cad908541c6"
@ -15,6 +15,7 @@ DEFAULT_PREFERENCE_sun7i="1"
DEFAULT_PREFERENCE_sun8i="1"
SRC_URI = "git://git.denx.de/u-boot.git;branch=master \
file://u-boot-pylibfdt-native-build.patch \
file://boot.cmd \
"
@ -31,6 +32,8 @@ SPL_BINARY="u-boot-sunxi-with-spl.bin"
UBOOT_ENV_SUFFIX = "scr"
UBOOT_ENV = "boot"
EXTRA_OEMAKE += ' HOSTLDSHARED="${BUILD_CC} -shared ${BUILD_LDFLAGS} ${BUILD_CFLAGS}" '
do_compile_append() {
${B}/tools/mkimage -C none -A arm -T script -d ${WORKDIR}/boot.cmd ${WORKDIR}/${UBOOT_ENV_BINARY}
}