Compare commits

...
Author SHA1 Message Date
fa28b20df7 Merge branch 'main' of https://forgejo.catcrafts.net/Catcrafts/fp6-img
All checks were successful
image / image (push) Successful in 1h28m5s
2026-09-11 13:26:56 +02:00
ed18cce7d0 fp6-vendor-blobs 1-r3: extract from the active slot, and stop pinning a hash on a signed image
Two field units got no fingerprint sensor from fingerprintd 0.2.3's
manifest: its focal64 line pinned the sha256 of one Android build's
trustlet (16.82.0, the dev phone's), and Fairphone re-signs that trustlet
every release, so the pin matches exactly one of the six builds seen. A
user on 16.100.0 had to edit the manifest by hand; another ended up with
a file QTEE refuses.

The extractor now tries the active slot's partitions first
(androidboot.slot_suffix from the kernel command line): for a signed
image only the running TZ's own slot is guaranteed to load. An mbn line
may give '-' instead of a hash, which means structural verification
only: ELF64 header, every segment present at the size its program header
declares, page-aligned offsets, a sane total. The loader in TZ verifies
the signature and the per-segment hashes itself and refuses a damaged or
foreign image (one flipped byte -> ERROR_ELF_SIGNATURE_ERROR, measured),
so the whole-image hash added fragility and no protection. A real sha256
is still honoured, and the sha256 of what was installed is logged either
way.

--refresh re-derives mbn dests even when a file exists, replacing it
only with an image that verifies; consumers call it from
post-install/post-upgrade so a fresh 'apk add' needs no reboot and a
hand-placed or wrongly pinned trustlet is replaced on the next upgrade.

Verified on the dev phone (busybox): malformed inputs are refused with a
reason (missing, truncated or oversize segment; non-ELF, ELF32 or short
mdt; a garbage offset), both slots reassemble to the known-good hash, a
foreign file survives a plain run and is replaced by --refresh, a failed
refresh keeps the old file, pins still work, and the real post-upgrade
path re-derived the installed trustlet with the daemon restarting on it.
Record: fp6 repo journal/blobs/ and journal/fingerprint/, 2026-09-11.
2026-09-11 13:03:22 +02:00
34c687d160 libcamera, libqmi, modemmanager: build for the cores the phone has
Same string as the kernel commit, for the three compiled aports this image
builds itself: -march=armv8.6-a+fp16fml+aes+sha3+sm4 -mtune=cortex-a720
appended to CFLAGS (and CXXFLAGS for libcamera). abuild builds these with
Alpine's GCC; the string is gcc's own -march=native expansion on the phone
re-based on armv8.6-a, and it assembles on GCC 15 with binutils 2.45.1 and
on GCC 16 (whose -mcpu=cortex-a720 expansion binutils 2.45 rejects). On the
phone itself gcc -flto, g++ and clang all compile, link and run it.

The base stops at 8.6 on purpose: this phone exposes neither SVE nor MTE
(userspace autovectorised for SVE2 would SIGILL), and not WFxT either.

pkgrel bumps so apk upgrade delivers the rebuilt binaries.
2026-09-08 20:24:15 +02:00
27f923a817 kernel: build for the cores the phone has, pkgrel 102
The FP6 is 4x Cortex-A520 + 4x Cortex-A720 and this image boots nothing
else, so pass the compiler KCFLAGS="-march=armv8.6-a+fp16fml+aes+sha3+sm4
-mtune=cortex-a720". The stock arm64 build gives the compiler no arch flag
at all (so one image can boot any Armv8 board).

The string is what `gcc -march=native` derives on the phone, re-based on
armv8.6-a so clang can express the same set (clang has no flagm2/rcpc2/
frintts tokens; it reaches them through the architecture level). 8.6 is the
highest level whose mandatory set the phone exposes: 8.7 would assume WFxT
and 9.x SVE2, and neither is in its hwcaps or ID registers. clang emits
identical code for this and for -mcpu=cortex-a720+nosve+nomemtag; the
difference is only which system features (SPE, ETE, TRBE, FPAC) it knows
about, none of which generate code.

Verified on eef717f978f1 with the aport config: builds with zero warnings,
same module set as r100 (417), compat vDSO untouched, boots the dev phone
with a clean dmesg and a GREEN selftest. Record:
fp6 journal/base/captures/2026-09-05-mcpu-a720-verification.md.
2026-09-08 20:24:15 +02:00
4 changed files with 33 additions and 4 deletions

View file

@ -8,7 +8,7 @@ _flavor="postmarketos-qcom-milos"
pkgname=linux-$_flavor pkgname=linux-$_flavor
pkgver=7.2.0 pkgver=7.2.0
# always sorts above the upstream aport (r0..r99) # always sorts above the upstream aport (r0..r99)
pkgrel=101 pkgrel=102
pkgdesc="Milos mainline kernel + Catcrafts FP6 bring-up carries (combined-stable)" pkgdesc="Milos mainline kernel + Catcrafts FP6 bring-up carries (combined-stable)"
arch="aarch64" arch="aarch64"
_carch="arm64" _carch="arm64"
@ -57,7 +57,14 @@ prepare() {
build() { build() {
unset LDFLAGS unset LDFLAGS
# Build for the cores this image runs on: 4x Cortex-A520 + 4x Cortex-A720.
# The stock arm64 build gives the compiler no arch flag so one image boots
# any Armv8 board; this one boots the FP6. armv8.6-a is the highest level
# whose mandatory set the phone exposes (8.7 would assume WFxT, 9.x SVE2;
# neither is in its hwcaps); +fp16fml+aes+sha3+sm4 are the optional
# extensions it has, the same set `gcc -march=native` derives on the phone.
make ARCH="$_carch" LLVM=1 \ make ARCH="$_carch" LLVM=1 \
KCFLAGS="-march=armv8.6-a+fp16fml+aes+sha3+sm4 -mtune=cortex-a720" \
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-$_flavor" KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-$_flavor"
} }

View file

@ -3,7 +3,7 @@ maintainer="Robert Mader <robert.mader@collabora.com>"
pkgname=libcamera pkgname=libcamera
_pkgver=0.7.2 _pkgver=0.7.2
pkgver=9999$_pkgver pkgver=9999$_pkgver
pkgrel=9 pkgrel=10
pkgdesc="Linux camera framework" pkgdesc="Linux camera framework"
url="https://libcamera.org/" url="https://libcamera.org/"
arch="all" arch="all"
@ -83,6 +83,14 @@ builddir="$srcdir/$pkgname-v$_pkgver"
# gstreamer tests fail # gstreamer tests fail
# manual strip because ipa .sign files depend on the file contents- have to re-sign after strip # manual strip because ipa .sign files depend on the file contents- have to re-sign after strip
options="!strip !check" options="!strip !check"
# fp6-img: this package only ever runs on the FP6 (4x Cortex-A520 + 4x
# Cortex-A720), so build for it. armv8.6-a is the highest level whose
# mandatory set the phone exposes (8.7 would assume WFxT, 9.x SVE2; neither
# is in its hwcaps); +fp16fml+aes+sha3+sm4 are the optional extensions it
# has, the same set `gcc -march=native` derives on the phone. One spelling
# for gcc and clang, and the same string the kernel aport uses.
export CFLAGS="$CFLAGS -march=armv8.6-a+fp16fml+aes+sha3+sm4 -mtune=cortex-a720"
export CXXFLAGS="$CXXFLAGS -march=armv8.6-a+fp16fml+aes+sha3+sm4 -mtune=cortex-a720"
case "$CARCH" in case "$CARCH" in
arm*|aarch64) arm*|aarch64)

View file

@ -7,7 +7,7 @@ maintainer="Achill Gilgenast <achill@achill.org>"
pkgname=libqmi pkgname=libqmi
pkgver=1.39.1_git20260808 pkgver=1.39.1_git20260808
_commit=30f3e998e6cbda364ac1bc73223de20561e6d555 _commit=30f3e998e6cbda364ac1bc73223de20561e6d555
pkgrel=100 pkgrel=101
pkgdesc="QMI modem protocol helper library" pkgdesc="QMI modem protocol helper library"
url="https://www.freedesktop.org/wiki/Software/libqmi" url="https://www.freedesktop.org/wiki/Software/libqmi"
arch="all" arch="all"
@ -27,6 +27,13 @@ makedepends="
# fp6-img: crossdirect breaks meson compiler introspection (cc1 spawn # fp6-img: crossdirect breaks meson compiler introspection (cc1 spawn
# failure), same as modemmanager; build under plain qemu. # failure), same as modemmanager; build under plain qemu.
options="!pmb:crossdirect" options="!pmb:crossdirect"
# fp6-img: this package only ever runs on the FP6 (4x Cortex-A520 + 4x
# Cortex-A720), so build for it. armv8.6-a is the highest level whose
# mandatory set the phone exposes (8.7 would assume WFxT, 9.x SVE2; neither
# is in its hwcaps); +fp16fml+aes+sha3+sm4 are the optional extensions it
# has, the same set `gcc -march=native` derives on the phone. One spelling
# for gcc and clang, and the same string the kernel aport uses.
export CFLAGS="$CFLAGS -march=armv8.6-a+fp16fml+aes+sha3+sm4 -mtune=cortex-a720"
subpackages=" subpackages="
$pkgname-dev $pkgname-dev
$pkgname-doc $pkgname-doc

View file

@ -5,7 +5,7 @@
maintainer="Achill Gilgenast <achill@achill.org>" maintainer="Achill Gilgenast <achill@achill.org>"
pkgname=modemmanager pkgname=modemmanager
pkgver=1.25.95_git20260709 pkgver=1.25.95_git20260709
pkgrel=100 pkgrel=101
_commit=d776ea38d29ca472a12323c1d45002ee19a66f57 _commit=d776ea38d29ca472a12323c1d45002ee19a66f57
pkgdesc="ModemManager library" pkgdesc="ModemManager library"
url="https://www.freedesktop.org/wiki/Software/ModemManager" url="https://www.freedesktop.org/wiki/Software/ModemManager"
@ -42,6 +42,13 @@ checkdepends="glib-dev py3-gobject3 py3-dbus"
# native builders, and none exercise the GNSS code our patches change) - # native builders, and none exercise the GNSS code our patches change) -
# on-device validation is the real test. # on-device validation is the real test.
options="!pmb:crossdirect !check" options="!pmb:crossdirect !check"
# fp6-img: this package only ever runs on the FP6 (4x Cortex-A520 + 4x
# Cortex-A720), so build for it. armv8.6-a is the highest level whose
# mandatory set the phone exposes (8.7 would assume WFxT, 9.x SVE2; neither
# is in its hwcaps); +fp16fml+aes+sha3+sm4 are the optional extensions it
# has, the same set `gcc -march=native` derives on the phone. One spelling
# for gcc and clang, and the same string the kernel aport uses.
export CFLAGS="$CFLAGS -march=armv8.6-a+fp16fml+aes+sha3+sm4 -mtune=cortex-a720"
subpackages=" subpackages="
$pkgname-lang $pkgname-lang
$pkgname-doc $pkgname-doc