Repository navigation
build: run the final depmod on kernels that see this checkout's git - #2854
Merged
Merged
Conversation
linux.mk's target-finalize depmod runs only if lib/modules/$(LINUX_VERSION_PROBED) exists, and the probe runs `make kernelrelease` without the GIT_DIR=. every build step gets. The XM 3.10.103 kernels' setlocalversion has no `git rev-parse --show-cdup` guard, so inside the firmware checkout it appends "+" (3.10.103++ against modules built as 3.10.103+), the test fails silently, and modules.dep is whichever per-package copy rsync laid down last. On the xm530v200, xm533 and xm535* nightlies that copy lists none of the xiongmai/ modules nor the ATBM driver, so every V200 Wi-Fi profile and load_xiongmai's own `modprobe dwc2` / `modprobe xm_usb0` fail with "not found in modules.dep" (#2853). An empty .scmversion is what setlocalversion reads instead of asking git, so the probe agrees with the build. The kernel's own release string is unchanged: its build already ran with GIT_DIR=. and found no git.
openipc-ai
requested review from
cronyx,
flyrouter and
viktorxda
as code owners
November 14, 2026 10:47
PR Summary by QodoRestore final depmod for kernels affected by checkout Git metadata
AI Description
Diagram
High-Level Assessment
Files changed (1)
|
This was referenced Nov 14, 2026
Code Review by Qodo🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)
Great, no issues found!Qodo reviewed your code and found no material issues that require reviewTip of the day💡 Did you know, you can ask Qodo to dismiss a finding you disagree with, with your reason on record |
This was referenced Nov 14, 2026
Open
openipc-ai
added a commit
to OpenIPC/qemu-bench
that referenced
this pull request
Nov 14, 2026
* xiongmai: USB Wi-Fi on the releases, through S40network, in CI test-xm-usb-wifi.sh boots the xm530v200 and xm530 release bundles with the atbm-wifi dongle and an environment that names the Wi-Fi profile and a WPA2-PSK network, and lets S40network bring it up: on xm530v200 wlan0 must join, lease and ping; on xm530 (-M xm550, no driver in that release) dwc_otg and wifi_pdn must enumerate the dongle. The job wifi-xiongmai runs both. It is the regression test for OpenIPC/firmware#2854. On the 2026-11-13 xm530v200 nightly it fails as the camera did -- modprobe: module dwc2 / xm_usb0 / atbm603x_comb_wifi_usb not found in modules.dep -- and on a build with that fix it joins, leases 10.0.2.15 and pings 3/3. * test-xm-usb-wifi: survive a clean log, check wifi_pdn, keep QEMU off stdin The modules.dep diagnostic is a grep with no match on a good image, and under errexit / pipefail that ended the script before its checks; the runs so far passed only because every release also prints exfat's line. The xm530 row now requires wifi_pdn to load as well as dwc_otg: QEMU plugs the dongle in whatever the pad does. And the backgrounded QEMU reads /dev/null.
openipc-ai
added a commit
to yatotoshka/firmware
that referenced
this pull request
Nov 14, 2026
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
On the Xiongmai V200 boards (xm530v200, xm533, xm535d1, xm535d2, xm535w1), USB Wi-Fi never comes up on the shipped image.
modules.deplists none of thexiongmai/vendor modules and none of the ATBM driver, so everyxm_v200_wifiarm in/etc/wireless/usb, andload_xiongmai's ownmodprobe dwc2/modprobe xm_usb0, fail withnot found in modules.dep. The same gap is why the first-gen XM530 ATBM6032 bring-up in #2316 cannot load its driver (#2853).Cause: linux.mk's target-finalize
LINUX_RUN_DEPMODruns only iflib/modules/$(LINUX_VERSION_PROBED)exists. That probe runsmake kernelreleasewithout theGIT_DIR=.that every package step gets. The XM 3.10.103 kernels'scripts/setlocalversionhas nogit rev-parse --show-cdupguard, so it finds this firmware checkout above the build directory and appends+:test -d lib/modules/3.10.103++fails silently and depmod never runs. With per-package directories, the finalmodules.depis then whichever package's copy rsync laid down last. That copy is complete on xm530 (xiongmai-opensdk's, which depends on everything) and nearly empty on the V200 family. A package-level$(LINUX_RUN_DEPMOD)hook is skipped by the same test.The fix is an empty
.scmversionin the kernel tree, whichsetlocalversionreads instead of asking git, so the probe matches the build. The kernel's own release string does not change: its build already ran withGIT_DIR=.and found no git. Kernels that have the guard (4.x and later here), or that ignore the file (6.3 and later), are unaffected.Hardware tested on
Not run on a camera. Tested on the qemu-bench XM530V200 and XM550 machines with the
atbm-wifiUSB dongle model (007a:8888). CI will build the full matrix, sincegeneral/external.mkreaches every board. A V200 board with ATBM Wi-Fi is still needed to confirm on hardware.Evidence
Scan of every
latestrelease asset for.kofiles missing frommodules.dep(186 assets, 2026-11-13 nightly). The V200 family:All 52 HiSilicon/Goke/SigmaStar split images index every module.
hi3516av200neo (3.18.20) is also missing all 32hisilicon/modules. That may be the same mechanism, but this PR has not been built or checked on that board.Before, the xm530v200 nightly (
master+a0f341e) on the twin, withwlandev=atbm603x-xm530v200-x2-wq2:After, xm530v200_lite built with this change, same twin and env, Wi-Fi brought up by S40network at boot:
The same fix on xm530_lite with #2316's ATBM6032 arm (twin
xm550,wlandev=atbm603x-xm530 wifipdn=96) gives wlan0,wpa_state=COMPLETED, a DHCP lease and 3/3 pings. Without this fix, that build has no wlan0.kernel.releasestays3.10.103+, and the uImage differs only in the header timestamp.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 sourcegeneral/external.mkand runs for every board)