Skip to content

packages: add Qualcomm QRTR userspace stack - #502

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

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

Conversation

@quatrixone

@quatrixone quatrixone commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

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.

@quatrixone

Copy link
Copy Markdown
Contributor Author

The review items are in 0c06dd3332103e4ed720f08ba7b85f6387703a16: tqftpserv documents the per-phone /var/lib/tqftpserv state directory and says it is never copied to another phone; rmtfs/test/all now compares the local udev.rules SHA-256 with the PKGBUILD checksum. All four package tests and package-content checks pass. The device package is still the intended merge companion.

@quatrixone

Copy link
Copy Markdown
Contributor Author

The requested local package evidence is ready.

  • Built qrtr, pd-mapper, tqftpserv and rmtfs individually with tools/build-packages --force --local dipper packages/<name>. Each package's test/all passed, and each package was signed and indexed in the local Dipper repository.
  • The combined tools/build-packages --local dipper packages/qrtr packages/pd-mapper packages/tqftpserv packages/rmtfs then exited successfully with all four versions up to date.
  • pacman -Qlp confirms the expected contents: qrtr-cfg, qrtr-lookup and libqrtr.so; pd-mapper and its service; tqftpserv and its service; rmtfs, both services and 65-rmtfs.rules.

A combined forced rebuild stopped in the pd-mapper dependency transaction with invalid or corrupted package (checksum). Rebuilding each package separately succeeded; I have not changed the build tooling in this PR.

@derekross

Copy link
Copy Markdown
Owner

Thank you, everything from my last comment is in, and I could check most of it from here:

  • the udev.rules checksum matches the file again, and the new line in rmtfs/test/all means it can't drift silently a second time;
  • the four PKGBUILDs are 0BSD and name both the AUR commit and the upstream tag they come from; the AUR commits resolve, and all four upstream tarballs match your sha256sums;
  • each package has its own README, and tqftpserv's now says /var/lib/tqftpserv, per phone, never copied or committed.

And thank you for the builds and the pacman -Qlp listings. The failed combined run looks like what --force does when it rebuilds qrtr at the same version while the cache still holds the earlier file under that name: the next package then installs a qrtr whose checksum no longer matches the index. That's the tooling, not your packages, and you were right to leave the tooling alone in this PR.

I agree with your plan: this merges together with omamobile-device-dipper, the first package that depends on these. The reason is practical. The PR puts the four at the front of the build order, so from the night after a merge my publish machine builds them for every phone, and I'd rather take that on when a phone installs them. Before the merge I'll run one plain (unforced) build of the four there.

Nothing more is needed from you here until the device package is up.

@quatrixone

Copy link
Copy Markdown
Contributor Author

The companion Dipper package is now up in draft #714. It depends on these four packages and leaves the QRTR/rmtfs services disabled pending device policy and hardware validation. test/all, tools/pr-check, the aarch64 package build and pacman -Qlp passed. The final package build used makepkg --nodeps in the prepared Arch Linux ARM image because the normal forced builder could not look up a newer Arch signing key; the limitation and exact checks are recorded in #714. I have not installed this exact package over the running NFS test root. Dipper remains RAM/NFS-only; no UFS writes were made.

@derekross

Copy link
Copy Markdown
Owner

Thanks for the pointer to #714, I've read it and left my notes there. Nothing has changed here and nothing needs to: the four packages are as I checked them on 11-10 (the udev.rules sum still matches, CI is green, and it still merges cleanly with today's main and with #500 and #714).

The plan is the same as before: this goes in together with the device package, this one first, because #714 depends on the four and the publish machine starts building them for every phone the night after the merge. Before that I'll run one plain build of the four on that machine.

One thing to keep in mind for later, not for this PR: nothing here has run on the Mi 8 yet, and #714 rightly enables none of the services. The first start of rmtfs on the phone is a radio step, so it gets its own runbook, with the backup check in front of it.

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