Skip to content

Firmware sets: each board keeps its filesystem from one release to the next - #391

Merged
bdbarnett merged 2 commits into
mainfrom
release-fixed-fs
Nov 10, 2026
Merged

bdbarnett merged 2 commits into
mainfrom
release-fixed-fs

Conversation

@bdbarnett

@bdbarnett bdbarnett commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Closes #388.

Release images went through build_mp.py's autosize, so a release whose image grew past a 64 KB step shipped with the filesystem somewhere else, and a board updated from the firmware page booted with an empty one. The ESP32 boards already show it: between the staged set of 2026-10-21 and the workflow's set of 2026-11-09, the S3 boards' filesystem moved from 0x480000 to 0x560000, the P4 panel's from 0x4D0000 to 0x5C0000, and the P4 DEV-KIT's from 0x4E0000 to 0x610000 (read from each set's partition tables).

Every MicroPython esp32 and rp2 cell now names the filesystem it keeps (fs) and builds with --keep-fs at that size. The ESP32 sizes are the ones the 2026-11-09 set used: 10176K for the DEV-KIT, 26880K for the panel, 2688K for the two 8 MB S3 boards and 10880K for the T-Embed. The rp2 cells have never been released; they keep 704K (Pico 2) and 12416K (Pico Plus 2 W), what a build of all gets today. The Pico 2's board default of 1536K no longer fits all: the image is 3,203 KB. --keep-fs now works on esp32: it sizes the app partition so the filesystem is the last SIZE of the flash, and an image that doesn't fit stops the build and says what size would. assemble checks every filesystem is where its cell says (from the partition table on esp32; from the build's record, and the UF2's last address, on rp2) and writes fs_offset and fs_bytes into firmware.json. The draft's notes list each board's filesystem, and name at the top any board whose filesystem moved since the newest published set. Changing a cell's fs is how a release moves one on purpose.

Checked with the unit tests: each new check fails with its fault planted (the check removed, a moved table, a UF2 that writes into the filesystem, a cell without fs), and --keep-fs reproduces the five ESP32 cells' tables from the 2026-11-09 set exactly. Every ESP32-P4 build without a table of its own now uses variants/esp32/partitions.esp32p4.csv, a copy of upstream's partitions-4MiBplus.csv, so --keep-fs knows the panel's table before it builds.

Built locally with release_firmware.py build: the Pico Plus 2 W fits beside 12416K (94 % of its 3968 KB firmware region; the UF2 ends at 0x103A5200, the filesystem starts at 0x103E0000) and passes the assemble checks. The Pico 2 stopped beside 1536K with the new message, which is how 704K was chosen. On an ESP32-C3 with no table of ours, --keep-fs 1856K read the board's partitions-4MiBplus.csv, built once more against a sized copy and put the filesystem at 0x230000. --keep-fs 3584K stopped with "The firmware doesn't fit beside a 3584 KB filesystem. A 2304 KB one would fit it".

…e next

A release image went through the same autosize as a local build, so an image
that grew past a 64 KB step came out with its filesystem somewhere else, and a
board updated from the firmware page booted with an empty one. It already
happened on the ESP32 boards: between two sets a few weeks apart the S3
boards' filesystem moved from 0x480000 to 0x560000, the P4 panel's from
0x4D0000 to 0x5C0000 and the P4 DEV-KIT's from 0x4E0000 to 0x610000.

Every MicroPython esp32 and rp2 cell now names the filesystem it keeps (fs),
and builds with --keep-fs at that size. The sizes are the ones the last set
used. build_mp.py's --keep-fs works on esp32 too: it sizes the app partition so
the filesystem is the last SIZE of the flash, and an image that doesn't fit
stops the build with the size that would. assemble checks each filesystem is
where its cell says (from the partition table, or the rp2 build's record and
the UF2's last address) and writes it into firmware.json. The draft's notes
list each board's filesystem and name any board whose filesystem moved since
the newest published set. Every ESP32-P4 build without a table of its own now
uses ours, a copy of upstream's, so --keep-fs can size it before building.

Checked with the unit tests, each new check failing with its fault planted,
and esp32_keep_fs reproducing the five ESP32 cells' tables from the set of
2026-11-09.
@bdbarnett
bdbarnett merged commit e4099ac into main Nov 10, 2026
43 checks passed
@bdbarnett
bdbarnett deleted the release-fixed-fs branch November 10, 2026 09:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Released rp2 images can move the filesystem when a release's image grows, emptying boards that update

1 participant