Files
besser/danctnix-besser-pkgbuild
claude-noether 0f783a1e69 danctnix-besser PKGBUILD polish: drop-in replacement metadata + DTB strip fix
(1) Add `provides=("linux-pinetab2=$pkgver-$pkgrel")` and
    `conflicts=(linux-pinetab2)` so pacman -U cleanly replaces the
    upstream linux-pinetab2 package without needing --overwrite for the
    shared rk3566-pinetab2-*.dtb files.

    Verified end-to-end on ohm 2026-05-08: with these declarations
    pacman would refuse coexistence (matching the actual filesystem
    reality - both packages own the same DTB paths) and accept upgrade
    when removing the old package.

    Keeping `replaces=(wireguard-arch)` from upstream linux-pinetab2.
    Not adding linux-pinetab2 to replaces= since the soft-upstream
    intent is opt-in sidegrade, not auto-install on -Syu.

(2) Replace the bash for-loop DTB strip with find -delete.

    The original loop silently no-op'd during the makepkg-fakeroot
    package() phase: build verification of the published .pkg.tar.zst
    showed 236 DTBs, 234 of them unrelated boards (px30-*, rk3308-*,
    rk3328-*, rk3399-*, etc).  Root cause not pinned down (suspected
    nullglob or cwd interaction), but find -mindepth 1 -maxdepth 1
    ! -name 'rk3566-pinetab2-*' -delete is robust to that environment
    and correctly identifies 2 to keep / 234 to remove on the existing
    pkgdir.

    Net pkg size impact: ~5 MB reduction (most non-pinetab2 DTBs are
    20-40 KB).

No kernel rebuild required - PKGBUILD-only metadata + package() logic
change.  Will take effect on the next makepkg run.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-08 15:08:16 +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:

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. Flash the resulting .pkg.tar.zst via pacman -U. Reboot to load.

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).