From: "Jörg Krause" <joerg.krause@embedded.rocks>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v2] boot/uboot: fix build for sunxi targets
Date: Mon, 06 Mar 2017 21:28:55 +0100 [thread overview]
Message-ID: <1488832135.3156.5.camel@embedded.rocks> (raw)
In-Reply-To: <20170306202525.12879-1-joerg.krause@embedded.rocks>
Hi,
On Mon, 2017-03-06 at 21:25 +0100, J?rg Krause wrote:
> 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 <joerg.krause@embedded.rocks>
> Cc: Peter Korsgaard <peter@korsgaard.com>
> ---
> ?...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?= <joerg.krause@embedded.rocks>
> +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 <joerg.krause@embedded.rocks>
> +---
> + 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 <sjg@chromium.org>
> +--?
> +2.12.0
> +
Sorry, I forget the changelog:
v2:
* add patch to fix shebang instead of adding a host dependency for
python (suggested by Peter Korsgaard)
J?rg
next prev parent reply other threads:[~2017-03-06 20:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-06 20:25 [Buildroot] [PATCH v2] boot/uboot: fix build for sunxi targets Jörg Krause
2017-03-06 20:28 ` Jörg Krause [this message]
2017-03-06 23:05 ` Thomas Petazzoni
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1488832135.3156.5.camel@embedded.rocks \
--to=joerg.krause@embedded.rocks \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox