fp6-img/aports/device/linux-postmarketos-qcom-milos/APKBUILD

90 lines
2.6 KiB
Text
Raw Normal View History

# Fork of pmaports device/testing/linux-postmarketos-qcom-milos (7.2.0-r0),
# overlaid via pmbootstrap so it shadows the upstream aport. Differences:
# source is the Catcrafts combined-stable branch (upstream v7.2.0-milos tag +
# the FP6 bring-up carries), and the config is the exact one the development
# FP6 runs, plus CONFIG_EFI_ZBOOT for the packaging below.
maintainer="Jorijn van der Graaf <jorijnvdgraaf@catcrafts.net>"
_flavor="postmarketos-qcom-milos"
pkgname=linux-$_flavor
pkgver=7.2.0
# always sorts above the upstream aport (r0..r99)
kernel: build qcomtee, which is one line and not the coupled change we recorded The fingerprint stack needs /dev/tee0, and the pmOS config has never built the driver -- so every session so far has loaded an out-of-tree module. That has been recorded since 2 September as the release blocker, on the reading that drivers/tee/qcomtee/Kconfig's `select QCOM_TZMEM_MODE_SHMBRIDGE` would flip tzmem out of Generic mode and drag a boot+selftest round with it. It does not. QCOM_TZMEM_MODE_SHMBRIDGE is a member of a choice block, and Kconfig cannot select a choice member -- the statement is inert, and silently so. Setting CONFIG_QCOMTEE=m and running olddefconfig against the tree produces exactly one line of difference and leaves CONFIG_QCOM_TZMEM_MODE_ GENERIC=y, which is the mode every fingerprint measurement was taken on. The driver is already in the base tree; the only reason it was out-of-tree here was that nothing enabled it. Verified on the dev phone: the module built from this config carries ZERO module parameters against the research build's 95, matching vermagic, and the phone boots on it with modules-load.d bringing it up, /dev/tee0 present, fingerprintd ready and the enrolled template loading. So the shipped module is upstream code on the tested tzmem mode. Not pushed. Whether to ship QCOMTEE with tzmem in Generic mode is a separate question with a real answer -- journal/tee warns about that mode -- and it is now sequenceable on its own instead of forced by a select that does nothing.
2026-09-05 04:25:51 +02:00
pkgrel=101
pkgdesc="Milos mainline kernel + Catcrafts FP6 bring-up carries (combined-stable)"
arch="aarch64"
_carch="arm64"
url="https://forgejo.catcrafts.net/Catcrafts/milos-linux"
license="GPL-2.0-only"
options="!strip !check !tracedeps
pmb:cross-native
pmb:kconfigcheck-community
pmb:kconfigcheck-uefi
"
makedepends="
bison
clang
elfutils-dev
findutils
flex
installkernel
linux-headers
lld
llvm
openssl-dev
pahole
perl
python3
zstd
"
_config="config-$_flavor.$arch"
# Pinned by CI: the instance has source archives disabled, so the tarball is
# generated with git-archive (prefix milos-linux/) from combined-stable and
# placed next to this APKBUILD before `pmbootstrap checksum` runs. See
# build.sh at the repository root.
_commit="REPLACED_BY_CI"
source="
milos-linux-$_commit.tar.gz
0001-resolve_btfids-preserve-tag-and-parameter-names-when.patch
$_config
"
builddir="$srcdir/milos-linux"
prepare() {
default_prepare
cp "$srcdir/config-$_flavor.$arch" .config
}
build() {
unset LDFLAGS
make ARCH="$_carch" LLVM=1 \
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-$_flavor"
}
package() {
# ZBOOT EFI decompressor for EFI booting
install -Dm644 "$builddir/arch/$_carch/boot/vmlinuz.efi" \
"$pkgdir/boot/linux.efi"
# Old GZIP'd kernel image for boot.img compatibility
install -Dm644 "$builddir/arch/$_carch/boot/vmlinuz" \
"$pkgdir/boot/vmlinuz"
make modules_install dtbs_install \
ARCH="$_carch" \
LLVM=1 \
INSTALL_PATH="$pkgdir"/boot/ \
INSTALL_MOD_PATH="$pkgdir"/usr \
INSTALL_MOD_STRIP=1 \
INSTALL_DTBS_PATH="$pkgdir"/boot/dtbs
rm -f "$pkgdir"/lib/modules/*/build "$pkgdir"/lib/modules/*/source
install -D "$builddir"/include/config/kernel.release \
"$pkgdir"/usr/share/kernel/$_flavor/kernel.release
}
sha512sums="
REPLACED_BY_CI milos-linux-REPLACED_BY_CI.tar.gz
4e705e038a91466a86fc5317b0028c2220aa1e7a4807e5d86db2f9ac815a927c59666a8f21ed50c4632147d3ce183d8042378a76f95341dbcd3db1047faf39e3 0001-resolve_btfids-preserve-tag-and-parameter-names-when.patch
REPLACED_BY_CI config-postmarketos-qcom-milos.aarch64
"