M5Stack Imager is an M5Stack-oriented fork of Raspberry Pi Imager for writing operating-system images to M5Stack Raspberry Pi devices such as CM4Stack and CardputerZero.
This repository currently keeps the upstream Qt/C++ writing engine, removable drive handling, checksum verification, OS customisation flow, and Compute Module USB boot support from Raspberry Pi Imager. The first M5Stack-specific layer is the default branding, telemetry policy, and OS repository structure.
The upstream project is raspberrypi/rpi-imager and remains available as the
upstream git remote:
git remote -v
git fetch upstreamThe original upstream README is preserved in README.upstream.md. Keep
license.txt and upstream copyright notices intact when distributing builds.
The app reads an OS list JSON manifest. The default is configured through the
M5STACK_IMAGER_DEFAULT_REPO_URL CMake cache variable, with a fallback in
src/config.h:
https://cardputer-zero-repo.oss-cn-shenzhen.aliyuncs.com/os-list.json
The fallback in src/config.h still points at the checked-in example manifest
embedded as qrc:/m5stack/os-list.json; use that only for offline test builds.
To force a different manifest at build time, pass:
cmake -S src -B build \
-DM5STACK_IMAGER_DEFAULT_REPO_URL=https://cardputer-zero-repo.oss-cn-shenzhen.aliyuncs.com/os-list.jsonYou can also test a local or remote manifest at runtime:
rpi-imager --repo m5stack/os-list.cm4stack-cardputerzero.example.jsonThat example exposes CM4Stack and CardputerZero in the device picker. The CardputerZero entry points at the latest Trixie arm64 image:
https://cardputer-zero-repo.oss-cn-shenzhen.aliyuncs.com/cardputerzero-trixie-arm64-latest.img.xz
m5stack/oss/os-list.json is the production manifest uploaded to
https://cardputer-zero-repo.oss-cn-shenzhen.aliyuncs.com/os-list.json.
m5stack/os-list-template.json mirrors that production manifest for reference.
OSS upload assets live under m5stack/oss/:
os-list.jsonis the manifest published to the bucket root.icons/*.pngare published to theicons/prefix..env.exampledocuments the local OSS credentials format..envis ignored by git and used only for local uploads.
Run m5stack/oss/upload-oss.sh to publish the manifest and icons. The script
does not upload OS image artifacts; image publishing is handled separately.
Use the upstream build flow:
cd src
cmake -S . -B ../build -DCMAKE_BUILD_TYPE=RelWithDebInfo
cmake --build ../buildThe repository includes release workflows for all supported desktop platforms:
.github/workflows/windows-release.ymlbuilds an unsigned Windows x64 installer and portable zip..github/workflows/macos-release.ymlbuilds a macOS arm64 DMG..github/workflows/linux-release.ymlbuilds a Linux x64 tarball.
The workflows run on push, pull_request, and manual workflow_dispatch.
Tagged builds also upload artifacts to the matching GitHub Release. The Windows
workflow produces:
M5Stack-Imager-<version>-windows-x64-installer.exeM5Stack-Imager-<version>-windows-x64-portable.zip
To publish a GitHub Release, push a version tag:
git tag v0.1.0
git push origin v0.1.0Builds are unsigned until M5Stack code signing credentials are wired into the workflows, so Windows may show the normal SmartScreen warning and macOS may show Gatekeeper warnings.
Packaging identifiers such as com.raspberrypi.rpi-imager, rpi-imager, and
.rpi-imager-manifest still need a dedicated M5Stack rename pass before public
release.
- Keep the production M5Stack OS manifest at
https://cardputer-zero-repo.oss-cn-shenzhen.aliyuncs.com/os-list.jsonupdated when image metadata changes. - Fill in the CardputerZero image
extract_size,extract_sha256, andimage_download_sha256once the final image artifact is available. - Decide whether M5Stack wants its own anonymous metrics endpoint; telemetry is disabled by default in this fork.
- Add M5Stack-specific first boot customisation only after the target image layout is fixed.
