From patchwork Fri Oct 13 02:35:56 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matt Weber X-Patchwork-Id: 825203 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.137; helo=fraxinus.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3yCsKQ3yf7z9sNc for ; Fri, 13 Oct 2017 13:36:09 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id F07A888638; Fri, 13 Oct 2017 02:36:04 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id SsjTy_4XRg87; Fri, 13 Oct 2017 02:36:01 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 7B0CB88550; Fri, 13 Oct 2017 02:36:01 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id EF63E1C2630 for ; Fri, 13 Oct 2017 02:35:59 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id E37E1891CE for ; Fri, 13 Oct 2017 02:35:59 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xXMIo3a6dmhl for ; Fri, 13 Oct 2017 02:35:58 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from da1vs01.rockwellcollins.com (da1vs01.rockwellcollins.com [205.175.227.27]) by whitealder.osuosl.org (Postfix) with ESMTPS id AFD2F89131 for ; Fri, 13 Oct 2017 02:35:58 +0000 (UTC) Received: from ofwda1n02.rockwellcollins.com (HELO dtulimr02.rockwellcollins.com) ([205.175.227.14]) by da1vs01.rockwellcollins.com with ESMTP; 12 Oct 2017 21:35:57 -0500 X-Received: from linuxtest5810.rockwellcollins.com (linuxtest5810.rockwellcollins.com [131.199.101.22]) by dtulimr02.rockwellcollins.com (Postfix) with ESMTP id 608FA20062; Thu, 12 Oct 2017 21:35:57 -0500 (CDT) From: Matt Weber To: buildroot@buildroot.org Date: Thu, 12 Oct 2017 21:35:56 -0500 Message-Id: <20171013023556.25825-1-matthew.weber@rockwellcollins.com> X-Mailer: git-send-email 2.14.2.746.g8fb8a94 Subject: [Buildroot] [PATCH] uboot-tools: bugfix libfdt python build X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" The libfdt is using setup.py to perform the build of it's wrapper. This is being invoked with the system's python default vs the HOST_DIR's. This patch completes the uboot-tools source update to support an optional python intepreter override and for buildroot to supply that value when doing a host build. Bug/Feature submitted upstream: https://lists.denx.de/pipermail/u-boot/2017-October/309250.html Fixes: http://autobuild.buildroot.net/results/101/1014a6c2728ef49b332aa3ed169125a0d5a0ae1e/ Signed-off-by: Matthew Weber --- ...libfdt-give-setup-py-optional-interpreter.patch | 31 ++++++++++++++++++++++ package/uboot-tools/uboot-tools.mk | 9 ++++++- 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 package/uboot-tools/0004-libfdt-give-setup-py-optional-interpreter.patch diff --git a/package/uboot-tools/0004-libfdt-give-setup-py-optional-interpreter.patch b/package/uboot-tools/0004-libfdt-give-setup-py-optional-interpreter.patch new file mode 100644 index 0000000..e6e3783 --- /dev/null +++ b/package/uboot-tools/0004-libfdt-give-setup-py-optional-interpreter.patch @@ -0,0 +1,31 @@ +From 95de35336e2a6b4a292b2950dbb092077dcda565 Mon Sep 17 00:00:00 2001 +From: Matt Weber +Date: Thu, 12 Oct 2017 21:05:56 -0500 +Subject: [PATCH] libfdt: give setup.py optional interpreter + +If building in a sandboxed environment where a +alternate python interpreter is desired. Allow +configuring of the PYTHON variable to specify +the interpreter to invoke setup.py. + +Signed-off-by: Matthew Weber +--- + tools/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tools/Makefile b/tools/Makefile +index 77706a9..30505dc 100644 +--- a/tools/Makefile ++++ b/tools/Makefile +@@ -136,7 +136,7 @@ tools/_libfdt.so: $(LIBFDT_SRCS) $(LIBFDT_SWIG) + CPPFLAGS="$(_hostc_flags)" OBJDIR=tools \ + SOURCES="$(LIBFDT_SRCS) tools/libfdt.i" \ + SWIG_OPTS="-I$(srctree)/lib/libfdt -I$(srctree)/lib" \ +- $(libfdt_tree)/pylibfdt/setup.py --quiet build_ext \ ++ $(PYTHON) $(libfdt_tree)/pylibfdt/setup.py --quiet build_ext \ + --build-lib tools + + ifneq ($(CONFIG_MX23)$(CONFIG_MX28),) +-- +1.8.3.1 + diff --git a/package/uboot-tools/uboot-tools.mk b/package/uboot-tools/uboot-tools.mk index 4f39f4a..4fa77ca 100644 --- a/package/uboot-tools/uboot-tools.mk +++ b/package/uboot-tools/uboot-tools.mk @@ -75,6 +75,12 @@ define UBOOT_TOOLS_INSTALL_TARGET_CMDS $(UBOOT_TOOLS_INSTALL_DUMPIMAGE) endef +ifeq ($(BR2_PACKAGE_PYTHON3),y) +HOST_UBOOT_TOOLS_DEPENDENCIES += host-python3 +else +HOST_UBOOT_TOOLS_DEPENDENCIES += host-python +endif + define HOST_UBOOT_TOOLS_CONFIGURE_CMDS mkdir -p $(@D)/include/config touch $(@D)/include/config/auto.conf @@ -95,7 +101,8 @@ HOST_UBOOT_TOOLS_DEPENDENCIES += host-openssl endif define HOST_UBOOT_TOOLS_BUILD_CMDS - $(MAKE1) -C $(@D) $(HOST_UBOOT_TOOLS_MAKE_OPTS) tools-only + $(MAKE1) -C $(@D) $(HOST_UBOOT_TOOLS_MAKE_OPTS) \ + PYTHON="$(HOST_DIR)/bin/python" tools-only endef define HOST_UBOOT_TOOLS_INSTALL_CMDS