ESP32 installation packages

An ESP32 installation package is simply one executable binary file (generated by compiler/linker). By default the PlatformIO build generates binary file named firmware.bin. It is convinient to name this binary file as “installation package” in such way that it is known to user to be installation package, for which device and that version updates can be recommended automatically. Similarly it is useful to organize installation packages systematically in directory tree.

Conventions, iocafe

The firmware.bin which needs to be renamed so that the file name includes the IO application name, program version and the target architecture. Convention used by us is to keep all installation packages in subdirectories under /coderoot/packages directory. I make version numbers simply by YYMMDD-HHMM. This allows sorting versions to time order and selecting newest one. Convention of naming debian packages as organization-application-versiondate-versiontime-osname-architecture.deb enables meaningful searches. For example to find newest available package for application “candy” running on “esp32” architecture.

Creating a ESP32 installation package

  • Version number files generated at build time.
  • Firmware.bin is moved to /coderoot/packages and renamed.

Script for copying and renaming firmware.bin

Script /coderoot/eosal/scripts/ can be used to copy the firmware.bin into /coderoot/packages directory and rename it. See “Automatic version numbers by date and time”.

To do/consider

  • Since the “ESP32 installation package” is simply the executable binary, it could be tampered with and modified version loaded. We should add cryptographic signatures to the file, setup some chain of trust and check the validity of digital signature when installing.

200706, updated 6.7.2020/pekka