Repository navigation
xm530: bring up the AltoBeam ATBM6032 USB WiFi chip - #2316
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.
|
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
|
Code review by qodo was updated up to the latest commit d8ca418 |
d8ca418 to
406f923
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 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.
|
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 |
openipc-ai
left a comment
There was a problem hiding this comment.
Thanks for this. #2853 is a second board with the same chip and the same PDN pin (Misecu XM-63-AI-50W: XM550, ATBM6032i 007a:8888, GPIO 96), so this bring-up matters beyond the anbiux. I ran it on the qemu-bench XM550 machine with the atbm-wifi dongle model (OpenIPC/qemu-bench#301 adds the USB host there). I rebased it by hand onto current master and built xm530_lite + atbm60xx from a clean output directory. Three things need changing before it can land.
1. The depmod hook is a no-op, so the driver still is not found. After a clean build, the S40network path with wlandev=atbm603x-xm530 wifipdn=96 gives:
$ lsmod
wifi_pdn 660 0
dwc_otg 167828 0
dwc_common_port_lib 21364 1 dwc_otg
$ ls /sys/class/net
eth0 lo
modprobe: module atbm603x_wifi_usb not found in modules.dep
The cause is not the vendor modules.dep. Buildroot's LINUX_RUN_DEPMOD runs only if lib/modules/$(LINUX_VERSION_PROBED) exists, and on these XM 3.10.103 kernels the probe reads 3.10.103++ inside a git checkout (CI's or yours), so it is skipped at finalize. A package-level $(LINUX_RUN_DEPMOD) expands to the same test -d and is skipped too. #2854 fixes the probe for every board (it also restores Wi-Fi on the V200 family, broken the same way in the nightly). Please drop the hook from this PR and rely on #2854. With #2854 plus the rest of this PR, the same twin run gives wlan0, wpa_state=COMPLETED, a DHCP lease and 3/3 pings.
2. cfg80211_xm711.ko is still module cfg80211. Renaming the file does not rename the module, and both copies export the same symbols, so depmod resolves some of them to each:
kernel/net/mac80211/mac80211.ko: kernel/net/wireless/cfg80211_xm711.ko xiongmai/compat.ko kernel/net/wireless/cfg80211.ko
extra/hal_apollo/atbm603x_wifi_usb.ko: kernel/net/wireless/cfg80211_xm711.ko xiongmai/compat.ko kernel/net/wireless/cfg80211.ko
It works now only because busybox modprobe happens to load the in-tree cfg80211.ko first; the second cfg80211 then fails as a duplicate, and compat is loaded for nothing. The tree already handles this case for mmz.ko (XIONGMAI_OSDRV_XM530_DROP_REPLACED): keep the vendor rewrite out of /lib/modules (e.g. /usr/lib/xiongmai/cfg80211.ko) and insmod it by path in wifi xm711. depmod then never sees it, and the in-tree module is the only cfg80211 modprobe knows.
3. Rebase, and make the profile report failure. It conflicts with master in general/overlay/etc/wireless/usb (the V200 profiles from #2712 now sit at the end) and in atbm60xx.mk. Master already pins 70d6dec035e6cbe701ec552b0e17d36b0d879c69, so that hunk can go. The profile ends in exit 0 whatever modprobe did, so S40network goes on to ifup a wlan0 that does not exist. The V200 profiles' xm_v200_wifi waits for wlan0 and returns whether it appeared. Doing the same here (and modprobe dwc_otg / wifi_pdn failing loudly) gives the WebUI something true to show.
The wifi_pdn value=96 / dwc_otg / atbm603x_wifi_usb order and the wifipdn env are right: the twin enumerates 007a:8888 with exactly that sequence.
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.
…led ATBM6032 bring-up Review of OpenIPC#2316: the depmod hook is gone, as OpenIPC#2854 restored depmod on the XM 3.10.103 kernels for every board. Renaming the vendor backport to cfg80211_xm711.ko left it module "cfg80211", so depmod split the shared symbols between the two copies; it now sits in /usr/lib/xiongmai like mmz.ko and `wifi xm711` loads it by path. The atbm603x-xm530 profile now fails when wifipdn is unset, a modprobe fails, or wlan0 never appears, so S40network falls back to the wired port.
683a548 to
4ff1c40
Compare
|
I've rebased this onto master and pushed the changes from my review as a second commit. @yatotoshka, your commit is unchanged apart from the conflict resolution.
Digital twin: qemu-bench modules.dep:
None of this has run on a real camera; all of it was tested on the twin only. |
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.
* xm530: add anbiux A8B-3MP (IPC-RB-BLK530AI, ATBM6032 USB WiFi) 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. * xm530_lite_anbiux-a8b-3mp: select xiongmai-opensdk, as firmware's xm530_lite does Firmware #2576 moved the sensor and ISP libraries into the source-built xiongmai-opensdk package; without it the image has no libsns_*/libispapp and majestic gets no video. --------- Co-authored-by: valov <valov.daniil@yandex.ru> Co-authored-by: AI Dev <ai@openipc.org>
openipc-ai
left a comment
There was a problem hiding this comment.
Approving at 4ff1c40. All three points from my review are addressed: the depmod hook is gone (#2854 covers it), the vendor cfg80211 is out of /lib/modules, and the profile now reports failure. 157 checks pass and no review threads are open.
@flyrouter, the order you asked for on 1 Oct holds: OpenIPC/builder#130 merged first (44ae64c). It builds against upstream firmware, and until this lands its camera comes up on the wired port. This PR then supplies the atbm603x-xm530 profile that device's wlandev names. #2853 is a second board with the same chip and the same PDN pin (XM550, ATBM6032i, GPIO 96), so the profile is shared rather than one-device.
Qodo's open finding asks for an atbm603x-xm530-usb selector, but the description never used that name. It and builder#130 both use atbm603x-xm530, which is what the case matches. The description is now updated to what the PR actually does.
Evidence is from the qemu-bench twin; none of it comes from a camera.
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.cfg80211backport out of/lib/modules, to/usr/lib/xiongmai/cfg80211.ko(asmmz.koalready is), and thewifi xm711helperinsmods it from there. It is still modulecfg80211; installed over (or beside) the in-treecfg80211(
CONFIG_CFG80211=m), depmod split the shared symbols between the twoand the kernel's
mac80211failed withUnknown symbol. atbm60xx andmac80211 now resolve to the in-tree module only.
wifipdnis unset, amodprobefails, orwlan0does not appear within 10 s, so
S40networkfalls back to the wired portinstead of
ifup-ing a missingwlan0.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-11-14)
original one.
depmodre-run is dropped: build: run the final depmod on kernels that see this checkout's git #2854 restored Buildroot's own depmod onthe XM 3.10.103 kernels for every board. The
ATBM60XX_VERSIONhunk isdropped: master already pins
70d6dec035e6cbe701ec552b0e17d36b0d879c69.against upstream firmware (rootfs 4040/5120 KB) and sets
wlandev=atbm603x-xm530,wifipdn=96.lease, ping), not yet on a camera:
xm530: bring up the AltoBeam ATBM6032 USB WiFi chip #2316 (comment)
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: the case in
/etc/wireless/usbonly runs whenwlandevis set toatbm603x-xm530. Every xm530 image now carries the vendorcfg80211at/usr/lib/xiongmai/cfg80211.koinstead of over the in-tree module, withwifi xm711loading it by path, so xm711 boards keep their stack andmac80211-based drivers (MT7601U on stock
xm530_lite) can load again.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.