Raspbian trixie#1106
Conversation
…ure.py to better handle installs from point 0 as well as better handle updates with this new OS
Update check_pass to explicitly use python 3.8 instead of python 3.13 add with_alsa flag to configure.py to optionally forcefully override
…k in configure script
…ports that don't work
…e point when activating linger for pi user
Add "dep filter" repeatable flag for the deploy script for rapid iteration while working on specific dependency install steps
Update NEW_RELEASE.md with a personal reminder
Update check_pass to explicitly use python 3.8 instead of python 3.13 add with_alsa flag to configure.py to optionally forcefully override
Fix alsa option in deploy script
…py with optional verbose logging during the debian upgrade portion
…ions and saving the file properly
Fix asgi.py image consumption endpoint to only modify boot when needed as well as patch the fstab and journal entries for bootability
Move all services from `--user pi` to root to allow for reasonable ownership management between multiple OS instances Add postflash service that validates that apt packages are properly installed Fix small bug with LMS album art
39a13a4 to
42880db
Compare
|
This is a WIP that will take a while to finish This will change the baseline partition scheme of amplipi from basic boot+root to a 7 partition schema:
Currently, I have the ability to update from images via the Once in the other boot+root slot, the update verification service checks to see if that |
| @@ -1,4 +1,4 @@ | |||
| #!/usr/bin/env python3 | |||
There was a problem hiding this comment.
The version of python we run has to be installed via UV on Trixie, so I had to move the invocation paths on a few files
| the stored default AmpliPi password.""" | ||
|
|
||
| # Password config location | ||
| PASS_DIR = os.path.join(os.path.expanduser('~'), '.config', 'amplipi') |
There was a problem hiding this comment.
The whole .config folder and a few services got moved to /data to ensure they persist post-update, many lines like this had to be changed as a result
| [all] | ||
| tryboot_a_b=1 | ||
| boot_partition=2 | ||
|
|
||
| [tryboot] | ||
| boot_partition=3 | ||
|
|
||
| if exist mmc 0:1 /boot_partition.txt then | ||
| load mmc 0:1 ${loadaddr} /boot_partition.txt | ||
| env import -t ${loadaddr} ${filesize} | ||
| fi | ||
|
|
||
| boot mmc 0:${boot_partition} |
There was a problem hiding this comment.
This is the default autoboot.txt, which is what the update verification service edits when an update is successful. Specifically what is changed is swapping the [all] boot_partition value with the [tryboot] boot_partition value, that's all it takes to swap the default boot slot
| * A micro USB cable | ||
| * Your AmpliPi | ||
|
|
||
| ## Optional Step: Preserve your config |
There was a problem hiding this comment.
This file likely needs more reworking as realistically you shouldn't need to flash ever again, though also I'd say that makes more sense to leave until this code is in the hands of users and has a few support cases under its belt to verify if that's necessary
| # Run device-specific customization scripts from p7. | ||
| # These survive OTA updates and are re-applied on each new slot's first boot. | ||
| if [ -d "${SCRIPTS_DIR}" ]; then | ||
| for script in "${SCRIPTS_DIR}"/*.sh; do | ||
| [ -f "${script}" ] || continue | ||
| log "Running ${script}..." | ||
| bash "${script}" || log "Warning: ${script} exited non-zero" | ||
| done | ||
| fi |
There was a problem hiding this comment.
Some users have specific setups on their devices that we don't want to destroy on a full-image update, so I've given them a directory that they can fill with bash scripts to set up their services automatically post-update
I need to test what happens if a user provides scripts that fail for those cases
| --hostname NAME: The hostname to set on the pi, so once this script | ||
| successfully completes connect via {hostname}.local. | ||
| Default is amplipi | ||
| --cli-only: Use the lite version of Raspberry Pi OS which does not have |
There was a problem hiding this comment.
At some point, CLI only became a default case for our units. I decided to flip the default case in this script to reflect that
There was a problem hiding this comment.
This file either needs full reworking or deletion. The new 7 partition setup is complex enough that updating this is a bit of a lift when we hardly need it and can also just distribute a full 7 partition image for those who need that sort of thing
There was a problem hiding this comment.
Unlike bootstrap.py, I'd say configure.py is still very useful despite not being our update path anymore. manual deploys with the deploy+configure script are likely to be the primary ways we configure the root partitions that later get snapshotted into an image we distribute as an update
What does this change intend to accomplish?
This is a reworking of AmpliPi to function in a 64 bit raspbian trixie A:B tryboot setup with the goal of having a more robust system overall and a cleaner update flow with full image updates
Checklist
./scripts/test