
This is an abstract of the blog “How to Flash a Pre-Loaded Filesystem During Production” written by Mike Szczys from Golioth.

Zephyr’s filesystem API makes it simple to read and write to device flash, which is particularly useful when working with certificate authentication, machine learning models, or configuration data. In this blog, Mike Szczys from Golioth explains how to preload a filesystem and flash it as part of your production process, a technique that saves bandwidth, reduces power consumption, and simplifies updates.
Instead of embedding files directly into firmware, separating data into a dedicated filesystem offers flexibility. For example, machine learning models can be updated independently using OTA asset updates without touching the running firmware. Mike walks through building and flashing LittleFS images on Zephyr, including:
- Using the Zephyr LFS sample to create and format a filesystem
- Configuring custom partitions via devicetree overlays
- Reading and extracting filesystem data using littlefs-python
- Creating and flashing custom filesystem binaries
- Leveraging Zephyr’s filesystem shell to verify files on the device
This approach is especially valuable in production environments where the same data must be flashed across all devices or when secure, device-specific credentials need to be stored efficiently.
By managing filesystem content separately, manufacturers can streamline deployment, simplify OTA updates, and reduce firmware maintenance overhead.
Check out the full blog post here: How to Flash a Pre-Loaded Filesystem During Production