3.3 KiB
3.3 KiB
PAF · Build & deploy (Arch era)
The loop that turns a kernel commit into a verified boot on glass. pmOS-era
pmbootstrap notes preserved at evidence/build-pmos-era.md — dead path now.
The three places
| Where | Role |
|---|---|
gitea 10.10.20.120:4455 — Fimeg/Pixel3Arch + Fimeg/linux-blueline (branch blueline) |
Source of truth. Uncommitted work does not build — commit or it doesn't exist. |
ArchDev LXC casey@10.10.20.123 (ani key) |
Build host. Cross toolchain installed, MAKEFLAGS system-wide. |
| Laptop | Device ops only — flashing, fastboot, USB tether, boot.img assembly. |
The loop
- Commit + push kernel changes to gitea (
kernel/src/linux-blueline-srcon the laptop is a clone with remotegitea). - Build on ArchDev:
ssh ... casey@10.10.20.123 'cd ~/Projects/Pixel3Arch/kernel && ./build.sh blueline'- build.sh self-locks with flock — invoke it directly, never wrap it in an outer flock on the same lockfile (deadlock, cost a session).
- It force-fresh-clones from gitea and hard-asserts the built package's embedded commit hash matches the gitea branch tip — a mismatch means stale source; the build fails loud instead of shipping it.
- Pull
kernel/linux-blueline-7.1.1-1-aarch64.pkg.tar.zstto the laptop. - Assemble the boot image (pmOS-chain — the currently proven ramdisk path):
Kernel is Image.gz + appended DTB (header v0 ignores --dtb); ramdisk and cmdline are lifted from the reference image. Migrating to our own mkinitcpio ramdisk (bash boot/build-bootimg-pmos-chain.sh <vmlinuz-from-pkg> <dtb-from-pkg> \ staging/deploy-139aa/boot-139aa7748181-pmoschain.img <out.img>boot/build-bootimg.sh) is a parked one-variable task. - Deploy:
scripts/deploy-kernel.sh <pkg.tar.zst> <boot.img>
Deploy doctrine — no chimera boots
deploy-kernel.sh exists because a kernel was once booted 28 seconds before
its module tree was installed: no evdev, no input, dead services, and a
night of void test results. The script enforces the only safe order:
- Modules first — scp the pkg,
pacman -U, verify the module dir exists. - Flash boot_a, reboot.
- Refuse to bless the boot unless
uname -rmatches the installed tree.
Never flash-then-install. If uname -r and /usr/lib/modules/ disagree,
every test result on that boot is garbage — reboot properly before
concluding anything.
Gotchas ledger (each cost a session)
- makepkg needs
CARCH=aarch64 ... --ignorearch— CARCH comes from the environment, not the PKGBUILD, or you get x86_64-labeled aarch64 packages. - makepkg builds in its own clone of
source=(), not your working tree — a dirty tree silently builds without your changes. - The kernel release string embeds the git hash (
-g<hash>) — it is the ground truth for "what am I actually running" (uname -r). modules_installneeds CROSS_COMPILE too, or strip fails on aarch64 .ko.- ArchDev is unprivileged LXC: qemu-emulated execution (binfmt) does NOT work there — chroot-based work stays on the laptop or on-device.
- Commit messages: history in this repo proved that "evidence" cited in rapid-fire commits can be wrong (see touch.md, display.md post-mortems). Cite the actual file:line / register / boot you verified on, and note whether the boot was clean.