Import devel/arduino-esp8266: esp8266 arduino core toolset

Framework to program Espressif ESP8266 chipsets via the Arduino environment.

Testing paco@

Input jca@

Ok paco@ jca@ sthen@
This commit is contained in:
tracey 2020-04-23 14:28:54 +00:00
parent ea268fd5cd
commit d35beafccd
9 changed files with 3476 additions and 0 deletions

View File

@ -0,0 +1,41 @@
# $OpenBSD: Makefile,v 1.1.1.1 2020/04/23 14:28:54 tracey Exp $
COMMENT = esp8266 arduino core toolset
V = 2.6.3
DISTNAME = esp8266-${V}
PKGNAME = arduino-${DISTNAME}
CATEGORIES = devel
MAINTAINER = Tracey Emery <tracey@openbsd.org>
#LGPLv2.1, MIT, BSD, Zlib
PERMIT_PACKAGE = Yes
MASTER_SITES = https://github.com/esp8266/Arduino/releases/download/${V}/
EXTRACT_SUFX = .zip
MODPY_VERSION = ${MODPY_DEFAULT_VERSION_3}
MODULES = lang/python
RUN_DEPENDS += devel/arduino \
devel/esptool-ck \
devel/py-esptool${MODPY_FLAVOR} \
devel/mkspiffs \
devel/xtensa-lx106-elf/gcc
INSTALLDIR = ${PREFIX}/share/arduino/hardware/espressif/esp8266
NO_TEST = Yes
post-patch:
${SUBST_CMD} ${WRKDIST}/platform.txt
do-build:
${MODPY_BIN} ${MODPY_LIBDIR}/compileall.py ${WRKSRC}
do-install:
@mkdir -p ${INSTALLDIR}
@cp -r ${WRKDIST}/* ${INSTALLDIR}
.include <bsd.port.mk>

View File

@ -0,0 +1,2 @@
SHA256 (esp8266-2.6.3.zip) = iFefsFu3/aCwm/uzJavQ7qFeUemwnVe9nrD/jFGvW/E=
SIZE (esp8266-2.6.3.zip) = 34257589

View File

@ -0,0 +1,14 @@
$OpenBSD: patch-libraries_LittleFS_lib_littlefs_scripts_corrupt_py,v 1.1.1.1 2020/04/23 14:28:54 tracey Exp $
Index: libraries/LittleFS/lib/littlefs/scripts/corrupt.py
--- libraries/LittleFS/lib/littlefs/scripts/corrupt.py.orig
+++ libraries/LittleFS/lib/littlefs/scripts/corrupt.py
@@ -34,7 +34,7 @@ def main(args):
args.blocks.append('blocks/%x' % last)
for block in args.blocks:
- print 'corrupting %s' % block
+ print('corrupting %s' % block)
corrupt(block)
if __name__ == "__main__":

View File

@ -0,0 +1,40 @@
$OpenBSD: patch-libraries_LittleFS_lib_littlefs_scripts_debug_py,v 1.1.1.1 2020/04/23 14:28:54 tracey Exp $
Index: libraries/LittleFS/lib/littlefs/scripts/debug.py
--- libraries/LittleFS/lib/littlefs/scripts/debug.py.orig
+++ libraries/LittleFS/lib/littlefs/scripts/debug.py
@@ -59,14 +59,14 @@ def main(*blocks):
pass
if not file:
- print 'Bad metadata pair {%s}' % ', '.join(blocks)
+ print('Bad metadata pair {%s}' % ', '.join(blocks))
return 1
- print "--- %s ---" % ', '.join(v for _,v in sorted(versions, reverse=True))
+ print("--- %s ---" % ', '.join(v for _,v in sorted(versions, reverse=True)))
# go through each tag, print useful information
- print "%-4s %-8s %-14s %3s %4s %s" % (
- 'off', 'tag', 'type', 'id', 'len', 'dump')
+ print("%-4s %-8s %-14s %3s %4s %s" % (
+ 'off', 'tag', 'type', 'id', 'len', 'dump'))
tag = 0xffffffff
off = 4
@@ -92,13 +92,13 @@ def main(*blocks):
else:
crc = binascii.crc32(data, crc)
- print '%04x: %08x %-15s %3s %4s %-23s %-8s' % (
+ print('%04x: %08x %-15s %3s %4s %-23s %-8s' % (
off, tag,
typeof(type) + (' bad!' if iscrc and ~crc else ''),
hex(id)[2:] if id != 0x3ff else '.',
size if size != 0x3ff else 'x',
' '.join('%02x' % ord(c) for c in data[:8]),
- ''.join(c if c >= ' ' and c <= '~' else '.' for c in data[:8]))
+ ''.join(c if c >= ' ' and c <= '~' else '.' for c in data[:8])))
off += size if size != 0x3ff else 0
if iscrc:

View File

@ -0,0 +1,17 @@
$OpenBSD: patch-libraries_LittleFS_lib_littlefs_scripts_prefix_py,v 1.1.1.1 2020/04/23 14:28:54 tracey Exp $
Index: libraries/LittleFS/lib/littlefs/scripts/prefix.py
--- libraries/LittleFS/lib/littlefs/scripts/prefix.py.orig
+++ libraries/LittleFS/lib/littlefs/scripts/prefix.py
@@ -52,9 +52,9 @@ def main(from_prefix, to_prefix=None, files=None):
subprocess.check_call(['git', 'add', newname])
# Summary
- print '%s: %d replacements' % (
+ print('%s: %d replacements' % (
'%s -> %s' % (oldname, newname) if namecount else oldname,
- count)
+ count))
if __name__ == "__main__":
import sys

View File

@ -0,0 +1,16 @@
$OpenBSD: patch-libraries_LittleFS_lib_littlefs_scripts_results_py,v 1.1.1.1 2020/04/23 14:28:54 tracey Exp $
Index: libraries/LittleFS/lib/littlefs/scripts/results.py
--- libraries/LittleFS/lib/littlefs/scripts/results.py.orig
+++ libraries/LittleFS/lib/littlefs/scripts/results.py
@@ -21,8 +21,8 @@ def main():
runtime = time.time() - os.stat('blocks').st_ctime
- print 'results: %dB %dB %dB %.3fs' % (
- read_count, prog_count, erase_count, runtime)
+ print('results: %dB %dB %dB %.3fs' % (
+ read_count, prog_count, erase_count, runtime))
if __name__ == "__main__":
main(*sys.argv[1:])

View File

@ -0,0 +1,18 @@
$OpenBSD: patch-platform_txt,v 1.1.1.1 2020/04/23 14:28:54 tracey Exp $
Index: platform.txt
--- platform.txt.orig
+++ platform.txt
@@ -9,9 +9,9 @@ name=ESP8266 Boards (2.6.3)
version=2.6.3
# These will be removed by the packager script when doing a JSON release
-
-
-
+runtime.tools.xtensa-lx106-elf-gcc.path=${LOCALBASE}
+runtime.tools.python3.path=${LOCALBASE}/bin/
+runtime.tools.esptool.path=${LOCALBASE}/bin
runtime.tools.signing={runtime.platform.path}/tools/signing.py
runtime.tools.elf2bin={runtime.platform.path}/tools/elf2bin.py

View File

@ -0,0 +1 @@
Framework to program Espressif ESP8266 chipsets via the Arduino environment.

File diff suppressed because it is too large Load Diff