From patchwork Tue May 2 04:01:17 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matt Weber X-Patchwork-Id: 757382 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3wH6zX6Bl4z9sNH for ; Tue, 2 May 2017 14:01:28 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id A2D5D883B3; Tue, 2 May 2017 04:01:24 +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 SvO+sZplyY+h; Tue, 2 May 2017 04:01:23 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 1551C88331; Tue, 2 May 2017 04:01:23 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 4316C1BFFC3 for ; Tue, 2 May 2017 04:01:21 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 3D1F388B82 for ; Tue, 2 May 2017 04:01:21 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xl8G7EnmW8Cz for ; Tue, 2 May 2017 04:01:20 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from da1vs01.rockwellcollins.com (smtpimr.rockwellcollins.com [205.175.227.27]) by hemlock.osuosl.org (Postfix) with ESMTPS id 1C0B088B90 for ; Tue, 2 May 2017 04:01:19 +0000 (UTC) Received: from ofwda1n02.rockwellcollins.com (HELO ciulimr01.rockwellcollins.com) ([205.175.227.14]) by da1vs01.rockwellcollins.com with ESMTP; 01 May 2017 23:01:19 -0500 X-Received: from largo.rockwellcollins.com (unknown [192.168.140.76]) by ciulimr01.rockwellcollins.com (Postfix) with ESMTP id E922660174; Mon, 1 May 2017 23:01:18 -0500 (CDT) From: Matt Weber To: buildroot@buildroot.org Date: Mon, 1 May 2017 23:01:17 -0500 Message-Id: <1493697677-24802-1-git-send-email-matthew.weber@rockwellcollins.com> X-Mailer: git-send-email 1.9.1 Subject: [Buildroot] [PATCH 1/1] uboot-tools: disable libfdt swig wrapper 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 current tools build assumes the host system when trying to detect if swig/python are present. It then uses those tools from the path. The upstream RFC included this commit set's patch but offered up discussion on how to cleanly introduce a better method for detecting swig and using the tools. The tools build really needs to be sysroot and prefix/host dir tools aware. Upsteam submission for RFC: https://lists.denx.de/pipermail/u-boot/2017-May/289520.html Workaround for: http://autobuild.buildroot.net/results/6d5/6d52ac8bb71012aea6fc4c679691b31a3366728b Signed-off-by: Matthew Weber --- ...nditionally-disable-python-libfdt-wrapper.patch | 44 ++++++++++++++++++++++ package/uboot-tools/uboot-tools.mk | 5 +++ 2 files changed, 49 insertions(+) create mode 100644 package/uboot-tools/0005-tools-conditionally-disable-python-libfdt-wrapper.patch diff --git a/package/uboot-tools/0005-tools-conditionally-disable-python-libfdt-wrapper.patch b/package/uboot-tools/0005-tools-conditionally-disable-python-libfdt-wrapper.patch new file mode 100644 index 0000000..43be380 --- /dev/null +++ b/package/uboot-tools/0005-tools-conditionally-disable-python-libfdt-wrapper.patch @@ -0,0 +1,44 @@ +From 4dc3139cc9fa12882792053bdce7b69aca9b91bf Mon Sep 17 00:00:00 2001 +From: Matt Weber +Date: Mon, 1 May 2017 22:19:57 -0500 +Subject: [PATCH 1/1] tools: conditionally disable python libfdt wrapper + +Not all host systems want the default swig to be +used when building the tools. Allow for the +disabling of the wrapper to enable cross-compiling +of the tools on a host system with swig. + +Upsteam submission for RFC: +https://lists.denx.de/pipermail/u-boot/2017-May/289520.html + +Workaround for: +http://autobuild.buildroot.net/results/6d5/6d52ac8bb71012aea6fc4c679691b31a3366728b + +Signed-off-by: Matthew Weber +--- + tools/Makefile | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/tools/Makefile b/tools/Makefile +index 2fc4a58..7f6c29d 100644 +--- a/tools/Makefile ++++ b/tools/Makefile +@@ -114,6 +114,7 @@ fit_check_sign-objs := $(dumpimage-mkimage-objs) fit_check_sign.o + + # Build a libfdt Python module if swig is available + # Use 'sudo apt-get install swig libpython-dev' to enable this ++ifndef CONFIG_TOOLS_PYTHON_WRAPPER_DISABLE + hostprogs-y += \ + $(if $(shell which swig 2> /dev/null),_libfdt.so) + _libfdt.so-sharedobjs += $(LIBFDT_OBJS) +@@ -126,6 +127,7 @@ tools/_libfdt.so: $(patsubst %.o,%.c,$(LIBFDT_OBJS)) tools/libfdt_wrap.c + + tools/libfdt_wrap.c: $(srctree)/lib/libfdt/libfdt.swig + swig -python -o $@ $< ++endif + + # TODO(sjg@chromium.org): Is this correct on Mac OS? + +-- +1.9.1 + diff --git a/package/uboot-tools/uboot-tools.mk b/package/uboot-tools/uboot-tools.mk index 2585c7b..352f53d 100644 --- a/package/uboot-tools/uboot-tools.mk +++ b/package/uboot-tools/uboot-tools.mk @@ -21,6 +21,11 @@ UBOOT_TOOLS_MAKE_OPTS = CROSS_COMPILE="$(TARGET_CROSS)" \ LDFLAGS="$(TARGET_LDFLAGS)" \ STRIP=$(TARGET_STRIP) +# This option was added through an additional patch +# and allows the disabling of a host python swig +# detect which as of 2017.5 assumes the host systems swig. +UBOOT_TOOLS_MAKE_OPTS += CONFIG_TOOLS_PYTHON_WRAPPER_DISABLE=y + ifeq ($(BR2_PACKAGE_UBOOT_TOOLS_FIT_SUPPORT),y) UBOOT_TOOLS_MAKE_OPTS += CONFIG_FIT=y UBOOT_TOOLS_DEPENDENCIES += dtc