Skip to content

Enlarge the littlefs partition — index.html is close to filling it #377

Description

@Variour

Problem

partitions.csv reserves only 0x50000 (320 KB, minus LittleFS overhead) for the littlefs partition:

littlefs, data, spiffs,  0x3B0000, 0x50000,

data/index.html alone is currently 234 KB and has grown steadily over recent commits (~218 KB → 234 KB). The upload pipeline (scripts/pre_uploadfs.py) also generates a gzip sibling, index.html.gz (~56 KB), which is legitimately needed alongside the raw file — WebServer.h reads /index.html directly for SPA route fallbacks, while serveStatic uses the .gz sibling for bandwidth savings on normal requests. So index.html + index.html.gz alone already sit around 290 KB, before data/sc/*.json, wifi.json, and wifi.json.gz are added.

This already caused a lfs_write error(-28): File system is full. build failure once, triggered by a related bug where pre_uploadfs.py left stale .gz files in data/ across builds (fixed in commit 1ab7999). Even with that fix, the remaining headroom is only ~30 KB, and any further growth of index.html will overflow the partition again.

Proposed fix

Increase the littlefs partition size in partitions.csv, most likely by shrinking app0/app1 (currently 0x1D0000 / ~1.85 MB each for OTA dual-bank). Needs to be sized against actual current firmware binary size to make sure OTA still has enough room in both app slots.

Open questions

  • How much slack do the current app0/app1 firmware binaries have before this becomes a real constraint?
  • Should we also revisit whether the raw index.html needs to ship on top of index.html.gz, to reduce pressure independent of partition size?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions