xm530: bring up the AltoBeam ATBM6032 USB WiFi chip - #2316
yatotoshka wants to merge 1 commit into
Conversation
2048269 to
e0af350
Compare
PR Summary by QodoBring up ATBM6032 USB WiFi on XM530 boards
AI Description
Diagram
High-Level Assessment
Files changed (4)
|
Code Review by Qodo
1. The board profile cannot start WiFi
|
e0af350 to
e46f92f
Compare
The defconfig selects the atbm60xx driver (603x, USB) on top of xm530_lite. The customizer sets wlandev to the atbm603x-xm530-usb case in firmware's /etc/wireless/usb (dwc + wifi_pdn value=96 + modprobe, after which S40network applies the MAC and runs ifup) and points the upgrade url at this device's builder release. Depends on OpenIPC/firmware#2316: xiongmai-osdrv-xm530 must not install the vendor cfg80211 rewrite when atbm60xx is enabled, as the atbm driver is built against the in-tree cfg80211.
The defconfig selects the atbm60xx driver (603x, USB) on top of xm530_lite, and drops the MT7601U firmware this radio does not use. The customizer sets wlandev to the atbm603x-xm530-usb case in firmware's /etc/wireless/usb and wifipdn to the PDN gpio (after which S40network applies the MAC and runs ifup), and points the upgrade url at this device's builder release. Depends on OpenIPC/firmware#2316: it provides the bring-up case, the depmod pass that makes the driver stack resolvable by modprobe, and the cfg80211 coexistence (the vendor rewrite ships as cfg80211_xm711.ko, atbm60xx uses the in-tree module). xm530_lite_anbiux-a8b-3mp joins SMOKE_TARGETS: the vendor:xiongmai trait must be covered or ci-matrix.py's self-test refuses to select a build matrix.
| BR2_PACKAGE_ATBM60XX=y | ||
| BR2_PACKAGE_ATBM60XX_MODEL_603X=y | ||
| BR2_PACKAGE_ATBM60XX_INTERFACE_USB=y |
There was a problem hiding this comment.
1. atbm60xx path remains untested 📘 Rule violation ☼ Reliability
The PR enables the clean-built atbm60xx path globally, but the description explicitly says the demonstrated camera used a prebuilt blob and local init script and that an image built from this patch has not yet been flashed. The supplied before/after output therefore does not verify the behavior-changing path introduced here, contrary to the hardware-evidence requirement.
Agent Prompt
## Issue description
The newly enabled `atbm60xx` clean-build and startup path lacks hardware verification from an image produced by this PR.
## Issue Context
The existing evidence comes from a prebuilt driver blob and local init script, while Compliance ID 1 requires board output proving the behavior-changing implementation under review.
## Fix Focus Areas
- br-ext-chip-xiongmai/configs/xm530_lite_defconfig[70-72]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
|
Code review by qodo was updated up to the latest commit e46f92f |
|
Good afternoon |
|
By the way, I found a few patches in Builder that I haven't sent yet, and I'll try to upload them tomorrow or at the latest in the next few days. And maybe this will help us create a stable solution together. Thanks. |
MT7601U_OPENIPC_VERSION was HEAD, so the same tree produced different artifacts over time and the package could break with no change in this repo. Pin it to an immutable ref instead. 0ac46553f3190d788b01c15cbeaa14f2951c55a3 is the current tip of openipc/mt7601u and has been since 2023-08-11, so this is behaviourally a no-op today and purely protective against future drift. It is also the lineage runtime-verified on a Hi3518EV200: WPA2 join, RTSP streaming, 15-17 Mbps TX. The package is enabled in four defconfigs, so this is a live path rather than a dead one. Rescoped after review: the original PR also enabled BR2_PACKAGE_MT7601U_OPENIPC in hi3518ev200_ultimate_defconfig. Per review, firmware images ship WiFi utilities and not drivers, and per-device selection belongs in Builder, so that part was dropped on 2026-08-12 and only the pin remains. The changes-requested predated that rescope and was dismissed as stale, not overridden. Second instance of an unpinned package found this month; #2316 carries the same fix for atbm60xx. Worth a sweep for other VERSION = HEAD.
e46f92f to
d8ca418
Compare
| insmod /lib/modules/3.10.103+/xiongmai/wifi_pdn.ko value=96 | ||
| insmod /lib/modules/3.10.103+/xiongmai/compat.ko | ||
| insmod /lib/modules/3.10.103+/kernel/net/wireless/cfg80211.ko # grab from original firmware | ||
| insmod /lib/modules/3.10.103+/kernel/net/wireless/cfg80211_xm711.ko # vendor rewrite, kept off the in-tree cfg80211 path |
There was a problem hiding this comment.
1. Camera wifi can miss dependencies 📘 Rule violation ☼ Reliability
The modified wifi helper invokes insmod for cfg80211_xm711.ko instead of the tree's dependency-aware modprobe convention. When the xm711 branch runs, dependencies are not resolved from the regenerated module metadata, so an unmet prerequisite prevents that WiFi stack from loading.
Agent Prompt
## Issue description
The modified shipped WiFi helper loads `cfg80211_xm711.ko` directly with `insmod`, bypassing dependency-aware module loading.
## Issue Context
The package now regenerates module dependency metadata, so the renamed module should be loaded by module name through `modprobe`.
## Fix Focus Areas
- general/package/xiongmai-osdrv-xm530/files/script/wifi[10-10]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
|
Code review by qodo was updated up to the latest commit d8ca418 |
d8ca418 to
406f923
Compare
|
Code review by qodo was updated up to the latest commit 406f923 |
|
Code review by qodo was updated up to the latest commit 7893b9e |
Some XM530 boards (e.g. IPC-RB-BLK530AI-0235P-AB0) carry an AltoBeam ATBM6032 on USB (007a:8888) with a power-down gpio. Add the atbm603x-xm530 case to /etc/wireless/usb: load the DWC OTG controller, power the radio through the PDN gpio read from the per-board wifipdn env (set e.g. by a builder profile customizer), then modprobe the driver; S40network applies the MAC and runs ifup as for every other wlandev. Selecting the atbm60xx driver stays the device profile's business in OpenIPC/builder; the shared xm530_lite_defconfig is not touched. Supporting changes: - re-run depmod in xiongmai-osdrv-xm530's target-finalize: the vendor kernel ships a modules.dep that only lists its own modules, leaving dwc_otg, wifi_pdn and atbm603x invisible to modprobe (same pattern as hisilicon-opensdk); - install the vendor cfg80211 rewrite as cfg80211_xm711.ko instead of over the in-tree cfg80211, and load it from there in the 'wifi xm711' helper: atbm60xx (and the kernel-built mac80211) need the in-tree module at the canonical path, so both WiFi stacks stay usable in one image; - pin atbm60xx to a fixed revision instead of moving HEAD.
7893b9e to
683a548
Compare
The defconfig selects the atbm60xx driver (603x, USB) on top of xm530_lite, and drops the MT7601U firmware this radio does not use. The customizer sets wlandev to the atbm603x-xm530-usb case in firmware's /etc/wireless/usb and wifipdn to the PDN gpio (after which S40network applies the MAC and runs ifup), and points the upgrade url at this device's builder release. Depends on OpenIPC/firmware#2316: it provides the bring-up case, the depmod pass that makes the driver stack resolvable by modprobe, and the cfg80211 coexistence (the vendor rewrite ships as cfg80211_xm711.ko, atbm60xx uses the in-tree module). xm530_lite_anbiux-a8b-3mp joins SMOKE_TARGETS: the vendor:xiongmai trait must be covered or ci-matrix.py's self-test refuses to select a build matrix.
The defconfig selects the atbm60xx driver (603x, USB) on top of xm530_lite, and drops the MT7601U firmware this radio does not use. The customizer sets wlandev to the atbm603x-xm530-usb case in firmware's /etc/wireless/usb and wifipdn to the PDN gpio (after which S40network applies the MAC and runs ifup), and points the upgrade url at this device's builder release. Depends on OpenIPC/firmware#2316: it provides the bring-up case, the depmod pass that makes the driver stack resolvable by modprobe, and the cfg80211 coexistence (the vendor rewrite ships as cfg80211_xm711.ko, atbm60xx uses the in-tree module). xm530_lite_anbiux-a8b-3mp joins SMOKE_TARGETS: the vendor:xiongmai trait must be covered or ci-matrix.py's self-test refuses to select a build matrix.
The defconfig selects the atbm60xx driver (603x, USB) on top of xm530_lite, and drops the MT7601U firmware this radio does not use. The customizer sets wlandev to the atbm603x-xm530 case in firmware's /etc/wireless/usb and wifipdn to the PDN gpio the case reads at run time (after which S40network applies the MAC and runs ifup), and points the upgrade url at this device's builder release. Depends on OpenIPC/firmware#2316: it provides the bring-up case, the depmod pass that makes the driver stack resolvable by modprobe, and the cfg80211 coexistence (the vendor rewrite ships as cfg80211_xm711.ko, atbm603x uses the in-tree module). xm530_lite_anbiux-a8b-3mp joins SMOKE_TARGETS: the vendor:xiongmai trait must be covered or ci-matrix.py's self-test refuses to select a build matrix.
| # does the kernel-built mac80211. `wifi xm711` loads the renamed copy. | ||
| $(INSTALL) -m 755 -d $(TARGET_DIR)/lib/modules/3.10.103+/kernel/net/wireless | ||
| $(INSTALL) -m 644 -t $(TARGET_DIR)/lib/modules/3.10.103+/kernel/net/wireless $(XIONGMAI_OSDRV_XM530_PKGDIR)/files/kmod/rewrite/cfg80211.ko | ||
| $(INSTALL) -m 644 $(XIONGMAI_OSDRV_XM530_PKGDIR)/files/kmod/rewrite/cfg80211.ko $(TARGET_DIR)/lib/modules/3.10.103+/kernel/net/wireless/cfg80211_xm711.ko |
There was a problem hiding this comment.
11. Switching radios prevents xm711 wifi 🐞 Bug ≡ Correctness
The install rule renames the vendor cfg80211.ko file without changing its embedded module identity, and wifi xm711 tries to load it as a second cfg80211 module. If the in-tree cfg80211 module was loaded for another radio first, the vendor module cannot load while it remains active, so the subsequent XM711 load cannot work.
Agent Prompt
## Issue description
Renaming the vendor cfg80211 file does not make it loadable alongside the in-tree cfg80211 module.
## Fix Focus Areas
- general/package/xiongmai-osdrv-xm530/xiongmai-osdrv-xm530.mk[24-29]
- general/package/xiongmai-osdrv-xm530/files/script/wifi[5-12]
## Recommended Fix
Make the XM711 loading path ensure the in-tree wireless driver stack and cfg80211 are unloaded before loading the vendor module. If switching without a reboot is unsupported, enforce and document that limitation rather than treating the renamed file as an independent module.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
|
Code review by qodo was updated up to the latest commit 683a548 |
The defconfig selects the atbm60xx driver (603x, USB) on top of xm530_lite, and drops the MT7601U firmware this radio does not use. The customizer sets wlandev to the atbm603x-xm530 case in firmware's /etc/wireless/usb and wifipdn to the PDN gpio the case reads at run time (after which S40network applies the MAC and runs ifup), and points the upgrade url at this device's builder release. Depends on OpenIPC/firmware#2316: it provides the bring-up case, the depmod pass that makes the driver stack resolvable by modprobe, and the cfg80211 coexistence (the vendor rewrite ships as cfg80211_xm711.ko, atbm60xx uses the in-tree module). Until that PR merges, master.yml builds this target against the branch carrying it (OPENIPC_FW_REPO/REV, matrix-conditional, empty for every other target) so the published archive is functional; remove the pin once firmware#2316 lands. xm530_lite_anbiux-a8b-3mp joins SMOKE_TARGETS: the vendor:xiongmai trait must be covered or ci-matrix.py's self-test refuses to select a build matrix.
|
Code review by qodo was updated up to the latest commit 683a548 |
The defconfig selects the atbm60xx driver (603x, USB) on top of xm530_lite, and drops the MT7601U firmware this radio does not use. The customizer sets wlandev to the atbm603x-xm530 case in firmware's /etc/wireless/usb and wifipdn to the PDN gpio the case reads at run time (after which S40network applies the MAC and runs ifup), and points the upgrade url at this device's builder release. Depends on OpenIPC/firmware#2316: it provides the bring-up case, the depmod pass that makes the driver stack resolvable by modprobe, and the cfg80211 coexistence (the vendor rewrite ships as cfg80211_xm711.ko, atbm60xx uses the in-tree module). This profile stays a draft until firmware#2316 merges; once it lands, the regular CI builds a functional image for this device from upstream firmware. xm530_lite_anbiux-a8b-3mp joins SMOKE_TARGETS: the vendor:xiongmai trait must be covered or ci-matrix.py's self-test refuses to select a build matrix.
|
Code review by qodo was updated up to the latest commit 683a548 |
|
Good afternoon |
Problem
Some XM530 boards (e.g. IPC-RB-BLK530AI-0235P-AB0 V1.03) carry an AltoBeam
ATBM6032 USB WiFi (007a:8888) with a power-down gpio. The stock xm530 image has
neither the driver nor a
/etc/wireless/usbcase for it, so WiFi is not usableon these boards.
What this change does
atbm603x-xm530case togeneral/overlay/etc/wireless/usb(thesame table and shape as the existing
atbm603x-t31-zte-k540case):modprobe dwc_otg, thenmodprobe wifi_pdn value="$pdn"where the PDNgpio is read from the per-board
wifipdnenv (set e.g. by a builderprofile's customizer), then
modprobe atbm603x_wifi_usb;S40networkthen applies the MAC and runs
ifup wlan0exactly as for every otherwlandev.depmodinxiongmai-osdrv-xm530's target-finalize: the vendorkernel ships a
modules.depthat lists only its own modules, leavingdwc_otg,wifi_pdnand the atbm module invisible tomodprobe(samepattern as hisilicon-opensdk).
cfg80211rewrite ascfg80211_xm711.koinstead ofover the in-tree
cfg80211(CONFIG_CFG80211=m) at the canonical modulepath, and loads it from there in the
wifi xm711helper. atbm60xx — andthe kernel-built mac80211 — build against the in-tree module, so both
WiFi stacks stay usable in one image.
ATBM60XX_VERSIONto a full 40-character SHA instead of movingHEAD.xm530_lite_defconfig: enabling atbm60xx is thedevice profile's business (companion profile in
OpenIPC/builder#130,
xm530_lite_anbiux-a8b-3mp), so stock xm530 images are unchanged.Status (2026-09-30)
e484a42d); single commit.xm530_lite_defconfigis untouched — selecting atbm60xx moved to the builder device profile
(Added support for bridge and vlan initialization to /etc/network/interfaces #130); the bring-up case moved from a package post-build hook into the
shared
wireless/usbtable, next to the existing atbm cases, with thePDN gpio read from the
wifipdnenv rather than hardcoded."awaiting approval from a maintainer" state, so no compile/size
verification has run yet in OpenIPC CI.
builder#130's
build-onewithfirmware_repo=yatotoshka/firmware,firmware_ref=xiongmai-atbm60xx-wifionce CI is unblocked.Hardware tested on
XM530AI (marking 30WX1), board IPC-RB-BLK530AI-0235P-AB0 V1.03, SmartSens
SC3335, AltoBeam ATBM6032 USB WiFi (007a:8888), PDN on gpio 96
Evidence
The chip, the PDN gpio and the exact load order used by the new case
(dwc_otg → wifi_pdn → atbm603x) are proven on this hardware — the camera is
currently associated:
Before (stock image, no driver for the chip at all):
After (radio driven, wlan0 up):
The Web UI is reachable both over the wlan0 address (192.168.1.243) and the
Ethernet address (192.168.1.242).
Honest status: the running camera currently loads the driver from a prebuilt
blob (built from the same atbm_60xx revision this PR pins) plus a local init
script, not from the clean-build path of this patch (compiled
atbm60xx+wlandev+S40network+ thewireless/usbcase). That path is stillunverified on-device; CI confirms atbm60xx compiles against the xm530 kernel,
and the size report says whether the 5M rootfs still fits (the image now also
carries the #2315 SD module). To close the gap: build an image from this branch
— possible today via builder#130's
build-onewithfirmware_repopointed atthis fork and
firmware_ref=xiongmai-atbm60xx-wifi, or right after this PR ismerged — flash it and verify.
Notes: stock xm530 images are unchanged by this PR — the case in
/etc/wireless/usbonly runs whenwlandevis set toatbm603x-xm530, andthe cfg80211 rename leaves every xm530 image carrying the vendor rewrite as
cfg80211_xm711.koalongside the in-treecfg80211(previously itoverwrote it), with the
wifi xm711helper loading the renamed copy, soxm711/lynx boards keep working at the cost of one extra module file. The
only xm530 profile proposed in OpenIPC/builder today ([builder#130]) is the
ATBM board; no xm711-equipped xm530 is registered or known to be deployed.
The rename, the depmod pass and the SHA pin each stand alone and can be
split out if reviewers prefer.
Scope
general/package/all-patches/linux/(those go to OpenIPC/linux)general/overlay/or in a sharedload_<vendor>script hardcodes a value specific to my boardLD_PRELOAD, and no binaries that cannot be rebuilt from sourceNote on the overlay checkbox: the new
wireless/usbcase is purely additiveand matches the file's established per-board pattern (driver, SoC, board
bring-up — like the ~40 existing cases); it changes no existing board's
behaviour and only runs when
wlandevis set toatbm603x-xm530. The PDNgpio is read from the per-board
wifipdnenv at run time — set by the builderprofile's customizer or the user, not hardcoded in the shared script.