fp6-img/aports/device/linux-postmarketos-qcom-milos/APKBUILD
Jorijn van der Graaf 9defc5a1a9
All checks were successful
image / image (push) Successful in 59m41s
linux-postmarketos-qcom-milos 7.3.0: the kernel follows combined-stable onto v7.3.0-milos
The source branch moved to Luca Weiss's v7.3.0-milos tag (the carries that
mainline 7.3 absorbed are gone, the rest rebased, plus the in-flight QRTR
HELLO fix the modem needs at boot). The config is the 7.2 image config run
through olddefconfig on the new tree, with TOUCHSCREEN_ESWIN_EPH8621=y (the
upstream touchscreen driver replaces 7.2's unconditional downstream one;
without it the image has no touch) and HW_RANDOM_QCOM=y (CRYPTO_DEV_QCOM_RNG
moved to hw_random). QCE is marked BROKEN upstream and drops out, which
left the DT node crypto@1dfa000 without a driver: an interconnect consumer
that never probes kept the qnoc-milos providers from reaching sync_state
and every bus at its boot-time maximum vote, in sleep too; combined-stable
disables the node (c35fa276b496), which CI picks up with the tip.
ARM64_BTI_KERNEL is excluded for clang >= 21 by the base. The package
depends on soc-fairphone-fp6-audio >= 5: the 7.3 card name has its
topology and UCM only there, and booted with the version 4 files this
kernel has no sound card at all (the topology load fails, the card does
not instantiate). The 7.1-era
resolve_btfids patch goes: this config has DEBUG_INFO_REDUCED=y, so BTF is
off and the tool it fixes is never built (pmaports dropped it at 7.2.0 as
well). pmaports still ships 7.2.0 for this device.
2026-11-01 02:09:36 +01:00

105 lines
3.4 KiB
Text

# Fork of pmaports device/testing/linux-postmarketos-qcom-milos (7.2.0-r0; pmaports
# still ships 7.2.0), overlaid via pmbootstrap so it shadows the upstream aport.
# Differences: source is the Catcrafts combined-stable branch (upstream
# v7.3.0-milos tag + the FP6 bring-up carries); the config is the exact one
# the development FP6 runs, plus CONFIG_EFI_ZBOOT for the packaging below;
# build() targets the FP6's own cores (KCFLAGS); and the package depends on
# soc-fairphone-fp6-audio >= 5, which carries the topology and UCM for the
# card name the 7.3 DTS uses.
maintainer="Jorijn van der Graaf <jorijnvdgraaf@catcrafts.net>"
_flavor="postmarketos-qcom-milos"
pkgname=linux-$_flavor
pkgver=7.3.0
# always sorts above the upstream aport (r0..r99)
pkgrel=103
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"
# The 7.3 DTS names the sound card MILOS-Fairphone-Gen6; only
# soc-fairphone-fp6-audio >= 5 installs the topology and UCM under that
# name. Without this bound a kernel-only upgrade boots with no sound card at
# all: the topology load fails and the card does not instantiate.
# A pkgver floor, not a pkgrel one: pmbootstrap resolves a versioned
# dependency on an aport against its pkgver alone.
depends="soc-fairphone-fp6-audio>=5"
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
$_config
"
builddir="$srcdir/milos-linux"
prepare() {
default_prepare
cp "$srcdir/config-$_flavor.$arch" .config
}
build() {
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 \
KCFLAGS="-march=armv8.6-a+fp16fml+aes+sha3+sm4 -mtune=cortex-a720" \
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
REPLACED_BY_CI config-postmarketos-qcom-milos.aarch64
"