Files
besser/danctnix-besser-pkgbuild
claude-noether 122582e270 danctnix-besser: pkgrel=3 — refine Patch I, add SCS-off + GCC15 workaround
Three things bundled because they were verified together in the same
deploy cycle on ohm (kernel built fresh on boltzmann 2026-05-18):

1. 0002 (Patch I) refined: refuse only multi-channel 5 GHz scans
   (n_channels > 1).  Original Patch I refused everything, which
   blocked NM's per-frequency BSS discovery and made 5 GHz association
   impossible.  Tighter guard preserves the storm fix and unblocks
   5 GHz attachment via NM 802-11-wireless.band=a profiles.

   Verified on ohm with pkgrel=3: associated to BSSID
   c0:25:06:e6:5b:33 on 5240 MHz (ch.48), TX 150 Mbit/s MCS 7
   HT40 short-GI vs 72.2 Mbit/s on 2.4 GHz.  Pattern A still 0.

   Source-of-truth: marfrit/bes2600-dkms branch bes2600/scan-filter-5ghz
   commits 093a503 + 8cd10f4 (squashed into this single 0002 file).

2. 0003 (new): arm64 xor-neon Makefile workaround for GCC 15.2.1
   strict pragma validator vs arm_neon.h target() blocks losing
   -ffixed-x18 under SCS=y.  This is a defensive workaround;
   currently dead-coded (SCS=n below) but in place for the day SCS
   re-enable becomes possible (tracked in besser#20).

3. config: CONFIG_SHADOW_CALL_STACK=n override for the current GCC
   15.2.1 toolchain issue.  Restore to =y once GCC upstream fixes
   the arm_neon.h pragma interaction (besser#20).

pkgrel bumped 2 -> 3.

Refs: besser#1 (closed), besser#20, kernel-agent#25 (PR mirroring
this into the kernel-agent patch tree — needs follow-up to pick
up the refinement).
2026-05-18 15:57:05 +02:00
..

linux-pinetab2-danctnix-besser

Soft-upstream fork of linux-pinetab2 (DanctNIX kernel for PineTab2) carrying the BESser bes2600 staging-driver patchset.

Drop-in replacement for linux-pinetab2. Same kernel version, same config, same modules — only the drivers/staging/bes2600/ driver differs.

What's in the patchset

A 16-commit cumulative diff over v7.0-danctnix1's in-tree drivers/staging/bes2600/, capturing the patch groups below.

Individual commits with full rationale + Phase-7 verification logs live on the cleanups branch of marfrit/bes2600-dkms — this PKGBUILD ships them squashed (one cumulative diff) for build atomicity.

group what it does
c-stack (Patches A, B, c5.1c5.2.1, c6.1, c6.2, c7) wifi-stability fixes: decrypt-storm fast-recover, connection-loss bus-reset, scan-defer-on-firmware-reject, PM state resync, firmware-doesn't-honour-PSM self-detect, multi-function SDIO mmc_hw_reset rescan
Patch F cw1200 mainline backports: hw_scan SKB-lifecycle UAF, init_common destroy_workqueue on error, atomic_add(1, x) → atomic_inc(x) cosmetic
Patch C v3 structural: drop sdio_rx_work workqueue relay; IRQ → bh-direct architecture (matches mainline cw1200)
Patch G GPL-2.0 §1 attribution restoration: SPDX-License-Identifier on every file, Tarnyagin/ST-Ericsson Copyright restored on cw1200-derived files
Patch D ba_lock removed; ba_acc/ba_cnt/ba_acc_rx/ba_cnt_rx/ba_ena converted to atomic_t; per-RX-frame spinlock eliminated
Patch E per-RX-frame ps_state_lock skipped when c7's pm_unsupported latch is on (steady-state on production firmware)
Patch C2 ieee80211_rx_irqsafe → ieee80211_rx_ni at all 6 sites (kernel.org-clean process-context API; tasklet hop removed)
Patch H bh.c hygiene cleanup: 76-line + 468-line #if 0 cw1200-ancestor fossil blocks removed; __bes2600_irq_enable stub removed; per-iteration BUG_ONWARN_ON_ONCE

Measured outcome (Mobian-flavor verification, expected to carry over)

  • Phase 7 N=3 stress @ 4 MB/s sender on RK3566/PineTab2:
    • Patch B baseline: 1.36 MB/s
    • Patch C v3 + F + G + D + E + C2 + H: 2.28 MB/s sustained, +67% over baseline
  • Race-fix verified under stress (no wsm_release_tx_buffer WARN storm under load)
  • Module loads + associates cleanly; pm_unsupported latch fires on boot as expected
  • Build clean with no warnings, srcversion 99052D7… (Mobian-flavor) / TBD on first danctnix build

Provenance

Why it's "BESser"

"Besser" = German for "better." Patch series ID across both DKMS (Mobian) and in-tree (Danctnix) trees. Single source-of-truth lives in marfrit/bes2600-dkms; this PKGBUILD is the danctnix-flavor consumption surface.

Building

makepkg -s

Identical workflow to upstream linux-pinetab2. Produces linux-pinetab2-danctnix-besser-<ver>-aarch64.pkg.tar.zst plus a matching -headers package. Build host can be aarch64 native (recommended — no cross-toolchain setup) or x86 with an aarch64 cross-compiler.

Build time: ~4555 min on an 8-core aarch64 host (boltzmann/RPi5-class), most of it the kernel modules phase.

Installing

The package declares provides=("linux-pinetab2=$pkgver-$pkgrel") and conflicts=(linux-pinetab2), so pacman will cleanly take over from upstream linux-pinetab2:

sudo pacman -U linux-pinetab2-danctnix-besser-7.0.danctnix1-1-aarch64.pkg.tar.zst

That removes the upstream linux-pinetab2 package (if installed) and registers the BESser-flavored kernel under the same provides slot. Headers package is optional; install it if you build out-of-tree modules.

The pacman mkinitcpio hook auto-generates /boot/initramfs-linux-pinetab2-danctnix-besser.img. Modules land in /usr/lib/modules/<release>-pinetab2-danctnix-besser/, vmlinuz at /boot/vmlinuz-linux-pinetab2-danctnix-besser, DTBs at /boot/dtbs/rockchip/rk3566-pinetab2-{v0.1,v2.0}.dtb.

Bootloader (PineTab2-specific)

PineTab2 boots via U-Boot loading a script boot.scr (compiled from /boot/boot.txt via mkscr). After install, point the script at the new kernel + initramfs:

sudo cp /boot/boot.txt /boot/boot.txt.pre-besser
sudo cp /boot/boot.scr /boot/boot.scr.pre-besser
sudo sed -i \
  -e 's|/vmlinuz-linux-pinetab2$|/vmlinuz-linux-pinetab2-danctnix-besser|' \
  -e 's|/initramfs-linux-pinetab2\.img|/initramfs-linux-pinetab2-danctnix-besser.img|' \
  /boot/boot.txt
cd /boot && sudo ./mkscr
sudo systemctl reboot

Backups (*.pre-besser) let you revert without touching the U-Boot console: sudo cp /boot/boot.scr.pre-besser /boot/boot.scr and reboot.

Verifying

After reboot:

uname -r
# expected: <kver>-pinetab2-danctnix-besser

lsmod | grep -i bes2600
# expected: bes2600 (loaded), bes2600_btuart (loaded if Bluetooth in use)

cat /sys/module/bes2600/srcversion
# expected: a srcversion distinct from the upstream linux-pinetab2 module

dmesg | grep bes2600 should show clean firmware load, no SDIO TX panic, no wsm_release_tx_buffer WARN storm under load.

Rolling back

If the new kernel misbehaves:

sudo cp /boot/boot.scr.pre-besser /boot/boot.scr
sudo systemctl reboot

That returns you to whatever kernel boot.scr was pointing at before the install (typically upstream linux-pinetab2 or the previous linux-pinetab2-danctnix-besser). The package itself can be removed with sudo pacman -R linux-pinetab2-danctnix-besser and the original linux-pinetab2 re-installed via sudo pacman -S linux-pinetab2.

Soft-upstream intent

Submitting this PKGBUILD to DanctNIX for review. If accepted as a replacement for linux-pinetab2 (or sidegrade), the BESser patchset ships to all PineTab2 users via the regular danctnix package update channel. The bes2600 driver gets:

  • ~2× sustained RX throughput
  • Race-correctness on the hot path
  • GPL-2.0 §1 attribution compliance
  • Modern kernel API (no deprecated from_timer, no _irqsafe from process context, no BUG_ON in steady-state)

Drop-in compatibility: same kernel version, same module names, no userspace ABI change.

Maintenance plan

  • New danctnix kernel release → rebase BESser patch onto the new tag, regenerate cumulative diff, bump pkgver
  • New BESser patch on Mobian DKMS → re-overlay + re-flavor + regenerate cumulative diff
  • Both flavors continue to be maintained in lockstep via marfrit/bes2600-dkms source-of-truth

Known gaps

  • Single cumulative diff (squashed 16 commits) for now. Per-patch series can be regenerated if danctnix maintainers prefer.
  • Bluetooth-side bes2600_btuart is independent and untouched by this patchset.
  • bes2600_switch_bt orchestration removed (Mobian-only entry point; not used in danctnix tree).

Author

Markus Fritsche fritsche.markus@gmail.com

Built collaboratively with Claude Opus 4.7 (1M context).