Skip to contentSkip to conversation

micropython build fixes

PATCH New Chris Packham 2 participants 5 messages Sep 23, 2015 – Sep 24, 2015

lore
Share & tools
lore
#0 lore raw

v3 cover micropython build fixes

The first 2 patches are unchanged from the ones sent individually to the list, the third is new and includes upstream fixes that we were already carrying as patches.

Chris Packham (3):
micropython: Invert fallback detection logic
micropython: Disable for Blackfin
micropython: Bump version to v1.4.6

 package/micropython/Config.in      | 3 +++
 package/micropython/micropython.mk | 7 ++-----
 2 files changed, 5 insertions(+), 5 deletions(-)
Signature · 1 line
2.5.0
#1 lore raw

PATCH v3 1/3 micropython: Invert fallback detection logic

Rather than specifying architectures that do not have explicit support in micropython invert the logic and set MICROPY_GCREGS_SETJMP=1 if the architecture does not have explicit support. MIPS is listed as being supported but this support consists of automatically defining MICROPY_GCREGS_SETJMP 1 based on __mips__ being defined.

---
This should clean up most of the remaining build failures. Listing the architectures with explicit support makes more sense to me and is certainly a shorter list at the moment.

Changes since v1:
- Use positive logic ifeq(,) instead of ifneq(,y)
Changes since v2:
- none

 package/micropython/micropython.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/micropython/micropython.mk +1 -1
index 7ae88a0..1358864 100644
@@ -15,7 +15,7 @@ MICROPYTHON_PATCH = \
 
 # Use fallback implementation for exception handling on architectures that don't
 # have explicit support.
-ifeq ($(BR2_powerpc)$(BR2_sh)$(BR2_xtensa),y)
+ifeq ($(BR2_i386)$(BR2_x86_64)$(BR2_arm)$(BR2_armeb),)
 MICROPYTHON_CFLAGS = -DMICROPY_GCREGS_SETJMP=1
 endif
 
Signature · 1 line
2.5.0
#2 lore raw

PATCH v3 2/3 micropython: Disable for Blackfin

In reply to Chris Packham

There are two problems building micropython for Blackfin. The first is some printf format specifier warnings/errors that seem to be triggered only for that architecture/compiler. This could be worked around by specifying CFLAGS=-Wno-error=format.

The second problem is that libffi doesn't provide the closure implementation on Blackfin. There is no known workaround for this issue.

For now disable micropython on Blackfin.

---
Changes since v1:
- Supress comment section on bfin also
- Re-order depends to list !BR2_bfin last
Changes since v2:
- None

 package/micropython/Config.in | 3 +++
 1 file changed, 3 insertions(+)
package/micropython/Config.in +3 -0
index c62b3ab..dae41b7 100644
@@ -2,6 +2,8 @@ config BR2_PACKAGE_MICROPYTHON
 	bool "micropython"
 	select BR2_PACKAGE_LIBFFI
 	depends on BR2_TOOLCHAIN_HAS_THREADS
+	# libffi doesn't provide the closure implementation on Blackfin
+	depends on !BR2_bfin
 	help
 	  Micro Python is a lean and fast implementation of the Python 3
 	  programming language that is optimised to run on a microcontroller.
@@ -10,3 +12,4 @@ config BR2_PACKAGE_MICROPYTHON
 
 comment "micropython needs a toolchain w/ threads"
 	depends on !BR2_TOOLCHAIN_HAS_THREADS
+	depends on !BR2_bfin
Signature · 1 line
2.5.0
#3 lore raw

PATCH v3 3/3 micropython: Bump version to v1.4.6

In reply to Chris Packham

---
This incorporates some build fixes that we were carrying as separate patches. Build tested for x86 and mips32.

Changes since v1/v2
- New patch

 package/micropython/micropython.mk | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
package/micropython/micropython.mk +1 -4
index 1358864..f5e0ce7 100644
@@ -4,14 +4,11 @@
 #
 ################################################################################
 
-MICROPYTHON_VERSION = v1.4.5
+MICROPYTHON_VERSION = v1.4.6
 MICROPYTHON_SITE = $(call github,micropython,micropython,$(MICROPYTHON_VERSION))
 MICROPYTHON_LICENSE = MIT
 MICROPYTHON_LICENSE_FILES = LICENSE
 MICROPYTHON_DEPENDENCIES = host-pkgconf libffi
-MICROPYTHON_PATCH = \
-	https://github.com/micropython/micropython/commit/8b4fb4fe140e9cf57fcfa258d0d2d6fe19090fc5.patch \
-	https://github.com/micropython/micropython/commit/587914169cc6ff7f0513bd14c42dcbb275bf77bd.patch
 
 # Use fallback implementation for exception handling on architectures that don't
 # have explicit support.
Signature · 1 line
2.5.0
#4 lore raw

v3 cover micropython build fixes

In reply to Chris Packham
Quoted 10 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Chris" == Chris Packham <[email protected]> writes:

The first 2 patches are unchanged from the ones sent individually to the list, the third is new and includes upstream fixes that we were already carrying as patches.

Chris Packham (3):
micropython: Invert fallback detection logic
micropython: Disable for Blackfin
micropython: Bump version to v1.4.6

Committed series, thanks.

Signature · 2 lines
Venlig hilsen,
Peter Korsgaard