mirror of
https://github.com/shenmintao/aic8800d80.git
synced 2026-09-26 17:44:16 +00:00
docs: document OpenWrt cfg80211 backport builds
27af5ad added the CFG80211_VERSION make variable for OpenWrt builds that
use a newer mac80211 backport than the target kernel, but it is only
described in a Makefile comment. Document how to pass it from an OpenWrt
package Makefile, link the notes from the installation steps, and add
the build script and the kernel/backports combinations verified for
issue #94.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
7ec1a4fbb1
commit
c97644a43a
@@ -0,0 +1,44 @@
|
||||
# OpenWrt backports build regression
|
||||
|
||||
This checks complete module compilation and MODPOST against real kernel and
|
||||
wireless-stack headers. It requires an already prepared SDK/buildroot with
|
||||
cfg80211/mac80211 headers and `mac80211.symvers` staged. It does not install
|
||||
packages or load modules.
|
||||
|
||||
For the x86_64 SDK used in issue #94:
|
||||
|
||||
```sh
|
||||
sdk=/path/to/openwrt-sdk
|
||||
kernel="$sdk/build_dir/target-x86_64_musl/linux-x86_64/linux-6.12.94"
|
||||
export STAGING_DIR="$sdk/staging_dir/target-x86_64_musl"
|
||||
export PATH="$sdk/staging_dir/toolchain-x86_64_gcc-14.3.0_musl/bin:$PATH"
|
||||
|
||||
bash tests/openwrt-backports/build.sh \
|
||||
"$kernel" "$STAGING_DIR/usr/include" \
|
||||
"$kernel/../symvers/mac80211.symvers" 6.18.26 \
|
||||
ARCH=x86_64 CROSS_COMPILE=x86_64-openwrt-linux-musl-
|
||||
```
|
||||
|
||||
The script copies the current driver into a fresh temporary directory and
|
||||
checks that all three `.ko` files are produced. Additional make arguments
|
||||
can select a compiler or architecture. Use matching headers, configuration
|
||||
and symbol versions throughout; changing only the version argument is not
|
||||
a substitute for the matching wireless stack.
|
||||
|
||||
## Verified on 2026-09-17
|
||||
|
||||
- OpenWrt 25.12.5 x86_64 SDK: Linux 6.12.94, GCC 14.3.0, backports 6.18.26
|
||||
with the mac80211 patches from OpenWrt revision `f5dae5ece4` applied:
|
||||
all three modules compile and pass MODPOST with the kernel's `-Werror`.
|
||||
- Original driver revision `9594c5c`, on the same kernel/backports combination:
|
||||
reproduces both RX argument-count errors and the four incompatible
|
||||
`set_monitor_channel`, `set_wiphy_params`, `set_tx_power`, `get_tx_power`
|
||||
callbacks. This comparison uses `-Wno-error=unused-label`, as the issue's
|
||||
log does, to reach those failures. The fixed build needs no such override.
|
||||
- Native kernel headers 6.11.0-17, 6.17.0-14 and 7.2.0-070200, with
|
||||
`CFG80211_VERSION` unset: all three modules compile and pass MODPOST.
|
||||
The 7.2 check uses GCC 14 and reports compiler/attribute warnings because
|
||||
those headers were built with GCC 15.
|
||||
|
||||
These are build checks. They do not validate an installable OpenWrt package,
|
||||
firmware loading, Wi-Fi connectivity or Bluetooth operation on hardware.
|
||||
Executable
+41
@@ -0,0 +1,41 @@
|
||||
#!/usr/bin/env bash
|
||||
# Compile a source copy against a prepared kernel and staged wireless backport.
|
||||
# Leaves the build directory for inspection; does not install or load modules.
|
||||
set -euo pipefail
|
||||
|
||||
if [ "$#" -lt 4 ]; then
|
||||
echo "Usage: $0 KERNEL_BUILD_DIR STAGED_INCLUDE_DIR MAC80211_SYMVERS CFG80211_VERSION [make arguments...]" >&2
|
||||
exit 2
|
||||
fi
|
||||
|
||||
kernel_dir=$(realpath "$1")
|
||||
include_dir=$(realpath "$2")
|
||||
symvers=$(realpath "$3")
|
||||
wireless_version=$4
|
||||
shift 4
|
||||
|
||||
for required in "$kernel_dir/Makefile" "$kernel_dir/Module.symvers" \
|
||||
"$include_dir/mac80211/net/cfg80211.h" \
|
||||
"$include_dir/mac80211-backport/backport/autoconf.h" "$symvers"; do
|
||||
if [ ! -f "$required" ]; then
|
||||
echo "Missing build input: $required" >&2
|
||||
exit 2
|
||||
fi
|
||||
done
|
||||
|
||||
repo_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)
|
||||
build_dir=$(mktemp -d "${TMPDIR:-/tmp}/aic8800-backports.XXXXXX")
|
||||
cp -a "$repo_dir/drivers/aic8800/." "$build_dir/"
|
||||
echo "Build directory: $build_dir"
|
||||
|
||||
make -C "$kernel_dir" M="$build_dir" \
|
||||
NOSTDINC_FLAGS="-I$include_dir/mac80211-backport/uapi -I$include_dir/mac80211-backport -I$include_dir/mac80211/uapi -I$include_dir/mac80211 -include backport/backport.h" \
|
||||
KBUILD_EXTRA_SYMBOLS="$symvers" \
|
||||
CFG80211_VERSION="$wireless_version" \
|
||||
-j"${JOBS:-2}" "$@" modules
|
||||
|
||||
for module in aic_load_fw/aic_load_fw.ko aic8800_fdrv/aic8800_fdrv.ko \
|
||||
aic_zlp_quirk/aic_zlp_quirk.ko; do
|
||||
test -s "$build_dir/$module"
|
||||
done
|
||||
echo "All three modules built successfully in $build_dir"
|
||||
Reference in New Issue
Block a user