Page 1 of 1

Need help: How to build a "Release" version

Posted: Wed Jun 13, 2018 6:27 pm
by Mike Teachman
I'm trying to figure out how the binary Released versions of MicroPython are built (e.g. esp8266-20180511-v1.9.4)

Why? The stable Release versions of MicroPython support more modules than the nightly builds (and my local build). For example, the Release of v1.9.4 includes the following modules, that are not in the nightly builds (or my local build):

example_pub_butt
example_sub_led
http_client
http_client_ssl
http_server
http_server_ssl
ssd1306
uasyncio/__init__
uasyncio/core
umqtt/robust
umqtt/simple
upysh
urequests
urllib/urequest


Does anyone know of documentation or Makefiles describing how the binary for a Released build is created.

Any help is greatly appreciated !

Re: Need help: How to build a "Release" version

Posted: Thu Jun 14, 2018 6:28 am
by pythoncoder
One solution is to clone micropython-lib, then put symlinks to the necessary libraries in your modules directory. I do this, but I appreciate it doesn't answer your question. Rather it answers the question "How can I incorporate libraries in a way that uses the latest MicroPython and micropython-lib code?".

You may well have your reasons for wanting to use a release build. Perhaps some Git guru will come forward with information on pulling a tagged version.

Re: Need help: How to build a "Release" version

Posted: Thu Jun 14, 2018 1:58 pm
by Mike Teachman
I've never tried the symbolic link approach to including modules from micropython-lib. Very powerful. Thanks for taking the time to describe it.

A lot of my question is based on curiousity. I've wondered where the config files are stored that control the content of the release builds. Right now I find the MicroPython release build content a bit of a mystery. I wish it was more transparent and documented.

There is one practical example for needing the release config files on github - I want to submit a pull request to get the MQTT package supported on the ESP32 released builds. But, if there isn't any configuration file on github I don't see how it will be possible to submit a pull request.

Re: Need help: How to build a "Release" version

Posted: Fri Jun 15, 2018 6:32 am
by pythoncoder
I see the problem but alas I don't know the answer. If nobody turns up a solution here you might raise an RFC issue on GitHub.

Are you aware that you can specify FROZEN_MPY_DIR=$DIRECTORY in a build script? This is extremely powerful. You write a build script for each project. Projects have their own modules directory, each with symlinks to their required libraries.

There are some examples of build scripts here. The Pyboard one also saves errors by checking and adapting for the Pyboard variant at runtime.

Re: Need help: How to build a "Release" version

Posted: Tue Jun 19, 2018 3:14 am
by Mike Teachman
That's new to me as well. I tried it out with "make FROZEN_MPY_DIR=$DIRECTORY". A good technique to easily create custom binaries with a unique sets of modules. Thanks for taking the time to share this!