Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions conf/layer.conf
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ BBFILE_PATTERN_meta-micropython := "^${LAYERDIR}/"
BBFILE_PRIORITY_meta-micropython = "7"

LAYERDEPENDS_meta-micropython = "core"

LAYERSERIES_COMPAT_meta-micropython = "honister hardknott gatesgarth dunfell"
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,14 @@ SECTION = "devel/python"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=b4c9cf84e44b0961b744ae0ca6617ae6"

inherit autotools

INC_PR = "r1"
PR = "${INC_PR}.0"

SRC_URI = " \
https://github.com/micropython/micropython-lib/archive/v${PV}.tar.gz;name=src \
git://github.com/micropython/micropython-lib.git;name=src;tag=v${PV} \
"

SRC_URI[src.md5sum] = "e0b313e7d6378f52607844fd30d79630"
SRC_URI[src.sha256sum] = "eb696009ff8c33004211e484649b34edb14f3efb2ff618942bc8888716757a55"
S = "${WORKDIR}/git"

RDEPENDS_${PN} = "micropython"
RDEPENDS_${PN}-native = "micropython-native"
Expand All @@ -37,5 +34,3 @@ do_install() {
FILES_${PN} = " \
${libdir}/micropython/* \
"

BBCLASSEXTEND = "native"
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
diff -ur git.org/tools/make-frozen.py git/tools/make-frozen.py
--- git.org/tools/make-frozen.py 2021-05-08 11:07:17.883825233 +0000
+++ git/tools/make-frozen.py 2021-05-08 11:07:57.808084055 +0000
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# Create frozen modules structure for MicroPython.
#
Original file line number Diff line number Diff line change
Expand Up @@ -3,46 +3,54 @@ HOMEPAGE = "https://micropython.org"
SECTION = "devel/python"

LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=a8a14efdd86622bc2a34296228779da7"

inherit autotools-brokensep
LIC_FILES_CHKSUM = "file://LICENSE;md5=4d13714d609dce89ca5832f2e0864344"

INC_PR = "r1"
PR = "${INC_PR}.0"

SRC_URI = " \
gitsm://github.com/micropython/micropython.git;name=src;tag=v${PV} \
file://001-force-python3.patch \
"

S = "${WORKDIR}/git"

DEPENDS = "libffi"
DEPENDS = "libffi python3-native"

CPPFLAGS_append = " -Wno-error"
inherit autotools-brokensep

EXTRA_OEMAKE = " \
-C ${S}/unix \
MICROPY_USE_READLINE=0 \
V=1 \
DESTDIR="${D}" \
CC="${CC}" \
LD="${LD}" \
CROSS_COMPILE="${TARGET_PREFIX}" \
CWARN=" -Wno-error" \
PREFIX="${D}/usr" \
PYTHON="python3" \
"

do_compile() {
oe_runmake axtls
oe_runmake micropython
make -C ${S}/mpy-cross
oe_runmake -C ${S}/ports/unix submodules
oe_runmake -C ${S}/ports/unix
}

do_configure() {
:
}

RRECOMMENDS_${PN} = "micropython-lib"
do_install() {
install -d ${D}${bindir}/
cp -r --preserve=mode,links ${B}/ports/unix/micropython ${D}${bindir}/
}

FILES_${PN} = " \
${bindir}/micropython \
"

INSANE_SKIP_${PN} = "already-stripped"

BBCLASSEXTEND = "native"
RRECOMMENDS_${PN} = "micropython-lib"

INSANE_SKIP_${PN} = "already-stripped ldflags"