Add 8812eu WiFi adapter support to gk7205v200 FPV firmware#70
Conversation
|
@flyrouter 👋 This repository doesn't have Copilot instructions. With Copilot instructions, I can understand the repository better, work faster and produce higher quality PRs. I can generate a .github/copilot-instructions.md file for you automatically. Click here to open a pre-filled issue and assign it to me. I'll write the instructions, and then tag you for review. |
Co-authored-by: flyrouter <68112357+flyrouter@users.noreply.github.com>
|
Superseded by #133, which takes the one line from here that we want: The rest of this branch can't land. It creates ITEM=$(find devices -name ${DEVICE}_defconfig | cut -d/ -f1,2)
cp -afv ${BUILDER_DIR}/${ITEM}/* ${FIRMWARE_DIR}— unquoted, so two matches copy two trees over each other. Since #120 the selector checks for this, and against this branch it fails: That is the Closing in favour of #133. Thanks for the pointer to the right driver package. |
Asked for in #61 and attempted in #70. Every SigmaStar FPV and APFPV defconfig already ships both drivers -- RTL8812AU_OPENIPC and RTL88X2EU_OPENIPC are selected together in all 18 of them -- because the two chips are sold under the same adapter names and a user cannot always tell which one is in the dongle. The Goke and HiSilicon FPV configs only ever got the 8812au, which is the whole of #61. This takes only that one line from #70. The rest of that PR creates devices/gk7205v200_fpv/ holding a second gk7205v200_fpv_defconfig, which cannot land: builder.sh locates a device with find devices -name ${DEVICE}_defconfig | cut -d/ -f1,2 and copies the result unquoted, so two matches make it copy two trees over each other. ci-matrix.py --self-test rejects it for exactly that: gk7205v200_fpv has 2 defconfigs; builder.sh would resolve it to more than one directory The 2848-line kernel config that PR also adds is a copy of the one already in devices/common/br-ext-chip-goke/board/gk7205v200/. gk7205v200_fpv is an 8M NOR target, so the second driver has to fit. This change narrows to that one device, so the build in this PR is the check.
#61 asks for 8812eu support on gk7205v200 FPV. #70 and the first version of this PR both tried to satisfy it by adding BR2_PACKAGE_RTL88X2EU_OPENIPC=y next to the existing BR2_PACKAGE_RTL8812AU_OPENIPC=y. CI built that and it does not fit: - uImage: [1988KB/2048KB] - rootfs.squashfs: [5504KB/5120KB] -- size exceeded by: 384KB headroom: kernel=59KB rootfs=-384KB Two heavy kernel Wi-Fi drivers do not go in one 8M image. The driver itself is fine -- 8812eu.ko links and installs -- it is purely flash budget, and there is no 384KB of slack to find in a 5MB rootfs that was already at its cap. The tree had already said so and I misread it. Every defconfig here that ships both drivers is 16M: all the ssc338q, ssc30kq, ssc377qe and ssc378qe fpv/apfpv/rubyfpv targets. Every 8M one ships 8812au alone: gk7205v200/v210/v300 fpv and venc, hi3516ev200_fpv, hi3516ev300_fpv. The "missing" 8812eu on the Goke configs was never an oversight; it is what 8M allows. So this is a separate build instead of a fatter one. gk7205v200_fpv_8812eu is gk7205v200_fpv with one line changed, the driver swapped rather than added. The existing gk7205v200_fpv is untouched, so nobody using an 8812au adapter is affected. Nothing else needs to move for it: - Registration is automatic; the defconfig is the registration. - The excludes list is resolved as ${SOC_MODEL}_${VARIANT}.list by firmware's rootfs_script.sh, and VARIANT stays "fpv", so it reuses gk7205v200_fpv.list. That list strips neither driver. - Release assets do not collide. master.yml keys on the underscore count: gk7205v200_fpv has COMMON=1 and uploads the canonical openipc.gk7205v200-nor-fpv.tgz, while this one has COMMON=2 and is renamed to gk7205v200_fpv_8812eu-nor.tgz. Same for its sizes.json. Only gk7205v200, which is what #61 asked for. The other four 8M FPV targets have the same constraint and could take the same treatment if anyone asks for it.
#61 asks for 8812eu support on gk7205v200 FPV. #70 and the first version of this PR both tried to satisfy it by adding BR2_PACKAGE_RTL88X2EU_OPENIPC=y next to the existing BR2_PACKAGE_RTL8812AU_OPENIPC=y. CI built that and it does not fit: - uImage: [1988KB/2048KB] - rootfs.squashfs: [5504KB/5120KB] -- size exceeded by: 384KB Two heavy kernel Wi-Fi drivers do not go in one 8M image. The driver itself is fine -- 8812eu.ko links and installs -- it is purely flash budget, and there is no 384KB of slack in a 5MB rootfs that was already at its cap. The tree had already said so. Every defconfig here that ships both drivers is 16M: the ssc338q, ssc30kq, ssc377qe and ssc378qe fpv/apfpv/rubyfpv targets. Every 8M one ships 8812au alone: gk7205v200/v210/v300 fpv and venc, hi3516ev200_fpv, hi3516ev300_fpv. The "missing" 8812eu on the Goke configs was never an oversight; it is what 8M allows. So this is a separate build. gk7205v200_fpv_8812eu is gk7205v200_fpv with one line changed, the driver swapped rather than added: -BR2_PACKAGE_RTL8812AU_OPENIPC=y +BR2_PACKAGE_RTL88X2EU_OPENIPC=y The existing gk7205v200_fpv is untouched, so nobody on an 8812au adapter is affected. It builds with room to spare -- rootfs 5024KB/5120KB, 96KB headroom. Nothing else had to move for it: - Registration is automatic; the defconfig is the registration. --self-test passes at 108 devices and the diff narrows to exactly this target, so its own build proved it. - Excludes resolve as ${OPENIPC_SOC_MODEL}_${OPENIPC_VARIANT}.list in firmware's rootfs_script.sh, and VARIANT stays "fpv", so it reuses gk7205v200_fpv.list. That list strips neither driver. - Release assets do not collide. master.yml keys on the underscore count: gk7205v200_fpv is COMMON=1 and uploads the canonical openipc.gk7205v200-nor-fpv.tgz, this one is COMMON=2 and is renamed to gk7205v200_fpv_8812eu-nor.tgz. Same for its sizes.json. Only gk7205v200, which is what #61 asked for. The other four 8M FPV targets have the same constraint and could take the same treatment if anyone asks. Closes #70.
This PR fixes an issue where 8812eu WiFi adapters (USB ID
0bda:a81a) were detected bylsusbbut not functional withiwconfigon gk7205v200 FPV firmware builds.Problem
Users reported that after updating to the latest gk7205v200-nor-fpv.tgz firmware, their 8812eu WiFi adapters stopped working. The adapters were detected by the system but the wireless interface was not available because the required driver module was missing from the firmware.
Root Cause
The gk7205v200 FPV configuration only included the
BR2_PACKAGE_RTL8812AU_OPENIPCdriver package, which supports 8812au adapters but not 8812eu variants. The 8812eu adapters require theBR2_PACKAGE_RTL88X2EU_OPENIPCdriver package.Solution
Added 8812eu driver support: Included
BR2_PACKAGE_RTL88X2EU_OPENIPC=yin the gk7205v200 FPV configuration to build the 8812eu driver module.Created device-specific directory: Added
devices/gk7205v200_fpv/with complete build structure so the build system can apply device-specific customizations.Added USB wireless auto-detection: Created
/etc/wireless/usbscript that automatically detects the connected adapter type and loads the appropriate driver:0bda:a81a→ loads8812eudriver0bda:8812,0bda:881a,0b05:17d2,2357:0101,2604:0012→ loads8812audriverFiles Changed
devices/common/br-ext-chip-goke/configs/gk7205v200_fpv_defconfig- Added 8812eu driver packagedevices/gk7205v200_fpv/- New device directory with USB wireless management scriptThe firmware will now automatically support both 8812au and 8812eu WiFi adapters without any user intervention.
Fixes #61.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.