* [Buildroot] [PATCH] boot/uboot: fix build for sunxi targets
@ 2017-01-13 0:04 Jörg Krause
2017-01-13 15:11 ` Peter Korsgaard
0 siblings, 1 reply; 3+ messages in thread
From: Jörg Krause @ 2017-01-13 0:04 UTC (permalink / raw)
To: 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 so we need to add the python host package when building this
target, otherwise the build 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
```
Signed-off-by: J?rg Krause <joerg.krause@embedded.rocks>
---
boot/uboot/uboot.mk | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/boot/uboot/uboot.mk b/boot/uboot/uboot.mk
index 6b9d54454..02415ef63 100644
--- a/boot/uboot/uboot.mk
+++ b/boot/uboot/uboot.mk
@@ -280,6 +280,15 @@ endif
UBOOT_DEPENDENCIES += host-uboot-tools
endif
+# 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 so we need to add the python host package here.
+ifeq ($(BR2_TARGET_UBOOT_SPL),y)
+ifeq ($(findstring u-boot-sunxi-with-spl.bin,$(BR2_TARGET_UBOOT_SPL_NAME)),u-boot-sunxi-with-spl.bin)
+UBOOT_DEPENDENCIES += host-python
+endif
+endif
+
ifeq ($(BR2_TARGET_UBOOT)$(BR_BUILDING),yy)
#
--
2.11.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH] boot/uboot: fix build for sunxi targets
2017-01-13 0:04 [Buildroot] [PATCH] boot/uboot: fix build for sunxi targets Jörg Krause
@ 2017-01-13 15:11 ` Peter Korsgaard
2017-01-16 20:04 ` Jörg Krause
0 siblings, 1 reply; 3+ messages in thread
From: Peter Korsgaard @ 2017-01-13 15:11 UTC (permalink / raw)
To: buildroot
>>>>> "J?rg" == J?rg Krause <joerg.krause@embedded.rocks> writes:
> 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 so we need to add the python host package when building this
> target, otherwise the build 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
> ```
> Signed-off-by: J?rg Krause <joerg.krause@embedded.rocks>
That's not very nice :/
We already check for python on the build machine in dependencies.sh, so
perhaps we could patch the binman sources to be compatible with python
3 (and send the patch upstream)?
Is that something you could look into?
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH] boot/uboot: fix build for sunxi targets
2017-01-13 15:11 ` Peter Korsgaard
@ 2017-01-16 20:04 ` Jörg Krause
0 siblings, 0 replies; 3+ messages in thread
From: Jörg Krause @ 2017-01-16 20:04 UTC (permalink / raw)
To: buildroot
Hi Peter,
On Fri, 2017-01-13 at 16:11 +0100, Peter Korsgaard wrote:
> > > > > > "J?rg" == J?rg Krause <joerg.krause@embedded.rocks> writes:
>
> ?> 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 so we need to add the python host package when
> building this
> ?> target, otherwise the build 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
> ?> ```
>
> ?> Signed-off-by: J?rg Krause <joerg.krause@embedded.rocks>
>
> That's not very nice :/
>
> We already check for python on the build machine in dependencies.sh,
> so
> perhaps we could patch the binman sources to be compatible with
> python
> 3 (and send the patch upstream)?
>
> Is that something you could look into?
I would rather not do the porting, but I can ask upstream about
supporting Python 3.
J?rg
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-01-16 20:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-13 0:04 [Buildroot] [PATCH] boot/uboot: fix build for sunxi targets Jörg Krause
2017-01-13 15:11 ` Peter Korsgaard
2017-01-16 20:04 ` Jörg Krause
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox