Repository navigation
aic8800-openipc: install the firmware for specific aic8800 version - #3003
Conversation
PR Summary by QodoInstall AIC8800DC firmware with the wireless driver package
AI Description
Merge Risk
|
Code Review by Qodo
1. Firmware change lacks hardware evidence
|
3c1f99f to
d808d95
Compare
The driver loads its firmware with plain file opens (the repo builds with CONFIG_USE_FW_REQUEST=n) from aic_fw_path, /lib/firmware by default, appending the variant directory itself, but the package installed only the modules. A board that selects it therefore gets a wlan driver that cannot probe: rwnx_load_firmware fails to open fmacfw_patch_8800dc_h_u02.bin and the USB probe errors out. Install the blobs for a chip variant the board picks in a new Kconfig choice, as atbm-wifi does for its models; fw/ carries four variants totalling 5.5 MB, more than an 8 MB NOR board can spare, so one is shipped. The aic8800DC path is hardware-tested on the Vstarcam C8622 (OpenIPC/builder#278, through the identical hook carried as a device override there): the chip probes, loads fmacfw_patch_8800dc_h_u02.bin and associates. The other three entries install the fw/ directory the driver asks for but have no board to test on yet.
d808d95 to
94981e6
Compare
|
@qodo-free-for-open-source-projects @openipc-ai |
|
/review |
openipc-ai
left a comment
There was a problem hiding this comment.
The code is right. I checked it against openipc/aic8800 at 0e218ed:
- The firmware is opened as a plain file. The top-level Makefile exports
CONFIG_PLATFORM_UBUNTU=y, which makesaic_default_fw_path/lib/firmwarerather than/vendor/etc/firmware. - The variant directory is appended by the driver:
aic8800DCinrwnx_platform.c,aic8800D80andaic8800D80X2in the compat files, andaic8800inaic_load_fw. Those are exactly the four choice entries. - Shipping one of the four (about 5.6 MB together) is the right call for 8 MB NOR.
- No board in OpenIPC/builder master selects
BR2_PACKAGE_AIC8800_OPENIPC, so the DC default changes no existing image.
Before merge:
- Pin the source (Qodo #3 is valid). With
AIC8800_OPENIPC_VERSION = HEAD, the blobs in/lib/firmwarechange whenever upstream does. Please pin the commit you tested:AIC8800_OPENIPC_VERSION = 0e218ed686ee04a3006bb142ca70450dfa72f4d2 - Untick "New code is selected by a defconfig, so CI actually builds it." No defconfig here selects the package, and
.github/scripts/ci-matrix.pylistsaic8800-openipcinNOT_BUILT. CI built 13 boards and none of them ran the new hook. Say instead that its only user is OpenIPC/builder#278 and that you built it there. - The PR body.
- The Problem section and both Before/After blocks are empty; the evidence sits above the template.
- Please move the probe-failure log into "Before", and the
rwnx_load_firmware/ association lines from the C8622 into "After". - The paragraph starting "Adjust the 'Hardware tested on' ticking…" reads as a note to you, not to reviewers.
- That covers Qodo #1 too. The hardware claim itself is fine: the same hook, in #278, ran on the camera.
- Consider moving the board's Wi-Fi profile here.
- #278 carries a full copy of
general/overlay/etc/wireless/usbjust to add itsaic8800-t23-vstarcam-c8622arm, and that copy is already behind master. It lacksrt2800usb-genericand the XM232 ATBM arm, and has the old Xiongmai V200 arm. - The arm has nothing T23-specific, so it can sit next to
aic8800-ssc337de-broadbandin the shared file, under a generic name such asaic8800-usbthat other boards can use. modprobe mac80211can go from it: the aic8800 driver is FullMAC and calls no mac80211 functions, so loading it only costs RAM.
- #278 carries a full copy of
Small things:
- The DC entry's help could say it also covers the AIC8800DW; the driver uses
aic8800DCfor both chip IDs. ifneq ($(AIC8800_OPENIPC_FW_DIR),)is always true, because the choice always has one entry selected.- Qodo #2, the stale directory after switching variants: an incremental build after a config change is not supported in Buildroot anyway. I wouldn't do anything about it.
openipc-ai
left a comment
There was a problem hiding this comment.
Requesting changes, as detailed in my review above (#3003 (review)). Blocking: pin AIC8800_OPENIPC_VERSION to 0e218ed686ee04a3006bb142ca70450dfa72f4d2 instead of HEAD; untick the defconfig/CI box, since no defconfig here selects the package and CI never ran the hook; and fill the Problem and Before/After sections with the logs you already have.
HEAD makes the tarball unfetchable to reproduce and rebuilds can silently pick up a moved master. Pin to current master 0e218ed.
|
Thanks, the pin, the unticked CI box and the Problem/Before sections cover three of the four blocking items. What's left is After: it still describes the result instead of showing it. Please paste the C8622's dmesg lines from a boot of this build: aic8800 loading |
Baseus P1 Pro, the AK3918AV100X pan/tilt camera: SmartSens SC5336 on 2-lane MIPI, AIC8800D80 USB Wi-Fi, 8 MB NOR, microSD, two GPIO steppers, IR-cut, IR LEDs, red and blue LEDs, reset button. Everything common is upstream, so the profile only names it: - the kernel: the generic AV100X config with the board's device tree (OpenIPC/linux, ak3918av100x-baseus-s0tv022132) and gpio-leds; - the sensor: sensor_sc5336.ko built from source by anyka-opensdk-ak3918av100 (OpenIPC/firmware), so no vendor module is shipped; the ISP tuning is the stock firmware's, unmodified (sha256 13b66407...); - Wi-Fi: aic8800-openipc with its D80 chip variant, powered up on GPIO 98 by the board's /etc/wireless/usb profile; - pan/tilt: gpiostep (pins in /etc/modules, in the stock motor driver's half-step order) driven by majestic-af, travel from the stock driver's limits in /etc/gpiostep.conf; - the reset button (GPIO 3) through reset-button and gpio.conf; - day/night on the ISP gain (no light sensor on the board), IR-cut on 4/8, IR LEDs on 70, seeded by customizer.sh. Needs OpenIPC/linux (the device tree) and OpenIPC/firmware (anyka-opensdk-ak3918av100, and aic8800-openipc's chip variants, OpenIPC/firmware#3003). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Baseus P1 Pro, the AK3918AV100X pan/tilt camera: SmartSens SC5336 on 2-lane MIPI, AIC8800D80 USB Wi-Fi, 8 MB NOR, microSD, two GPIO steppers, IR-cut, IR LEDs, red and blue LEDs, reset button. Everything common is upstream, so the profile only names it: - the kernel: the generic AV100X config with the board's device tree (OpenIPC/linux#345, ak3918av100x-baseus-s0tv022132) and gpio-leds; - the sensor: sensor_sc5336.ko built from source by anyka-opensdk-ak3918av100 (OpenIPC/firmware), so no vendor module is shipped; the ISP tuning is the stock firmware's, unmodified (sha256 13b66407...); - Wi-Fi: aic8800-openipc with its D80 chip variant, powered up on GPIO 98 by the board's /etc/wireless/usb profile; - pan/tilt: gpiostep (pins in /etc/modules, in the stock motor driver's half-step order) driven by majestic-af, travel from the stock driver's limits in /etc/gpiostep.conf; - the reset button (GPIO 3) through reset-button and gpio.conf; - day/night on the ISP gain (no light sensor on the board), IR-cut on 4/8, IR LEDs on 70, seeded by customizer.sh. Needs OpenIPC/linux#345 (the device tree) and OpenIPC/firmware (anyka-opensdk-ak3918av100, and aic8800-openipc's chip variants, OpenIPC/firmware#3003). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Baseus P1 Pro, the AK3918AV100X pan/tilt camera: SmartSens SC5336 on 2-lane MIPI, AIC8800D80 USB Wi-Fi, 8 MB NOR, microSD, two GPIO steppers, IR-cut, IR LEDs, red and blue LEDs, reset button. Everything common is upstream, so the profile only names it: - the kernel: the generic AV100X config with the board's device tree (OpenIPC/linux#345, ak3918av100x-baseus-s0tv022132) and gpio-leds; - the sensor: sensor_sc5336.ko built from source by anyka-opensdk-ak3918av100 (OpenIPC/firmware#3007), so no vendor module is shipped; the ISP tuning is the stock firmware's, unmodified (sha256 13b66407...); - Wi-Fi: aic8800-openipc with its D80 chip variant, powered up on GPIO 98 by the board's /etc/wireless/usb profile; - pan/tilt: gpiostep (pins in /etc/modules, in the stock motor driver's half-step order) driven by majestic-af, travel from the stock driver's limits in /etc/gpiostep.conf; - the reset button (GPIO 3) through reset-button and gpio.conf; - day/night on the ISP gain (no light sensor on the board), IR-cut on 4/8, IR LEDs on 70, seeded by customizer.sh. Needs OpenIPC/linux#345 (the device tree), OpenIPC/firmware#3007 (anyka-opensdk-ak3918av100) and OpenIPC/firmware#3003 (aic8800-openipc's chip variants). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The D80 entry now has a board behind it: the Baseus P1 Pro (AK3918AV100X, USB One thing for 8 MB boards: of the twelve files in |
openipc-ai
left a comment
There was a problem hiding this comment.
Approving. The install hook is the same for every variant; only the directory name changes, and aic8800DC is the name the driver appends for DC and DW (rwnx_platform.c). The D80 run on the Baseus P1 Pro (builder#282) shows this PR's hook working on hardware: the driver finds every file it asks for in /lib/firmware/aic8800D80 without an aic_fw_path override, and wlan0 associates. Thanks @echoechoechoechoechoechoechoecho.
A follow-up worth doing: a per-variant list of the files the driver actually loads, instead of the whole fw/<variant> directory. On D80, the _ipc images are only used with CONFIG_FOR_IPCAM, which the Makefiles turn off; _h_u02 is for the H revision; and the BLE filter goes unused. Dropping those three saves about 590 KiB of squashfs, which decides whether an 8 MB board fits.
OpenIPC/firmware#3003 taught the stock package to install the selected variant's firmware, pinned to the same 0e218ed, so the device override goes away and the defconfig just picks the DC variant.
The aic8800 driver loads its chip firmware with plain file opens (the repo builds with CONFIG_USE_FW_REQUEST=n) from aic_fw_path — /lib/firmware by default, with the variant directory appended by the driver itself — but the package installed only the kernel modules. A board selecting BR2_PACKAGE_AIC8800_OPENIPC therefore gets a wlan driver that cannot probe.
What this does: adds a Kconfig choice for the chip variant (same pattern as atbm-wifi's model selection) and installs the matching fw/ directory into /lib/firmware/ — the exact path the driver asks for. The four variants in fw/ total 5.5 MB, more than an 8 MB NOR board can spare, so exactly one is shipped. aic8800DC is the default as the chip on the one board selecting this package (Vstarcam C8622, OpenIPC/builder#278); D80, D80X2 and the original aic8800 join as selectable entries.
Evidence:
• Build, default config: BR2_PACKAGE_AIC8800_OPENIPC_DC=y auto-selected, 19 files installed into /lib/firmware/aic8800DC, image fits with room (6464/7616 KB).
• Build, BR2_PACKAGE_AIC8800_OPENIPC_D80X2=y: choice switches cleanly, 7 files in /lib/firmware/aic8800D80X2, no DC directory.
• Hardware (Vstarcam C8622, Ingenic T23N): with the same 19 blobs in /lib/firmware/aic8800DC — installed there by the identical hook carried as a device override in
OpenIPC/builder#278 — the chip probes, loads fmacfw_patch_8800dc_h_u02.bin, and associates to an AP.
• The D80/D80X2/aic8800 entries install the directory the driver requests but have no board behind them yet; only the DC path is hardware-tested.
Once this merges, OpenIPC/builder#278 drops its device override and rides the stock package.
Problem
AIC8800 chip variants require loading its firmware, current mk file does not copy required firmware files.
Hardware tested on
t23n (vstarcam c8622)
Evidence
Before:
aic8800 fw was not making it into firmware:
The package had no in-tree user until now, which is why this went unnoticed.
After:
Selecting Kconfig choice for the chip variant installs the matching fw/ directory into
/lib/firmware/
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 source