Build how to?!?
Build how to?!?
I would like to start, building my own firmware image with my own frozen modules.
I found the "basic" build instructions here: https://github.com/micropython/micropyt ... structions
But this doesn't contain information about frozen modules.
Is there somewhere a project that will compile a own firmware? So i can look, how this can happen?
I found the "basic" build instructions here: https://github.com/micropython/micropyt ... structions
But this doesn't contain information about frozen modules.
Is there somewhere a project that will compile a own firmware? So i can look, how this can happen?
-
- Posts: 969
- Joined: Sat Feb 03, 2018 7:02 pm
Re: Build how to?!?
Check my scripts in "tools" directory. It copies to the frozen module directory and builds the firmware. Even have a script to set up the building environment.
https://github.com/kevinkk525/pysmartnode
https://github.com/kevinkk525/pysmartnode
Kevin Köck
Micropython Smarthome Firmware (with Home-Assistant integration): https://github.com/kevinkk525/pysmartnode
Micropython Smarthome Firmware (with Home-Assistant integration): https://github.com/kevinkk525/pysmartnode
Re: Build how to?!?
I've figured some stuff out by myself. Current work is here: https://github.com/jedie/micropython-so ... ch/pull/32
The destination is to have just a "update.sh" and a "compile.sh" ...
Current problem is xtensa-lx106-elf-standalone.tar.gz from https://github.com/jepler/esp-open-sdk/releases contains a very old xtensa-lx106-elf/bin/esptool.py
This is v1.2 and works only with Python 2... so it's crashed:
Is there somewhere a new version of xtensa-lx106-elf-standalone.tar.gz ?
The destination is to have just a "update.sh" and a "compile.sh" ...
Current problem is xtensa-lx106-elf-standalone.tar.gz from https://github.com/jepler/esp-open-sdk/releases contains a very old xtensa-lx106-elf/bin/esptool.py
This is v1.2 and works only with Python 2... so it's crashed:
Code: Select all
...
CC ../../drivers/dht/dht.c
CC build-GENERIC/frozen_content.c
LINK build-GENERIC/firmware.elf
text data bss dec hex filename
617296 1024 66368 684688 a7290 build-GENERIC/firmware.elf
Create /home/runner/work/micropython-sonoff-webswitch/micropython-sonoff-webswitch/build/firmware-combined.bin
File "/home/runner/work/micropython-sonoff-webswitch/micropython-sonoff-webswitch/xtensa-lx106-elf/bin/esptool.py", line 128
print 'Connecting...'
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print('Connecting...')?
Makefile:208: recipe for target '/home/runner/work/micropython-sonoff-webswitch/micropython-sonoff-webswitch/build/firmware-combined.bin' failed
make: *** [/home/runner/work/micropython-sonoff-webswitch/micropython-sonoff-webswitch/build/firmware-combined.bin] Error 1
Is there somewhere a new version of xtensa-lx106-elf-standalone.tar.gz ?
Re: Build how to?!?
I will take a look at this, thanks!kevinkk525 wrote: ↑Sun Dec 29, 2019 7:09 pmCheck my scripts in "tools" directory. It copies to the frozen module directory and builds the firmware. Even have a script to set up the building environment.
https://github.com/kevinkk525/pysmartnode
btw. have you tried to build the firmware as github actions? I try this. Current output: https://github.com/jedie/micropython-so ... /367018243
-
- Posts: 969
- Joined: Sat Feb 03, 2018 7:02 pm
Re: Build how to?!?
I have never tried that, looks interesting.
Kevin Köck
Micropython Smarthome Firmware (with Home-Assistant integration): https://github.com/kevinkk525/pysmartnode
Micropython Smarthome Firmware (with Home-Assistant integration): https://github.com/kevinkk525/pysmartnode
Re: Build how to?!?
Re: Build how to?!?
The idea is that a action creates a new github release.
-
- Posts: 169
- Joined: Fri Aug 19, 2016 11:55 am
Re: Build how to?!?
I’ve had good success with the Docker image recommended by jimmo. Really easy, nothing to install except Docker, no versioning conflicts.
Re: Build how to?!?
Good idea: But the https://hub.docker.com/r/larsks/esp-open-sdk image is also 2 years old. I try a new build.Christian Walther wrote: ↑Sun Dec 29, 2019 10:26 pmI’ve had good success with the Docker image recommended by jimmo. Really easy, nothing to install except Docker, no versioning conflicts.
Re: Build how to?!?
WIP: https://github.com/jedie/docker-esp-open-sdk
Image is available here: https://hub.docker.com/r/jedie/esp-open-sdk/
EDIT: https://github.com/jedie/docker-esp-open-sdk works now: build and pushed to docker hub via github action...
Now i started https://github.com/jedie/docker-micropython/ to build and push a docker image for compile esp8266 images...
It's hanging with:
See complete output: https://github.com/jedie/docker-micropy ... =378341163
Any idea?
EDIT: Found the problem: It's needed to build esp-open-sdk via "make STANDALONE=y" ... I fixed with: https://github.com/jedie/docker-esp-ope ... 684ee8f56b
Now, compiling the esp8266 firmware works, see: https://github.com/jedie/docker-micropy ... =378453918
Image is available here: https://hub.docker.com/r/jedie/esp-open-sdk/
EDIT: https://github.com/jedie/docker-esp-open-sdk works now: build and pushed to docker hub via github action...
Now i started https://github.com/jedie/docker-micropython/ to build and push a docker image for compile esp8266 images...
It's hanging with:
Code: Select all
...
GEN build-GENERIC/genhdr/mpversion.h
GEN build-GENERIC/genhdr/moduledefs.h
GEN build-GENERIC/genhdr/qstr.i.last
In file included from ../../py/mphal.h:32:0,
from ../../py/mpprint.c:33:
./esp_mphal.h:69:19: fatal error: osapi.h: No such file or directory
#include "osapi.h"
^
compilation terminated.
In file included from ../../py/mphal.h:32:0,
from ../../py/modbuiltins.c:231:
./esp_mphal.h:69:19: fatal error: osapi.h: No such file or directory
#include "osapi.h"
^
compilation terminated.
GEN build-GENERIC/genhdr/mpversion.h
GEN build-GENERIC/genhdr/moduledefs.h
GEN build-GENERIC/genhdr/qstr.i.last
In file included from ../../py/mphal.h:32:0,
from ../../py/mpprint.c:33:
./esp_mphal.h:69:19: fatal error: osapi.h: No such file or directory
#include "osapi.h"
^
compilation terminated.
In file included from ../../py/mphal.h:32:0,
from ../../py/modbuiltins.c:231:
./esp_mphal.h:69:19: fatal error: osapi.h: No such file or directory
#include "osapi.h"
^
compilation terminated.
...
Any idea?
EDIT: Found the problem: It's needed to build esp-open-sdk via "make STANDALONE=y" ... I fixed with: https://github.com/jedie/docker-esp-ope ... 684ee8f56b
Now, compiling the esp8266 firmware works, see: https://github.com/jedie/docker-micropy ... =378453918