Skip to content

reference/: vendor kernel drivers as git submodules#229

Merged
josephnef merged 1 commit into
masterfrom
refactor-reference-submodules
Jul 10, 2026
Merged

reference/: vendor kernel drivers as git submodules#229
josephnef merged 1 commit into
masterfrom
refactor-reference-submodules

Conversation

@josephnef

Copy link
Copy Markdown
Collaborator

What

Replaces the 1.2 GB of gitignored full clones under reference/ with pinned git submodules, so contributors share the same fork+commit ground-truth without committing driver source into devourer's history — the parent repo gains only gitlinks (+29 lines total).

Fork choices (one dir per driver)

submodule tracks why
rtl8812au, rtl88x2bu, rtl88x2cu, rtl88x2eu josephnef/* forks of OpenHD @ devourer-kbuild OpenHD is the FPV/wifibroadcast lineage matching devourer (runtime TX-power-index + raw injection) — vs aircrack-ng (pentest) / morrownr (managed-AP, no injection)
8821cu morrownr/8821cu-20210916 @ main canonical monitor-capable 8821CU; builds clean
rtl88x2eu-5mhz libc0607/rtl88x2eu-20230815 @ 5mhz_bw not a duplicate — the only fork with the working R_0x9b4 5 MHz DAC-divider, the Jaguar3 narrowband ground-truth for tests/jaguar3_eu_kernel_5mhz_sdr.sh + jaguar3_eu_5mhz_mirror_ab.sh. OpenHD's lineage dropped this branch, so both are tracked. (was rtl88x2eu-2023-5mhz)

Build patches preserved

The four OpenHD drivers need small kernel-6.x kbuild-compat patches (EXTRA_CFLAGSccflags-y, from_timertimer_container_of) to build their .ko on modern host/VM kernels. These live as one patch commit on each devourer-kbuild branch (= pinned upstream commit + patch), so everyone builds the reference .ko identically.

Housekeeping

  • Chip-id / kernel-bind helpers moved reference/tests/ (chipid_probe.c, read_8821c_chipid.sh, 8821cu_hwtest.sh); committed compiled probe binary dropped. read_8821c_chipid.sh builds into a tempdir; 8821cu_hwtest.sh resolves the .ko via the submodule path.
  • Rationale + git submodule update --init --recursive documented in reference/README.md, pointer added to CLAUDE.md.

Verification

  • Each reference/* is a mode-160000 gitlink — zero driver source in devourer history.
  • tools/extract_*.py reproduce hal/ byte-for-byte from the submodule checkouts (fork content = ground-truth).
  • Moved scripts pass bash -n; chipid_probe.c compiles; build clean; 15/15 ctest pass.
  • Local reference/ 1.2 G → 272 M (shallow); smaller for fresh consumer inits.

Note for reviewers

The devourer-kbuild/5mhz_bw submodule branches are non-default, so init needs --recursive (branches are recorded in .gitmodules). Fetch with:

git submodule update --init --recursive

🤖 Generated with Claude Code

Replace 1.2 GB of gitignored full clones under reference/ with pinned git
submodules so contributors share the same fork+commit ground-truth without
committing driver source into devourer's history (parent gains only gitlinks).

Forks (one dir per driver):
- rtl8812au / rtl88x2bu / rtl88x2cu / rtl88x2eu -> josephnef forks of OpenHD
  on a devourer-kbuild branch (pinned upstream + one kernel-6.x kbuild-compat
  patch: ccflags-y, from_timer->timer_container_of) so the reference .ko builds
  on modern host/VM kernels.
- 8821cu -> morrownr/8821cu-20210916 @ main.
- rtl88x2eu-5mhz -> libc0607/rtl88x2eu-20230815 @ 5mhz_bw: the only fork with
  the working R_0x9b4 5 MHz DAC-divider, kept as the Jaguar3 narrowband
  ground-truth (was rtl88x2eu-2023-5mhz). OpenHD is the maintained mainline;
  its lineage dropped the narrowband branch, so both are tracked.

OpenHD chosen over aircrack-ng (pentest) / morrownr (managed-AP) because it is
the FPV/wifibroadcast lineage matching devourer (runtime TX-power-index + raw
injection). Rationale + layout in reference/README.md.

Move chip-id / kernel-bind helpers out of reference/ root into tests/
(chipid_probe.c, read_8821c_chipid.sh, 8821cu_hwtest.sh); drop the committed
compiled probe binary. read_8821c_chipid.sh builds into a tempdir;
8821cu_hwtest.sh resolves the .ko via the submodule path.

Verified: tools/extract_*.py reproduce hal/ byte-for-byte from the submodule
checkouts; 15/15 ctest pass.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@josephnef josephnef merged commit 0373e68 into master Jul 10, 2026
15 checks passed
@josephnef josephnef deleted the refactor-reference-submodules branch July 10, 2026 09:56
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