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.
125 lines
4.7 KiB
Text
125 lines
4.7 KiB
Text
# fp6-img fork of Alpine community/modemmanager: + the AFW-gated GNSS
|
|
# engine unlock + Position Report location derivation (upstream MR !1463,
|
|
# still draft) - the other half of working GNSS on the FP6.
|
|
# Contributor: Stuart Cardall <developer@it-offshore.co.uk>
|
|
maintainer="Achill Gilgenast <achill@achill.org>"
|
|
pkgname=modemmanager
|
|
pkgver=1.25.95_git20260709
|
|
pkgrel=101
|
|
_commit=d776ea38d29ca472a12323c1d45002ee19a66f57
|
|
pkgdesc="ModemManager library"
|
|
url="https://www.freedesktop.org/wiki/Software/ModemManager"
|
|
arch="all"
|
|
license="GPL-2.0-or-later AND LGPL-2.1-or-later"
|
|
depends="
|
|
dbus
|
|
libmm-glib=$pkgver-r$pkgrel
|
|
mobile-broadband-provider-info
|
|
polkit
|
|
"
|
|
depends_dev="libmm-glib=$pkgver-r$pkgrel"
|
|
# fp6-img: $depends_dev removed from makedepends - the pinned own-subpackage
|
|
# only resolves when the binary repo already carries this exact pkgrel, which
|
|
# is never true for our r100 fork (MM does not need libmm-glib to build).
|
|
makedepends="
|
|
bash-completion-dev
|
|
dbus-dev
|
|
elogind-dev
|
|
gobject-introspection-dev
|
|
gtk-doc
|
|
libgudev-dev
|
|
libmbim-dev
|
|
libqmi-dev>=1.39.1
|
|
linux-headers
|
|
meson
|
|
polkit-dev
|
|
vala
|
|
"
|
|
checkdepends="glib-dev py3-gobject3 py3-dbus"
|
|
# fp6-img: crossdirect breaks on this build (native cc cannot spawn cc1 from
|
|
# the foreign chroot); build under plain qemu instead. !check because 3 of
|
|
# 38 glib tests SIGABRT under qemu-user emulation (they pass on Alpine's
|
|
# native builders, and none exercise the GNSS code our patches change) -
|
|
# on-device validation is the real test.
|
|
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="
|
|
$pkgname-lang
|
|
$pkgname-doc
|
|
libmm-glib:libmm
|
|
$pkgname-dbg
|
|
$pkgname-dev
|
|
$pkgname-openrc
|
|
$pkgname-bash-completion
|
|
$pkgname-systemd
|
|
$pkgname-udev
|
|
"
|
|
#source="https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/archive/$pkgver/ModemManager-$pkgver.tar.gz
|
|
# fp6-img: local tarball, generated by build.sh from a git clone — fd.o's
|
|
# archive endpoint 504s for hours at a stretch (killed CI runs 27/30/31)
|
|
source="ModemManager-$_commit.tar.gz
|
|
$pkgname.rules
|
|
$pkgname.initd
|
|
|
|
0001-intel-XMM7360-fix-big-endian-handling-of-ASN-integer.patch
|
|
0002-shared-qmi-unlock-AFW-gated-GNSS-engines-at-LOC-star.patch
|
|
0003-shared-qmi-derive-location-from-Position-Report-indi.patch
|
|
"
|
|
#builddir="$srcdir"/ModemManager-$pkgver
|
|
builddir="$srcdir"/ModemManager-$_commit
|
|
|
|
build() {
|
|
# Temporarily disable gtkdoc generation due to error in helper script
|
|
# https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/902
|
|
abuild-meson \
|
|
-Db_lto=true \
|
|
-Dsystemdsystemunitdir=/usr/lib/systemd/system \
|
|
-Ddbus_policy_dir=/usr/share/dbus-1/system.d \
|
|
-Dgtk_doc=false \
|
|
-Dpolkit=permissive \
|
|
-Dsystemd_journal=false \
|
|
-Dsystemd_suspend_resume=true \
|
|
-Dvapi=true \
|
|
. output
|
|
meson compile -C output
|
|
}
|
|
|
|
check() {
|
|
meson test -C output
|
|
}
|
|
|
|
package() {
|
|
DESTDIR="$pkgdir" meson install --no-rebuild -C output
|
|
install -m644 -D "$srcdir/$pkgname.rules" \
|
|
"$pkgdir/usr/share/polkit-1/rules.d/01-org.freedesktop.ModemManager.rules"
|
|
install -m755 -D "$srcdir/$pkgname.initd" \
|
|
"$pkgdir/etc/init.d/$pkgname"
|
|
|
|
# post-install message
|
|
mkdir -p "$pkgdir/usr/share/doc/$pkgname"
|
|
cat > "$pkgdir"/usr/share/doc/$pkgname/README.alpine <<- EOF
|
|
If your USB modem shows up as a Flash drive when you plug it in:
|
|
|
|
install 'usb-modeswitch' to automatically switch to USB modem mode whenever you plug it in.
|
|
To control your modem without the root password: add your user account to the 'plugdev' group.
|
|
EOF
|
|
}
|
|
|
|
libmm() {
|
|
depends=""
|
|
amove usr/lib/girepository-1.0
|
|
amove usr/lib/libmm-glib.so*
|
|
}
|
|
|
|
sha512sums="
|
|
fd659330b2ec4e8368807053ec01498241dec153f6f2491bb17c42e2b81c8d9a98ff5f8c153874a6d092e17c545c5ae19734bc23c85c459eb1c7b9b709e5ff58 ModemManager-d776ea38d29ca472a12323c1d45002ee19a66f57.tar.gz
|
|
6fab86c27502b29be0c6610d835a3249a4a81993eb986cff2c3ea9393fadd3f693ba4bb0532ae0e50a83d359559511859dd05f7ea2f0cb52839f535a7e49f8a0 modemmanager.rules
|
|
6e234cebcdec6d1afbca164ee5c13c96f7132ef31231d5c043cc5750ebe99e362a384d0463874b3c1c30799b433e0d3286add03af13c97fa406b4b5d2b78880c modemmanager.initd
|
|
f06e9b89acab5b61c5965658d62551b0f168066384674f7c4dd56feb6f811c82c640470e634e32d8c4ef62290588cf974aa5f213e5c67e797a06d33e61fa24ec 0001-intel-XMM7360-fix-big-endian-handling-of-ASN-integer.patch
|
|
"
|