Skip to content

feat: restructure repo with per-kernel-version branches (v5.4 through v6.12)#10

Open
bacnh85 wants to merge 10 commits intomasterfrom
v6.12
Open

feat: restructure repo with per-kernel-version branches (v5.4 through v6.12)#10
bacnh85 wants to merge 10 commits intomasterfrom
v6.12

Conversation

@bacnh85
Copy link
Copy Markdown
Owner

@bacnh85 bacnh85 commented Apr 20, 2026

Summary

Restructured the repository with dedicated branches for each LTS kernel version. Users checkout the branch matching their kernel, then choose between out-of-tree module build or in-kernel patching.

New Branch Structure

Branch Kernel Quectel Serial Devices QMI Entries Backport Size
v5.4 5.4.x LTS +14 products from 6.12 +12 entries 702-line option.c patch
v5.15 5.15.x LTS +12 products from 6.12 +8 entries 502-line option.c patch
v6.1 6.1.x LTS +10 products from 6.12 +4 entries 374-line option.c patch
v6.6 6.6.x LTS +6 products from 6.12 +2 entries 265-line option.c patch
v6.12 6.12.x Full mainline support Full support No patch needed

What Changed

  • Removed old patched drivers and PDF documentation
  • Added per-kernel branches with:
    • Out-of-tree driver sources (QuectelWB with 3.x–6.x+ compat wrappers)
    • In-kernel patches (diff from vanilla kernel → 6.12 Quectel support)
    • qmi_wwan_q.c with QMAP multiplexing support
    • Makefile for out-of-tree make build
    • Comprehensive README.md with both build methods

Two Build Methods (per branch)

  1. Out-of-tree: make && sudo make install — builds option.ko, usb_wwan.ko, qmi_wwan_q.ko
  2. In-kernel patch: patch -p1 < patches/option.c.patch — applies Quectel device ID backport to kernel source

Supported Quectel Modules

UC15, UC20, EC20, EC21, EC25, EG91, EG95, BG96, BG95, AG35, EP06, EM05G series, EM060K/EM061K series, EM12, EM160R-GL, RM500Q, RM520N, RM500K, RM500U, RG650V, EC200S, EC200A, EC200T, EC200U, EG912Y, EG916Q

Source Attribution

  • Out-of-tree: QuectelWB/q_drivers (GPL-2.0)
  • Patches: Backported from mainline Linux 6.12 to older LTS kernels
  • No dependency on Quectel proprietary instructions

@bacnh85
Copy link
Copy Markdown
Owner Author

bacnh85 commented Apr 20, 2026

Update: PR is now in a merge-ready state.

What changed

  • Switched to an upstream-first, patch-driven structure
  • Kept upstream-style option.c / qmi_wwan.c instead of vendor-specific qmi_wwan_q.c
  • Reworked out-of-tree build flow to copy kernel sources from KDIR, apply branch-specific patches, then build
  • Fixed patch generation/format issues so GNU patch validates cleanly
  • Fixed Makefile path handling, patch strip levels, and header copying (usb-wwan.h)
  • Hardened GitHub Actions so kernel build failures are surfaced correctly instead of hidden by piped tail
  • Added compatibility handling for older kernels (notably v5.4 QMI patch compatibility)
  • For v5.15, pinned CI kernel tooling to gcc-11/g++-11 to avoid the older-kernel objtool failure on newer GCC

Current status

  • v5.4: passing
  • v5.15: passing
  • v6.1: passing
  • v6.6: passing
  • v6.12: passing

Notes

  • PR head (v6.12) is green
  • PR merge state is clean
  • Branches remain structured per target kernel version as requested
  • Approach remains upstream-preferred and suitable for merge to master

If desired after merge, a follow-up cleanup can squash some of the iterative CI-fix commits, but functionally the PR is ready.

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.

1 participant