wrolpi/pi-gen
Roland 575d2f9744 image builds: reset repo to HEAD before stamping the app build
The pi-gen and Debian Live chroot hooks run `npm install`, which rewrites
the tracked app/package-lock.json, then build_app.sh stamps
build/.build-stamp from that dirty working tree.  On first boot repair.sh
runs `git reset --hard` (reverting the lock) *before* it recomputes the
stamp, so the baked stamp can never match -- and the device rebuilds the
React app every time, the exact OOM-prone step baking the build in (#536)
was meant to avoid.

Verified against WROLPi-v0.27.2: the shipped image had `M app/package-lock.json`,
baked stamp a9c6ef61..., post-reset stamp 2b908c6c... (guaranteed mismatch).

Mirror repair.sh in both image hooks: `git reset --hard HEAD` right after
npm install and before build_app.sh, so the baked stamp represents committed
source and matches what the device recomputes.  Only the lock is reverted;
build/, node_modules, and the venvs are untracked and survive.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-18 13:39:50 -06:00
..
stage2/04-wrolpi image builds: reset repo to HEAD before stamping the app build 2026-07-18 13:39:50 -06:00
build.sh Debian 13 (trixie) rebase: docker, debian-live-config, and pi-gen builds. 2026-07-13 15:43:08 -06:00
config.txt Debian 13 (trixie) rebase: docker, debian-live-config, and pi-gen builds. 2026-07-13 15:43:08 -06:00
README.md Remove stale Postgres references after SQLite cutover. 2026-07-18 13:28:54 -06:00

Pi-Gen

This directory exists to facilitate the creation of WROLPI Raspberry Pi OS images.

See https://github.com/RPI-Distro/pi-gen

Generate 64bit Raspberry Pi WROLPi image

  1. (Optional) Place any default map assets under pi-gen/stage2/04-wrolpi/files/ if the image should ship with preloaded map data. Maps use PMTiles files served from /media/wrolpi/map/.

  2. Run the build (or, with a specific git branch)

    • Build release branch (default)

      sudo ./build.sh
      
    • Build specific branch

      sudo ./build.sh -b master
      
  3. The images are now in the pi-gen directory.