Skip to content

packages: add Qualcomm QRTR userspace stack - #502

Open
quatrixone wants to merge 3 commits into
derekross:mainfrom
quatrixone:qualcomm-userspace-packages
Open

quatrixone wants to merge 3 commits into
derekross:mainfrom
quatrixone:qualcomm-userspace-packages

Conversation

@quatrixone

@quatrixone quatrixone commented Nov 7, 2026 •

Copy link
Copy Markdown

Summary

Add AArch64 packages for qrtr, pd-mapper, tqftpserv, and rmtfs, and build them before phone packages that depend on them. Fix tqftpserv metadata so both QRTR and Meson are available during its build.

These are shared Qualcomm userspace components for phones using the QRTR/QMI WLAN stack. The order keeps dependency resolution correct for any such device; other phones do not consume these packages.

Checks

  • packages/{qrtr,pd-mapper,tqftpserv,rmtfs}/test/all — passed
  • git diff --check — passed
  • The QRTR package built, but the combined package build stopped while installing pd-mapper dependencies: pacman reported an invalid/corrupted package checksum. No pacman package listing was produced.
  • No phone test was run; modem and WLAN behavior remains unverified on hardware.

Package the QRTR daemon stack needed by Qualcomm WLAN and filesystem services, and build its dependencies before phone packages. Keeping this in a standalone change lets all device installs and build cost be reviewed apart from the Mi 8 port.
The later Meson assignment replaced the earlier QRTR dependency. Keep both for clean package builds.
@quatrixone
quatrixone force-pushed the qualcomm-userspace-packages branch from 3b9a12b to d3f67a3 Compare November 7, 2026 23:35
@derekross

Copy link
Copy Markdown
Owner

Thanks for packaging these. They are needed: none of the four is in Arch Linux
ARM's repositories, so a Qualcomm phone can't get them any other way. I
downloaded the four upstream tag archives. The checksums match yours, and each
is BSD-3-Clause, as declared.

Before I can merge it:

  1. A build. None of them has been built yet, and CI doesn't build packages
    without a test/all. In ORDER they are now the first thing every full
    build runs, and a failed build stops the whole run, which would hold the
    nightly packages for every phone. Please attach the log of
    tools/build-packages --local dipper packages/qrtr packages/pd-mapper packages/tqftpserv packages/rmtfs
    and a pacman -Qlp of each package. tqftpserv only installs its unit when
    meson finds systemd, so the listing is what tells us it's there.
  2. Where the PKGBUILDs come from. The Maintainer and Contributor lines say
    they were taken from elsewhere. Please name the source (the URL and commit)
    and its licence, add an SPDX header (0BSD, like our other third-party
    PKGBUILDs, if the source allows it) and our usual "Omarchy Mobile build of …,
    derived from …" header, and keep the original credits. udev.rules needs
    an SPDX line too.
  3. Two missing dependencies. pd-mapper links liblzma (xz), and tqftpserv
    needs libzstd (zstd). Both are in the base image, so it would only work by
    luck.

Smaller things:

  • conflicts=("${pkgname%-git}") makes each package conflict with itself, and
    groups=(qcom-icnss-wlan) isn't used. Both can go.
  • pd-mapper's pkgdesc is qrtr's.
  • tqftpserv sets makedepends twice. Keep the second.
  • A short README saying what each daemon does and which device uses it. For
    rmtfs, please note that upstream's rmtfs.service runs with -r, which keeps
    the modem's writes in RAM and never writes the partitions, while
    rmtfs-dir.service writes that phone's own NV files under /var/lib/rmtfs.
    Which of those the Mi 8 enables is a modem decision we'll take in the device
    package's PR, under the rule that Linux never writes the modem's partitions.
  • Kernels since 5.7 have the QRTR name service built in, so you may want
    -Dqrtr-ns=disabled for qrtr.
  • Please fold the second commit into the first. Since this lands as a squash,
    its message would otherwise end up in the history. I'll land it as
    qrtr 1.2, pd-mapper 1.1, tqftpserv 1.2, rmtfs 1.2: the Qualcomm QRTR userspace for aarch64.

I'd like to merge this together with, or just before, the dipper device
package that depends on it, so the packages land with their first user.

Add pinned provenance and runtime dependencies for the QRTR stack.

Document RAM-only rmtfs use and leave modem partition handling to bring-up.

Keep this scoped to Qualcomm phones and verify package metadata with tests.
@derekross

Copy link
Copy Markdown
Owner

Thanks for the round of fixes. xz and zstd are in depends, the self-conflicts and the unused group are gone, makedepends is set once, pd-mapper has its own description, qrtr-ns is disabled, and each package has a test/all (they pass here).

One problem is new in this push, and it would break the build:

  • rmtfs's checksum. Adding the SPDX line to udev.rules changed the file, but the PKGBUILD still lists its old sha256 (0c2f26d4…). The file now hashes to f865418bfb1ada3e54b6354d9fe4587d5c1f62d6d5e8395d8960dbe585d41ff7, so makepkg refuses rmtfs. With rmtfs early in ORDER, that refusal stops the whole package build. Running updpkgsums in packages/rmtfs fixes it.

That's also why the build log from last time still matters. Please attach tools/build-packages --local dipper packages/qrtr packages/pd-mapper packages/tqftpserv packages/rmtfs and a pacman -Qlp of each package before I merge.

Two more before merge:

  • Where the PKGBUILDs come from. The new header names the upstream source (linux-msm/<name> at the tag), which is good. The recipes themselves come from the AUR, though: qrtr, pd-mapper, tqftpserv and rmtfs there are maintained by supertecnogym, whose Maintainer line you kept. Please name that source too, for example "PKGBUILD derived from the AUR's rmtfs (https://aur.archlinux.org/rmtfs.git, commit …)". The SPDX line on a PKGBUILD is the recipe's licence, not the program's. AUR recipes are 0BSD, so # SPDX-License-Identifier: 0BSD, as on our other third-party PKGBUILDs. license=("BSD-3-Clause") stays as it is, because that one is the program's. The same goes for udev.rules, if it came from the AUR package.
  • The README. A file at packages/README.md reads as the README for every package in the directory. Our third-party packages (neard, hyprland) each carry their own README.md. Could you split it into one per package? One fact needs correcting while you're there: tqftpserv 1.2 keeps its read-write files in /var/lib/tqftpserv (TQFTPSERV_RW_DIR in translate.c, and StateDirectory=tqftpserv in its unit), not /tmp/tqftpserv. That directory holds files the modem writes for that one phone, so it's worth saying they're never copied to another phone or committed.

Smaller:

  • The tests check the PKGBUILD text but not the checksum of the local file, which is how the udev.rules mismatch got through. Something like [[ $(sha256sum < udev.rules | cut -d' ' -f1) == <the sum in the PKGBUILD> ]] in rmtfs's test/all would catch it next time.
  • The four names first in ORDER are fine once they build. As before, I'd like to merge this together with, or just before, the dipper device package that depends on them.
  • The title isn't the squash subject: I'll land it as qrtr 1.2, pd-mapper 1.1, tqftpserv 1.2, rmtfs 1.2: the Qualcomm QRTR userspace for aarch64.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants