From patchwork Mon Mar 6 20:25:25 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?J=C3=B6rg_Krause?= X-Patchwork-Id: 735926 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org 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 3vcWWT3rwfz9s8Y for ; Tue, 7 Mar 2017 07:25:41 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="key not found in DNS" (0-bit key; unprotected) header.d=embedded.rocks header.i=@embedded.rocks header.b="XKG9ahDY"; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id E8DA388825; Mon, 6 Mar 2017 20:25:39 +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 kRq_BlJmoHBg; Mon, 6 Mar 2017 20:25:39 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 83945887BF; Mon, 6 Mar 2017 20:25:38 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id D7AAC1C0562 for ; Mon, 6 Mar 2017 20:25:36 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id D3135884C2 for ; Mon, 6 Mar 2017 20:25:36 +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 wAWmApXzNJ8m for ; Mon, 6 Mar 2017 20:25:35 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mout02.posteo.de (mout02.posteo.de [185.67.36.142]) by fraxinus.osuosl.org (Postfix) with ESMTPS id DD63588400 for ; Mon, 6 Mar 2017 20:25:34 +0000 (UTC) Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 3vcWWH653Gz1093; Mon, 6 Mar 2017 21:25:31 +0100 (CET) Authentication-Results: mail.embedded.rocks (amavisd-new); dkim=pass reason="pass (just generated, assumed good)" header.d=embedded.rocks DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embedded.rocks; h=content-transfer-encoding:content-type:content-type :mime-version:x-mailer:message-id:date:date:subject:subject:from :from:received:received; s=default; t=1488831930; x=1489436731; bh=9tKiFNNoJnYlJUSHrMgQiUIfZcuI/xobXiDNbC2TMZY=; b=XKG9ahDYNKPG BQha/wHyGPoNx5DPgMgedbjaeLo+3R75bCKl4eR8MZVPlL69JyeXpAKyUSbywgoD EgTcd8EOE991SUgT7WopHUFHrDnNFttGIGPO+R8TfgnIwsfjkQP5rPq2g+drgH5V w6iddQ9uvSLeQazAx9xSGj+somm7s7K9YaPcD+OvKbJuOapOsogqWyN02TMGqQyA Q6rzFtqqBqTSXWhi/9ZZfZcTheUeRR1GgJGq8boQTigyjDbbelyqZDi0OLuc9nvX 0cfGThtx556u4k2E+ppKz/ISTeKqaYjC8KhfjYTr8O5C9GB8ECNEKZC5DJFM6YT1 0lWxNNSm/w== Received: from mail.embedded.rocks ([127.0.0.1]) by localhost (mail.embedded.rocks [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id Tpn4QHIKgK7x; Mon, 6 Mar 2017 21:25:30 +0100 (CET) Received: from nzxt.fritz.box (xd9ba2125.dyn.telefonica.de [217.186.33.37]) (Authenticated sender: joerg.krause@embedded.rocks) by mail.embedded.rocks (Postfix) with ESMTPSA; Mon, 6 Mar 2017 21:25:30 +0100 (CET) From: =?UTF-8?q?J=C3=B6rg=20Krause?= To: buildroot@buildroot.org Date: Mon, 6 Mar 2017 21:25:25 +0100 Message-Id: <20170306202525.12879-1-joerg.krause@embedded.rocks> X-Mailer: git-send-email 2.12.0 MIME-Version: 1.0 Subject: [Buildroot] [PATCH v2] boot/uboot: fix build for sunxi targets 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: , Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Since version 2017.01 U-Boot needs to run the binman tool on the host machine for building the 'u-boot-sunxi-with-spl.bin' target. The binman tool is written in Python 2 and therefore needs a Python 2 interpreter. The python scripts sets the shebang to: `#!/usr/bin/env python`. For modern Linux distributions `python` is used for the Python 3 interpreter. In this case, building U-Boot for a sunxi-based target fails: ``` BINMAN u-boot-sunxi-with-spl.bin File "./tools/binman/binman", line 49 print result ^ SyntaxError: Missing parentheses in call to 'print' make[1]: *** [Makefile:1090: u-boot-sunxi-with-spl.bin] Error 1 ``` Add a patch to fix the shebang to `#!/usr/bin/env python2` to ensure the Python 2 interpreter is used to run the script. Upstream status: Pending https://lists.denx.de/pipermail/u-boot/2017-March/283164.html Signed-off-by: Jörg Krause Cc: Peter Korsgaard --- ...n-change-shebang-from-python-into-python2.patch | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 boot/uboot/2017.01/0001-tools-binman-change-shebang-from-python-into-python2.patch diff --git a/boot/uboot/2017.01/0001-tools-binman-change-shebang-from-python-into-python2.patch b/boot/uboot/2017.01/0001-tools-binman-change-shebang-from-python-into-python2.patch new file mode 100644 index 000000000..875a962e6 --- /dev/null +++ b/boot/uboot/2017.01/0001-tools-binman-change-shebang-from-python-into-python2.patch @@ -0,0 +1,32 @@ +From 2d0e2173875d4df25c1642597cd68b14a0c8a733 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?J=C3=B6rg=20Krause?= +Date: Mon, 6 Mar 2017 21:02:58 +0100 +Subject: [PATCH] tools: binman: change shebang from python into python2 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This tool does not work with Python 3. Change the shebang to make sure the +script is run by a Python 2 interpreter. + +Upstream status: Pending +https://lists.denx.de/pipermail/u-boot/2017-March/283164.html + +Signed-off-by: Jörg Krause +--- + tools/binman/binman.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tools/binman/binman.py b/tools/binman/binman.py +index e1cb2fbb6f..857d698b4c 100755 +--- a/tools/binman/binman.py ++++ b/tools/binman/binman.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python2 + + # Copyright (c) 2016 Google, Inc + # Written by Simon Glass +-- +2.12.0 +