Repository navigation
Updater: downloads, checked packages and builds in RAM - #345
Merged
Merged
Conversation
Downloads, the checked package handed to the deploy tool and builds on the unit go to a size-capped RAM folder when they fit (state_dir otherwise). A build that outgrows its room runs again in state_dir. Source listings and state files are written only when they change; the time of each check is kept in a small file of its own. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
robertnisipeanu
force-pushed
the
emmc-updater
branch
from
November 19, 2026 19:51
e618c73 to
9909084
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Keeps what the updater only writes to read back and remove out of the head unit's storage.
scratch_dir(/run/mgu-updater/scratch) when they fit, elsestate_diras before. As root that folder is mounted as a tmpfs of its own ofscratch_max_bytes(128 MiB), so nothing written there can fill/run; if the mount is refused it is a plain/runfolder used only while 64 MiB of/runstay free. Each use also stays within a quarter of the memory available.build_max_bytes) in RAM. One that outgrows that room, or fails with its file system full, runs again instate_dir.sources/<id>.checkedbeside the listing, so the Store's "checked" time stays right across restarts. The listing's index memo and the updater's state files are written only when their bytes change.Update order: the deploy tool takes the artifact from any path, so this works with the published deploy tool and the other way round.
AI: Claude Code, Claude Opus 5.5
Tested:
native/mgu-updater/test/run.sh(Node 8.16.2): all pass, including a new test: a build that outgrows its RAM room runs again instate_dirand installs, and no build or download folder is left. On an iDrive 7 test unit, measuring/var/optblock writes together with the deploy tool change (#344): installing one idrive7-apps app 54 → 41 MB, of which 28 MB is the first fill of the existing blob cache of that repo's files (reused by later installs). Hard power cuts (cache lost) mid-write of the updater's own new version, and the self-update run again afterwards, recovered: the running version kept, the update then committed. Not tested on a car or an iDrive 8 unit.Human review: no
Screenshots: n/a
🤖 Generated with Claude Code