2026-10-31 03:31:00 +01:00
|
|
|
# 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.
|
2026-08-08 15:42:45 +02:00
|
|
|
maintainer="Jorijn van der Graaf <jorijnvdgraaf@catcrafts.net>"
|
|
|
|
|
_flavor="postmarketos-qcom-milos"
|
|
|
|
|
pkgname=linux-$_flavor
|
2026-10-31 03:31:00 +01:00
|
|
|
pkgver=7.3.0
|
2026-08-08 15:42:45 +02:00
|
|
|
# always sorts above the upstream aport (r0..r99)
|
2026-09-15 22:27:50 +02:00
|
|
|
pkgrel=103
|
2026-08-08 15:42:45 +02:00
|
|
|
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"
|
2026-10-31 03:31:00 +01:00
|
|
|
# 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"
|
2026-08-08 15:42:45 +02:00
|
|
|
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
|
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-06 00:02:19 +02:00
|
|
|
# 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.
|
2026-08-08 15:42:45 +02:00
|
|
|
make ARCH="$_carch" LLVM=1 \
|
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-06 00:02:19 +02:00
|
|
|
KCFLAGS="-march=armv8.6-a+fp16fml+aes+sha3+sm4 -mtune=cortex-a720" \
|
2026-08-08 15:42:45 +02:00
|
|
|
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
|
|
|
|
|
"
|