Summary
load_hisilicon on hi3516av100 has stale rmmod targets in remove_detect() whose names don't match what the firmware actually loads. The errors come out during sensor-detect / boot:
rmmod: can't unload module 'sensor_spi': No such file or directory
rmmod: can't unload module 'sensor_i2c': No such file or directory
rmmod: can't unload module 'hi3516a_isp': Resource temporarily unavailable
rmmod: can't unload module 'hi3516a_base': Resource temporarily unavailable
rmmod: can't unload module 'hi_media': No such file or directory
rmmod: can't unload module 'mmz': No such file or directory
rmmod: can't unload module 'sys_config': No such file or directory
No such file or directory here means the module isn't in /sys/module/<name> — not that the .ko file is missing. The firmware ships .kos with these exact filenames (sensor_spi.ko, sensor_i2c.ko, hi_media.ko, mmz.ko, sys_config.ko — verified in /lib/modules/4.9.37/hisilicon/), but their internal KBUILD_MODNAME is renamed (Strategy B objcopy / open_* wrappers per openhisilicon/CLAUDE.md), so /sys/module/sensor_spi doesn't exist. rmmod looks up by internal name and fails.
This was always there; it just got exposed by post-#2059 firmware where load_hisilicon no longer exits at the os_mem= guard before reaching remove_detect().
Where
general/package/hisilicon-osdrv-hi3516av100/files/script/load_hisilicon, the remove_detect() function (~line 80):
remove_detect() {
rmmod -w sensor_spi
rmmod -w sensor_i2c
rmmod -w hi3516a_isp
rmmod -w hi3516a_sys
rmmod -w hi3516a_base
rmmod -w hi_media
rmmod -w mmz
rmmod -w sys_config
}
Suggested fix
Audit what insert_detect() actually loads, run the firmware once and cat /proc/modules, and update remove_detect() to use those internal names (likely open_sensor_spi, open_sensor_i2c, open_isp, open_base, open_sys, open_osal etc., similar to what other families' remove_detect already does post-rename).
CI hardcoding to undo once fixed
OpenIPC/openhisilicon/.github/workflows/build.yml qemu-boot matrix has:
- machine: hi3516av100
firmware: hi3516av100
mem: 256M
allow-failure: true # <-- remove this line
append: "console=ttyAMA0,115200 mem=32M root=/dev/ram0 rootfstype=squashfs"
After this issue is fixed and a new latest firmware release is published:
- Drop the
allow-failure: true line from the av100 matrix entry.
- Optionally add
min_modules: N to the same row to gate on the lsmod count assertion (pick N from a healthy boot's ===CI:HISI_MOD_COUNT===N=== marker — likely ~25-28 for av100 with all hi3516a_*.ko plus mmz/sensor_*/sys_config loaded).
- Drop the explanatory comment block above the av100 row.
Removing allow-failure will make the row strict again, and any future regression of remove_detect (or the loaded module names drifting from remove_detect's targets) will fail CI immediately rather than be silently warned about.
Refs
Summary
load_hisiliconon hi3516av100 has stalermmodtargets inremove_detect()whose names don't match what the firmware actually loads. The errors come out during sensor-detect / boot:No such file or directoryhere means the module isn't in/sys/module/<name>— not that the.kofile is missing. The firmware ships.kos with these exact filenames (sensor_spi.ko,sensor_i2c.ko,hi_media.ko,mmz.ko,sys_config.ko— verified in/lib/modules/4.9.37/hisilicon/), but their internalKBUILD_MODNAMEis renamed (Strategy B objcopy /open_*wrappers peropenhisilicon/CLAUDE.md), so/sys/module/sensor_spidoesn't exist.rmmodlooks up by internal name and fails.This was always there; it just got exposed by post-#2059 firmware where
load_hisiliconno longer exits at theos_mem=guard before reachingremove_detect().Where
general/package/hisilicon-osdrv-hi3516av100/files/script/load_hisilicon, theremove_detect()function (~line 80):remove_detect() { rmmod -w sensor_spi rmmod -w sensor_i2c rmmod -w hi3516a_isp rmmod -w hi3516a_sys rmmod -w hi3516a_base rmmod -w hi_media rmmod -w mmz rmmod -w sys_config }Suggested fix
Audit what
insert_detect()actually loads, run the firmware once andcat /proc/modules, and updateremove_detect()to use those internal names (likelyopen_sensor_spi,open_sensor_i2c,open_isp,open_base,open_sys,open_osaletc., similar to what other families'remove_detectalready does post-rename).CI hardcoding to undo once fixed
OpenIPC/openhisilicon/.github/workflows/build.ymlqemu-boot matrix has:After this issue is fixed and a new
latestfirmware release is published:allow-failure: trueline from the av100 matrix entry.min_modules: Nto the same row to gate on the lsmod count assertion (pickNfrom a healthy boot's===CI:HISI_MOD_COUNT===N===marker — likely ~25-28 for av100 with allhi3516a_*.koplus mmz/sensor_*/sys_config loaded).Removing
allow-failurewill make the row strict again, and any future regression ofremove_detect(or the loaded module names drifting fromremove_detect's targets) will fail CI immediately rather than be silently warned about.Refs
remove_detect.