fix: persist dtbo + kernel postinst hook for Ubuntu flash-kernel survival - #85
Merged
Conversation
…ival On Ubuntu, flash-kernel rotates overlay directories (current/ <-> old/) on kernel updates, stranding custom dtbos. Changes: - Main install path: after copying dtbo to overlay dir, also persist to /usr/local/share/sunfounder/overlays/ and install postinst.d hook - Plugin-only path (--pipower5): same persist + hook logic - All pironman5 variants covered: base, max, mini, nas, pro_max - Covers pipower5 dtbo when installed with --pipower5 flag The postinst hook is shared with pipower5 — both projects write to the same persistent directory and install the same hook script. Works correctly when both are installed (dtbos coexist).
Avoids shell glob expansion of * in /boot/firmware/*/overlays/ path
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.
Problem
On Ubuntu, flash-kernel rotates overlay directories (
current/↔old/) on kernel updates, stranding custom dtbos. After a kernel update, pironman5/pipower5 dtbos are left inold/overlays/and the activecurrent/overlays/doesn't have them.Fix
/usr/local/share/sunfounder/overlays/and install/etc/kernel/postinst.d/sunfounder-dtboshook--pipower5): same persist + hook logic--pipower5flagThe postinst hook is shared with pipower5 (sunfounder/pipower5#16). Both projects write to the same persistent directory and install the same hook script. Works correctly when both are installed — dtbos coexist, uninstall only removes its own.
Tested
Tested together with pipower5 PR #16 on Ubuntu 26.04 aarch64 (Pi 5):