fix: install libv4l before Rockchip multimedia config - #126
Conversation
The target Debian suite and its os-release VERSION_ID were spelled out
independently in ten places — the orchestrator, mkosi's top-level config, the
runtime postinst, the device apt-source writer, the sysext backend, the add-on
builder, both add-on descriptors, the add-on JSON Schema, the manifest validator
and a board-preflight fixture. A release bump was a ten-site edit whose only
failure signal was an image that builds, boots and is quietly wrong: apt sources
naming the previous suite, or a sysext the kernel refuses to merge because its
VERSION_ID no longer matches the host os-release.
manifests/target-release.env is now the one mapping (RELEASE, OS_VERSION_ID and
the three derived apt suites), read through lib/shared/target-release-lib.sh.
Every consumer derives from it; the chroot writers fail closed on an unset
RELEASE rather than falling back to a literal.
Two constraints are load-bearing. ARMBIAN_SUITE stays a separate knob — it names
the archive the kernel/DTB/U-Boot/firmware .debs come from, which Armbian
versions on its own schedule, so deriving it from RELEASE would repoint the boot
stack at a suite that may not carry the RK35xx vendor BSP. And mkosi expands
${VAR} in path-typed settings only, never in [Distribution] Release= (verified
against the pinned mkosi 26), so the orchestrator plumbs --release on the CLI and
mkosi.conf keeps a mirrored literal instead.
Three sites can read no shell or Python file and therefore mirror the value:
mkosi.conf Release=, the add-on schema's versionId const, and the add-on
descriptors. ci/check-suite-literals.sh is the gate that keeps them in lockstep
and sweeps every tracked and untracked production file for a re-introduced
bookworm/VERSION_ID=12 literal, accepting one only with a stated reason. It
carries a --self-test that proves it can reject, in both directions.
tests/target-release-derivation.test.sh pins the whole contract, including a
flipped-mapping leg that resolves every derived value against a different
mapping — so a derivation that reads the file but returns a constant fails.
Todo 9 derived the sysext merge key and the add-on descriptors from
manifests/target-release.env. This closes the four sites it could not reach.
The os-release VERSION_ID travels a SECOND route the audit gate was
structurally blind to: the {os_version} axis of the artifact stem and of the R2
key addons/{os_version}/{board}/{feature}.raw, spelled `--os-version 12` and
`addons/12/`. Neither carries the token VERSION_ID nor a JSON versionId key, so
all three of check-suite-literals.sh's alternatives passed both and the gate
reported CLEAN while v2-ci.yml's addon-publish job asserted the whole publish
contract for the retired suite. Both forms are now alternatives, each with a
--self-test leg.
lib/upload-addons.sh defaults --os-version from the same mapping
build-feature-sysext.sh defaults from. The publisher addresses the artifact by
the stem the builder stamped, so restating the axis at every call site is how
the two drift; deriving both makes them agree by construction. A wrong value
cannot publish to a wrong key — the stem names no local file and upload_one
dies on the missing artifact.
tests/manifest-helpers.bash's build_feature_fixture guarded on a hardcoded
-12.raw while the build already produced -13.raw. tests/ is excluded from the
literal sweep, so this survived as a silent failure: the guard never matched and
every §14 case rebuilt the signed squashfs instead of reusing it.
Docs that stated the CURRENT sysext identity as 12 now name the mapping, and
docs/addon-sysext-refresh.md gains the release step this migration creates: the
build stamps 13 and plans addons/13/, but those objects do not exist in R2 until
someone publishes them, and until then a trixie device 404s into the
reconciler's pending phase. CeraUI's reconciler needs no change — its G1 gate
and {os_version} substitution both read /etc/os-release at runtime — but its
descriptor schema pins versionId as a literal, which is recorded there as a
prerequisite for that release step.
tests/target-release-derivation.test.sh pins the publisher and the CI job as
per-consumer derivations (50 -> 53 assertions).
The cog-display add-on still pinned the bookworm closure and still assumed the proprietary Mali blob. Neither survives the trixie/mainline migration, and one of them fails silently. Closure. Verified against a real debian:trixie-slim arm64 index rather than a forecast: cog 0.18.4-1+b1 and libwpewebkit-2.0-1 2.48.3-1 (not the 2.44.x the old doc predicted), libicu72 -> libicu76, libopenjp2-7 dropped for libjxl0.11 + libavif16 + the libwebp demux/mux pair. The renderer package was RENAMED, not bumped: libwpewebkit-1.1-0 exists nowhere in trixie and nothing Provides it, so the retired list fails acquisition with apt exit 100 and zero debs. GPU stack. Mainline binds the Mali-G610 with the in-tree panthor driver, so CONFIG_DRM_PANTHOR=m is pinned in required-symbols.list (it is already =m in the resolved v7.2 edge config; the pin exists so defconfig supplying it cannot stop being true in silence) and the edge variant drops libmali from firmware_packages. That drop is load-bearing: libmali ships 00-aarch64-mali.conf, which sorts first and captures libEGL/libGLESv2/libgbm image-wide for a driver bound to a /dev/mali0 mainline never creates, so leaving it in removes GL rather than degrading it. The vendor default and vendor-patched keep the blob. The awkward part, recorded honestly: the base image prunes libgallium, libLLVM, libz3 and dri/*_dri.so for the size gate, and dri/panthor_dri.so is one of them. That prune's justification was that libmali shadowed Mesa, which stops being true here. Un-pruning costs +185 MB and puts the edge image near 1.62 GB against a 1.5 GB ceiling, so instead the optional add-on carries exactly those four globs itself. The base has no file at those paths, so nothing is shadowed and the production image is byte-unchanged. Three exclusion globs are dropped for the same class of reason they existed: libGLESv2/libGLESv1/libwayland-egl were excluded because libmali supplied those sonames, and with libmali gone the Runtime layer supplies neither libgles2 nor libwayland-egl1. libEGL and libgbm stay excluded, verified base-provided. Sizes are measured now, not estimated: a real closure download, extract, prune and squashfs gives 353,172,379 B installed / 111,521,792 B squashed. The add-on remains optional and inert by default - it is referenced by no build, CI or publish path, and the vendor resolve is unchanged. Two variant-contract assertions asserted the old behaviour and were retargeted rather than removed: the "unknown overlay field" leg now uses uboot_packages and partition_template (firmware_packages is deliberately accepted now, pinned by its own new leg), and the edge-resolve leg asserts the new firmware set plus a new inverse leg proving vendor/vendor-patched still ship the blob.
Final sweep of Wave 3: every remaining bats/shell fixture and CI job checked
for a suite-era assumption todos 9-14 left behind, plus the harness defect that
kept `./run-tests` red.
Fixtures that had genuinely drifted:
- fetch-debs-apt-sandbox.test.sh pinned a `debian:bookworm-slim` container.
Part B's whole claim is about apt's OWN sandbox behaviour, which moves with
the suite, so it was proving the contract on the retired release while the
shipped one went unproven and the suite stayed green. It now derives
`debian:${RELEASE}-slim`; re-run on a real trixie container, 24/24 pass
including the non-vacuity control.
- realhw-suite.sh wrote its mock rootfs `debian.sources` as `Suites: bookworm`.
That rootfs models the shipped image and is fed to the real parity-check, so
it now derives ${APT_SUITE}.
- Stale prose in mkosi-image-contract, uplink-sharing-carrier and
apt-mtls-and-dedupe. The conntrack rationale was re-verified against a real
trixie index (conntrack 1:1.4.8-2 resolves, conntrack-tools has no candidate),
so its conclusion held and only its citation was wrong.
Every other `bookworm` under tests/ is correct and stays: ARMBIAN_SUITE
fixtures, `lacks` needles, and the deployed bookworm/rauc-1.8 fleet that is the
premise of the OTA transition. apt-lib.test.sh's looked like drift and is an
Armbian-shaped fixture, so it now says so.
Harness fix — this is what kept the suite red:
serialize() keyed its lock file path on the bats suite filename. `working-tree`
and `build-plan` are global resources and run-tests passes
--no-parallelize-within-files, so cases inside one file are already serial and
cross-file was the only exclusion there was. Each suite therefore took its own
lock and excluded nothing. postinst-wiring.bats mutates the working tree on
purpose (to prove the drift gate is non-vacuous) while hdmirx-edid-contract and
package-contract read that same tree through the gate without serializing at
all, so under --jobs the gate read a tree mid-mutation and correctly reported
drift. The gate was right; the harness was racing it. The lock name is now the
resource, and both readers serialize.
That failure predates this branch: it reproduces 3/3 at 2a6ce4b, and no commit
in this effort touches the serialize() body. It is fixed here rather than left
alone because CI runs ./run-tests, which auto-selects --jobs, so it made the
trixie branch red and would have been read as migration fallout.
CI:
ci/check-suite-literals.sh existed since todo 9 but was wired into no workflow
step -- it reached CI only inside ./run-tests, three needs: hops deep behind an
apt install and a system D-Bus. It is now also an explicit step in the
shellcheck job, which every other job is downstream of. Both wirings are kept.
No test deleted, skipped or weakened: `./run-tests --list` is byte-identical and
the @test count is unchanged. ./run-tests now reports 754 passed / 0 failed
(was 753/1).
…l-final)
The Armbian vendor 6.1 BSP kernel track is retired. Both overlays go — the
prebuilt `vendor` one and the source-built `vendor-patched` one that rebuilt it
with the HDMI-RX audio-capture series — together with everything that existed
only to serve them.
BREAKING CHANGE: `--variant vendor` and `--variant vendor-patched` are no longer
declared and are refused by the resolver. `rk3588` now declares exactly two
variants, `edge` (the production default) and `edge-test`, and both build the
kernel from pinned source; no build installs a prebuilt kernel .deb any more.
Removed:
* manifests/families/rk3588.yaml — both vendor overlays, and the family base
retargeted to the mainline track (armbian_branch: edge, the built kernel
package, empty dtb_packages, armbian-firmware alone). `edge` now carries only
its kernel_source pins; the fields it used to restate are declared once at the
family level. The pins stay inside the overlay because `edge-test`
`extends: edge` and a resolved extends overlay is validated against the full
kernel_source contract.
* manifests/kernel/rk3588-vendor-patched.absent
* manifests/{armbian-bsp-deb-versions.txt,bsp-baseline.json,bootloader-blobs.tsv}
— the prebuilt kernel/DTB pins, the seeded drift baseline (now the unseeded
scaffold: nothing fetches a prebuilt kernel for it to hash) and the vendor
bootloader rows
* manifests/rk3588-userspace-deb-versions.txt — the libmali GPU blob pin, which
only the vendor overlays declared
* mkosi.postinst prune_vendor_dtbs — gated on the prebuilt-kernel path, so it
had no reachable caller left
* ci/build-hardware-candidates.sh — the rock-vendor candidate and the whole
prebuilt arm of the tuple recorder; six DRY_RUN probes instead of nine
* lib/check-wwan-modules.sh — the `*vendor-rk35xx` release-marker scoping on the
FM350 mtk_t7xx gate, which now runs on every tree
The board's `-vendor` U-Boot packages are deliberately KEPT: that is a bootloader
build, orthogonal to the kernel track, and `edge-test` still resolves it from the
board's top-level uboot_packages.
Test changes are justified individually in the PR description. In short: cases
were deleted only where the code they covered is gone (the prune_vendor_dtbs
suite, the six shipped-manifest vendor-patched pin cases, the allow-absent list
shape checks, the vendor tuple suite, the prebuilt-DRY_RUN non-vacuity leg).
Everything else was retargeted rather than dropped, because the mechanism
survives its shipped consumer: commit-only checkout and config-file mode stay
schema-gated against scratch families, the layout-agnostic boot-artifact verifier
keeps its symlink fixture under a neutral release string, and the freeze suite
keeps a full five-package fixture. One test was fixed rather than moved: the
edge-test suite's vendor leg would have passed vacuously against an empty resolve.
Docs keep the vendor measurements — they are the only record of what that kernel
carried — behind explicit [HISTORICAL] / RETIRED TRACK banners, and
uplink-sharing-carrier.bats now asserts those markers.
Verification: ./run-tests 741 ok / 0 not ok / exit 0; validate-manifests 7/7;
check-suite-literals sweep + self-test clean; check-release-variant OK;
build-hardware-candidates --self-test 25/25; shellcheck -S warning exit 0.
…rs are exclusive)
|
Closing as stale/superseded. This branch ( It appears to be an earlier/parallel full snapshot of the trixie + mainline-kernel + PipeWire migration, bundled into one PR under a title ("install libv4l before Rockchip multimedia config") that covers a tiny fraction of its actual diff. Every real fix it was carrying has since landed as its own small, independently reviewed and CI-verified PR:
No content from this branch needs to be cherry-picked. Closing to avoid confusion and to keep a stale, conflicting 7k-line branch from ever being force-merged over the verified incremental work above. |
What
Add
libv4l-0to the shared runtime transaction before the RK3588 platform layer configuresrockchip-multimedia-config.Why
The pinned package postinst runs
dpkg -L libv4l-0 | grep libv4l2.so.0.0.0and copies that file to/usr/lib64/libv4l2.so; without the package installed,set -eaborts configuration.Verification
bats tests/package-contract.bats(106 passing)lsp_diagnosticsclean.debpostinstRisks
None beyond adding the required Debian runtime library.