Skip to content

fix: persist dtbo + kernel postinst hook for Ubuntu flash-kernel survival - #85

Merged
cavonlee merged 17 commits into
1.3.xfrom
fix/dtbo-persist
Jul 2, 2026
Merged

fix: persist dtbo + kernel postinst hook for Ubuntu flash-kernel survival#85
cavonlee merged 17 commits into
1.3.xfrom
fix/dtbo-persist

Conversation

@cavonlee

@cavonlee cavonlee commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

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 in old/overlays/ and the active current/overlays/ doesn't have them.

Fix

  • Main install path: after copying dtbo to overlay dir, also persist to /usr/local/share/sunfounder/overlays/ and install /etc/kernel/postinst.d/sunfounder-dtbos hook
  • Plugin-only path (--pipower5): same persist + hook logic
  • All pironman5 variants covered: base (pironman5), max (pironman5), mini (pironman5mini), nas (pironman5nas), pro_max (pironman5promax)
  • Covers pipower5 dtbo when installed with --pipower5 flag

The 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):

  • All 5 dtbos distributed to active overlay dirs ✓
  • Postinst hook correctly copies from persistent store ✓
  • Simulated kernel update recovers all dtbos ✓

…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).
@cavonlee
cavonlee merged commit af163ce into 1.3.x Jul 2, 2026
4 checks passed
@cavonlee
cavonlee deleted the fix/dtbo-persist branch July 2, 2026 07:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant