Skip to content

gk7201v200: the ATBM6012B-X Wi-Fi driver, for the G3-WQ-G - #2729

Open
widgetii wants to merge 2 commits into
masterfrom
gk7201v200-atbm6012b
Open

widgetii wants to merge 2 commits into
masterfrom
gk7201v200-atbm6012b

Conversation

@widgetii

@widgetii widgetii commented Oct 29, 2026 •

Copy link
Copy Markdown
Member

Problem

The gk7201v200 image ships no driver for the Wi-Fi on Xiongmai's G3-WQ-G board (IPC_GK7201V200_G3-WQ-G_S38_WIFI, DEVID 000929QB, from #1896). That board is Wi-Fi only, so flashing the current image leaves it with no network.

Its stock image (from the OpenIPC/xmupdates archive, id 2334) names the chip in InstallDesc ("WifiDriverType": "atbm6012b") and loads atbm6012bx.ko, which binds usb:v007Ap888B. atbm603x-comb-openipc (#2712) covers the ATBM6012B-X and binds the same ID.

Two commits:

  1. atbm603x-comb-openipc: bump to bd7644e (atbm603x_comb: build under GNU make 4.4 on 4.9 kernels atbm_60xx#7). Under GNU make 4.4 (ubuntu-latest), atbm603x_comb/Makefile's bare exports hand every kbuild variable to $(shell), and the 4.9.37 gk7201v200 kernel stops mid-parse. xm530v200 and xm535d1/w1 build on 3.10 and never hit it. atbm_60xx#7 exports the driver's variables by name. With SOURCE_DATE_EPOCH and ATBM_BUILD_TIME pinned, the .ko is byte-identical under make 4.3 before and after, and under make 4.4.1 after.
  2. gk7201v200_lite: enable the driver. It does not fit the 5 MiB fixed rootfs slot, so since build: a fixed-slot package that no longer fits is skipped, not fatal #2666 the fixed-slot package is skipped and the board ships only the split package from gk7201v200, hi3516cv200 family: the split NOR image #2668.

Hardware tested on

Not run on a camera. I have no G3-WQ-G, and nobody has booted this image with this driver on a gk7201v200. This is a draft until it has run on one: boot from the split image, load the module, see the 007a:888b dongle and associate. Evidence below is build-only.

Two side effects to flag for review:

  • gk7201v200 now ships only the -split package. Every gk7201v200 owner upgrades through the split layout.
  • OpenIPC/coupler used to build from fixed slots only, so its G3H_S38 package would have stopped building once openipc.gk7201v200-nor-lite.tgz was no longer published. XM: take the split firmware.bin when a board publishes no fixed-slot package coupler#56 (merged) now takes the split firmware.bin when the fixed-slot package is absent.

Evidence

Before (gk7201v200_lite with the driver enabled, at the old pin 543b02d, host make 4.4.1):

scripts/Makefile.lib:402: *** prerequisites cannot be defined in recipes.  Stop.
make[3]: *** [scripts/Makefile.build:544: $(O)/build/atbm603x-comb-openipc-543b02dc8871a1bc4df90cd56e07305b95c3ec9c/atbm603x_comb/hal_apollo] Error 2
make: *** [Makefile:46: build] Error 2

Nightly 2026-10-28 without the driver: firmware.bin 7012352 bytes (6848 KB); rootfs 4968/5120 KB.

After (this branch, on a5d9fcef1, a clean local build from an empty download cache, make 4.4.1):

firmware.bin: uImage 1837K + squashfs 5344K = 7232K
::warning::gk7201v200 lite: rootfs.squashfs 5344KB/5120KB outgrew the fixed slot; shipping the split package only
- firmware.bin: [7232KB/7616KB]
- uImage: [1837KB/2048KB read by the bootloader]

(An earlier version of this description gave uImage 1835K + squashfs 5340K. That build reused a stale cached goke-gk7205v500.tar.gz with no drivers/mtd/mtdsplit, from before OpenIPC/linux#140. The kernel above has CONFIG_MTD_SPLIT_FIRMWARE=y and CONFIG_MTD_ROOTFS_ROOT_DEV=y.)

$ grep 007A target/lib/modules/4.9.37/modules.alias
alias usb:v007Ap8888d*dc*dsc*dp*ic*isc*ip*in* atbm603x_comb_wifi_usb
alias usb:v007Ap888Bd*dc*dsc*dp*ic*isc*ip*in* atbm603x_comb_wifi_usb

Boot in qemu-hisilicon, no camera. This build's firmware.bin went through OpenIPC/coupler's _xm2oipc.sh (OpenIPC/coupler#56, with HARDWARE/DEVID set to the G3-WQ-G's for the test). Its images were then applied over the stock 000929QB flash at their header addresses, as the XM upgrader's "Burn" writes them, and the result booted on -M gk7201v200 through the stock XM U-Boot:

sfc: split NOR layout, device tree partitions
0x000000760000-0x000000800000 : "rootfs_data"
VFS: root=/dev/mtdblock3 ignored, the flash names its own root
VFS: Mounted root (squashfs filesystem) readonly on device 31:4.
openipc-gk7201v200 login:

The overlay's jffs2 was written at 0x760000. QEMU has no AltoBeam dongle on this machine, so the driver was not loaded, and the stock upgrader itself is not emulated.

ci-matrix.py --self-test ok. --stdin selects gk7201v200_lite, xm530v200_lite, xm535d1_lite, xm535w1_lite. test_kconfig_graph.py passes.

Scope

  • No kernel patches under general/package/all-patches/linux/ (those go to OpenIPC/linux)
  • No files specific to a single retail camera model (those go to OpenIPC/builder)
  • No probing or bring-up tooling (that goes to OpenIPC/ipctool)
  • Nothing under general/overlay/ or in a shared load_<vendor> script hardcodes a value specific to my board
  • Package sources come from an OpenIPC repository, and any version bump keeps at least the specificity of the pin it replaces (a new package should pin a full 40-character SHA)
  • No LD_PRELOAD, and no binaries that cannot be rebuilt from source
  • New code is selected by a defconfig, so CI actually builds it

….4 on 4.9 kernels

OpenIPC/atbm_60xx#7: atbm603x_comb/Makefile's bare exports handed every
kbuild variable to make 4.4's $(shell)s, and a 4.9 kernel stopped with
"Makefile.lib:402: *** prerequisites cannot be defined in recipes".
xm530v200 and xm535d1/w1 build on 3.10 and never hit it; gk7201v200 does.
The module is byte-identical to 543b02d's under make 4.3.
The stock image for the IPC_GK7201V200_G3-WQ-G_S38_WIFI board (DEVID
000929QB) loads atbm6012bx.ko, which binds usb 007a:888b; its InstallDesc
names WifiDriverType atbm6012b. atbm603x-comb-openipc (#2712) binds the
same ID. Without it the board, which is Wi-Fi only, has no network on
OpenIPC.

The module is about 360 KB in the squashfs. The split firmware.bin was
6848 of 7616 KB on the 2026-10-28 nightly, so it fits there; the
fixed-slot rootfs, 4968 of 5120 KB, does not, and since #2666 that
package is skipped rather than failing the build.
@qodo-free-for-open-source-projects

Copy link
Copy Markdown

PR Summary by Qodo

gk7201v200: enable ATBM6012B-X Wi-Fi driver for G3-WQ-G

✨ Enhancement 🕐 Less than 10 minutes

Grey Divider

AI Description

• Enables the AltoBeam ATBM6012B-X USB Wi-Fi driver (usb:v007Ap888B) in gk7201v200_lite, so the
 Wi-Fi-only G3-WQ-G board gets a network.
• Bumps atbm603x-comb-openipc to bd7644e, which builds under GNU make 4.4 on 4.9 kernels.
• The rootfs outgrows the 5 MiB fixed slot, so gk7201v200 ships only the split package.
Diagram

graph TD
 A["gk7201v200_lite defconfig"] --> B["atbm603x-comb-openipc.mk"] --> C["OpenIPC/atbm_60xx bd7644e"] --> D["atbm6012bx.ko"] --> E["Split firmware.bin"]
Loading
High-Level Assessment

Enabling the existing driver package and bumping its pin is the minimal approach. A fixed-slot alternative would need a larger rootfs partition or a trimmed rootfs. That would break existing upgrade layouts.

Files changed (2) +4 / -1

Enhancement (1) +3 / -0
gk7201v200_lite_defconfigEnable ATBM603X Wi-Fi driver in gk7201v200_lite +3/-0

Enable ATBM603X Wi-Fi driver in gk7201v200_lite

• Adds BR2_PACKAGE_ATBM603X_COMB_OPENIPC=y with a comment. The rootfs no longer fits the fixed slot, so only the split image ships.

br-ext-chip-goke/configs/gk7201v200_lite_defconfig

Other (1) +1 / -1
atbm603x-comb-openipc.mkBump atbm603x-comb-openipc to bd7644e +1/-1

Bump atbm603x-comb-openipc to bd7644e

• Moves the pinned SHA from 543b02d to bd7644e. The new revision exports the driver's variables by name, so it builds under GNU make 4.4 on 4.9 kernels.

general/package/atbm603x-comb-openipc/atbm603x-comb-openipc.mk

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (1) 📘 Rule violations (1) 📎 Requirement gaps (0) 📜 Skill insights (0)

Grey Divider


Action required

1. The Wi-Fi image lacks board proof 📘 Rule violation ☼ Reliability
Description
gk7201v200_lite_defconfig now selects BR2_PACKAGE_ATBM603X_COMB_OPENIPC, changing the shipped
firmware for the G3-WQ-G Wi-Fi board. The PR states that no camera test was run and that the module
was not loaded, so the altered image's boot, USB detection and association remain unverified.
Code

br-ext-chip-goke/configs/gk7201v200_lite_defconfig[R71-73]

+# Wi-Fi: the G3-WQ-G's AltoBeam ATBM6012B-X, USB. Fits the split image only
+# (#2668); the fixed-slot package outgrows its 5 MiB rootfs and is skipped.
+BR2_PACKAGE_ATBM603X_COMB_OPENIPC=y
Evidence
The changed defconfig enables the driver in an image that can alter camera behavior, while the PR
description explicitly says the image was not run on a camera and the driver was not loaded. This
fails the checklist requirement for hardware evidence when firmware behavior changes.

Rule 3: Hardware evidence is present and honest
br-ext-chip-goke/configs/gk7201v200_lite_defconfig[71-73]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

Issue description
The defconfig enables a Wi-Fi driver that changes the firmware image, but the PR explicitly states that no camera test was run and the module was not loaded. The required hardware evidence for boot, USB detection, and Wi-Fi association is therefore missing.

Fix Focus Areas
- br-ext-chip-goke/configs/gk7201v200_lite_defconfig[71-73]

Recommended Fix
Test the split image on the affected G3-WQ-G camera, load the Wi-Fi module, verify detection of USB device `007a:888b`, and verify association; then add the resulting boot and runtime evidence to the PR description.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


2. The Wi-Fi dongle cannot enumerate 🐞 Bug ≡ Correctness
Description
The new defconfig installs an out-of-tree USB Wi-Fi module while the gk7201v200 kernel leaves
CONFIG_USB_DWC3_HOST disabled. The 007a:888b adapter therefore has no enabled USB host path to
enumerate it, so loading the module cannot make Wi-Fi available on the target board.
Code

br-ext-chip-goke/configs/gk7201v200_lite_defconfig[73]

+BR2_PACKAGE_ATBM603X_COMB_OPENIPC=y
Evidence
The changed defconfig adds the ATBM package, whose build metadata explicitly creates an out-of-tree
USB Wi-Fi module. The board kernel configuration simultaneously disables CONFIG_USB_DWC3_HOST; the
existing wireless helper only attempts to load the module and cannot provide the missing USB host
controller support.

br-ext-chip-goke/configs/gk7201v200_lite_defconfig[71-73]
general/package/atbm603x-comb-openipc/atbm603x-comb-openipc.mk[15-20]
br-ext-chip-goke/board/gk7205v500/gk7201v200.generic.config[1812-1815]
general/overlay/etc/wireless/usb[44-47]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The gk7201v200 defconfig enables a USB Wi-Fi driver, but its kernel configuration disables the DWC3 host role required for a USB adapter to enumerate.

## Fix Focus Areas
- br-ext-chip-goke/configs/gk7201v200_lite_defconfig[71-73]
- br-ext-chip-goke/board/gk7205v500/gk7201v200.generic.config[1812-1815]
- general/package/atbm603x-comb-openipc/atbm603x-comb-openipc.mk[15-20]

## Recommended Fix
Enable and verify the appropriate USB host/DWC3 host configuration for gk7201v200, or do not select this USB driver unless the hardware uses a different enabled host controller. Build the kernel configuration and verify that the target enumerates USB device `007a:888b` before shipping the package.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Context sources
✅ Tickets: 🎫 gk7201v300
Review mode: Auto: 🚀 Fast: Localized driver enablement and pinned source update with contained board impact.

Grey Divider

Tip of the day
💡 Did you know, you can route each severity your way: inline, summary, both, or drop

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

Comment on lines +71 to +73
# Wi-Fi: the G3-WQ-G's AltoBeam ATBM6012B-X, USB. Fits the split image only
# (#2668); the fixed-slot package outgrows its 5 MiB rootfs and is skipped.
BR2_PACKAGE_ATBM603X_COMB_OPENIPC=y

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action required

1. The wi-fi image lacks board proof 📘 Rule violation ☼ Reliability

gk7201v200_lite_defconfig now selects BR2_PACKAGE_ATBM603X_COMB_OPENIPC, changing the shipped
firmware for the G3-WQ-G Wi-Fi board. The PR states that no camera test was run and that the module
was not loaded, so the altered image's boot, USB detection and association remain unverified.
Agent Prompt
Issue description
The defconfig enables a Wi-Fi driver that changes the firmware image, but the PR explicitly states that no camera test was run and the module was not loaded. The required hardware evidence for boot, USB detection, and Wi-Fi association is therefore missing.

Fix Focus Areas
- br-ext-chip-goke/configs/gk7201v200_lite_defconfig[71-73]

Recommended Fix
Test the split image on the affected G3-WQ-G camera, load the Wi-Fi module, verify detection of USB device `007a:888b`, and verify association; then add the resulting boot and runtime evidence to the PR description.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, and the description says it too: this has not run on a camera. The owner of a G3-WQ-G from #1896 is going to test it over UART. The checks are the split image booting, 007a:888b enumerating, atbm603x_comb_wifi_usb binding, and wlan0 associating and getting a lease. Their output goes in the description before this merges, so I'm leaving this thread open until then.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant