Skip to content

aic8800-openipc: install the firmware for specific aic8800 version - #3003

Merged
openipc-ai merged 2 commits into
OpenIPC:masterfrom
PeterBeklemishev:aic8800-openipc-fw
Nov 30, 2026
Merged

openipc-ai merged 2 commits into
OpenIPC:masterfrom
PeterBeklemishev:aic8800-openipc-fw

Conversation

@PeterBeklemishev

@PeterBeklemishev PeterBeklemishev commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

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:

  AICWFDBG(LOGERROR) rwnx_load_firmware: fmacfw_patch_8800dc_h_u02.bin file failed to open
  AICWFDBG(LOGERROR) No such file or directory
  usb_err:<aicwf_usb_probe,2468>: failed with errno -1
  aic8800_fdrv: probe of 1-1:1.2 failed with error -1

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

  • No kernel patches under general/package/all-patches/linux/ (those go to OpenIPC/linux)
  • No files specific to a single retail camera model (those go to OpenIPC/builder)
  • No probing or bring-up tooling (that goes to OpenIPC/ipctool)
  • Nothing under general/overlay/ or in a shared load_<vendor> script hardcodes a value specific to my board
  • Package sources come from an OpenIPC repository, and any version bump keeps at least the specificity of the pin it replaces (a new package should pin a full 40-character SHA)
  • No LD_PRELOAD, and no binaries that cannot be rebuilt from source
  • New code is selected by a defconfig, so CI actually builds it

@qodo-free-for-open-source-projects

qodo-free-for-open-source-projects Bot commented Nov 29, 2026 •

Copy link
Copy Markdown

PR Summary by Qodo

Install AIC8800DC firmware with the wireless driver package

🐞 Bug fix 🕐 Less than 10 minutes

Grey Divider

AI Description

• Install AIC8800DC firmware in the root filesystem so the driver can probe successfully.
• Limit installation to the needed chip variant to conserve flash space.
Merge Risk 🟢 Low

Blast radius 🟢 Low 💥 1 capability

  • 1 affected end-to-end capability after fault-specific containment; implementation boundaries do not widen its functional scope.
  • The package selection, firmware installation, kernel module, and existing USB modprobe entry form one end-to-end AIC8800 wireless behavior.
  • No separate downstream functional behavior was found.
Sources

general/package/aic8800-openipc/Config.in[9-29]

if BR2_PACKAGE_AIC8800_OPENIPC

choice
	prompt "Chip variant"
	help
	  The chip on the board; picks which fw/ set is installed. The
	  four variants total 5.5 MB, too much for an 8 MB NOR board.

config BR2_PACKAGE_AIC8800_OPENIPC_DC
	bool "aic8800DC"

config BR2_PACKAGE_AIC8800_OPENIPC_D80
	bool "aic8800D80"

config BR2_PACKAGE_AIC8800_OPENIPC_D80X2
	bool "aic8800D80X2"

config BR2_PACKAGE_AIC8800_OPENIPC_AIC8800
	bool "aic8800"

endchoice
Behavioral complexity 🟢 Low 🧩 Straightforward

  • Before, the package used a floating HEAD revision and did not select or install variant firmware.
  • After, a four-way configuration choice maps one selected symbol to one firmware directory and copies that directory during installation.
  • The new correctness condition is that the selected symbol, source directory, installed path, and driver lookup name remain exactly aligned.
  • This is a direct conditional mapping using existing Buildroot package and installation mechanisms, without newly interacting runtime states or coordinated writes.
Sources

general/package/aic8800-openipc/Config.in[9-29]

if BR2_PACKAGE_AIC8800_OPENIPC

choice
	prompt "Chip variant"
	help
	  The chip on the board; picks which fw/ set is installed. The
	  four variants total 5.5 MB, too much for an 8 MB NOR board.

config BR2_PACKAGE_AIC8800_OPENIPC_DC
	bool "aic8800DC"

config BR2_PACKAGE_AIC8800_OPENIPC_D80
	bool "aic8800D80"

config BR2_PACKAGE_AIC8800_OPENIPC_D80X2
	bool "aic8800D80X2"

config BR2_PACKAGE_AIC8800_OPENIPC_AIC8800
	bool "aic8800"

endchoice
Potential damage 🟡 Medium 🩹 Temporary loss

  • If the changed selection or installation behavior regresses, the AIC8800 module may fail to probe because its firmware is unavailable or mismatched.
  • The affected end-to-end capability is wireless connectivity only.
  • Reverting the package change or rebuilding with corrected firmware can restore operation; devices already deployed with an incorrect image may require reflashing.
  • No persistent data or external financial effect is supported by the inspected paths.
  • Code rollback or a corrected image can restore the capability.
  • The source does not establish automatic runtime repair or retry; deployed targets may require manual image replacement.
Assessed commit 481fdb5
Diagram

graph TD
  A["AIC8800DC blobs"] --> B["Install hook"] --> C["Target rootfs"] --> D["USB driver probe"]
Loading
High-Level Assessment

Installing the DC set in the package is appropriate because its current board needs those files and installing every variant would waste constrained flash space. Board-specific or selectable variant packaging can be reconsidered when another board needs a different set.

Files changed (1) +13 / -0

Bug fix (1) +13 / -0
aic8800-openipc.mkInstall AIC8800DC firmware into the target image +13/-0

Install AIC8800DC firmware into the target image

• Adds a post-install target hook that copies the AIC8800DC firmware files into /lib/firmware/aic8800DC. The accompanying comment explains why the files must be present in the root filesystem and why other chip variants are excluded.

general/package/aic8800-openipc/aic8800-openipc.mk

@qodo-free-for-open-source-projects

qodo-free-for-open-source-projects Bot commented Nov 29, 2026 •

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (1) 📘 Rule violations (1) 📎 Requirement gaps (0) 🎨 UX issues (0) 🔗 Cross-repo conflicts (0) 📜 Skill insights (0)

Grey Divider


Action required

1. Firmware change lacks hardware evidence 📘 Rule violation ◔ Observability
Description
The new AIC8800_OPENIPC_INSTALL_FW hook copies the aic8800DC firmware into /lib/firmware on
every image that selects the package, changing what the wlan driver does at probe on a camera. The
PR description leaves the Hardware tested on section blank and both Before and After evidence blocks
empty, and its only testing claim refers to a hook in OpenIPC/builder#278 rather than this diff.
Code

general/package/aic8800-openipc/aic8800-openipc.mk[R19-23]

+define AIC8800_OPENIPC_INSTALL_FW
+	$(INSTALL) -d -m 0755 $(TARGET_DIR)/lib/firmware/aic8800DC
+	$(INSTALL) -m 0644 $(@D)/fw/aic8800DC/* $(TARGET_DIR)/lib/firmware/aic8800DC/
+endef
+AIC8800_OPENIPC_POST_INSTALL_TARGET_HOOKS += AIC8800_OPENIPC_INSTALL_FW
Evidence
The hook changes firmware the driver opens at probe, so the hardware-evidence gate applies. The PR
description's Before and After fences are empty and Hardware tested on has no entry, so no
before/after output from a real camera is shown for this diff.

Rule 3: Hardware evidence is present and honest
general/package/aic8800-openipc/aic8800-openipc.mk[19-23]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The PR installs the aic8800DC firmware into the rootfs via `AIC8800_OPENIPC_INSTALL_FW` in `general/package/aic8800-openipc/aic8800-openipc.mk`, which changes wlan probe behaviour on a camera. The PR description leaves the 'Hardware tested on' section blank and the Before/After evidence blocks empty, and the only testing claim refers to a hook in OpenIPC/builder#278 rather than this diff.
## Fix Focus Areas
- general/package/aic8800-openipc/aic8800-openipc.mk[19-23]
## Recommended Fix
Update the PR description: name the SoC and board (Vstarcam C8622), paste dmesg or log output from a camera booted without and with this package change showing the chip probing and `fmacfw_patch_8800dc_h_u02.bin` loading from `/lib/firmware/aic8800DC`, and fill in the 'Hardware tested on' section. If the change has not been run on hardware, state that plainly and open the PR as a draft.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Remediation recommended

2. Chip switches can leave old firmware in images 🐞 Bug ≡ Correctness
Description
AIC8800_OPENIPC_INSTALL_FW copies files into the selected variant directory but never removes a
previously installed variant directory. When a build directory is reused after changing the choice,
the normal defconfig and build path does not clear the target tree, so stale firmware can remain
in the image and consume the flash space this choice is meant to save.
Code

general/package/aic8800-openipc/aic8800-openipc.mk[R27-28]

+	$(INSTALL) -d -m 0755 $(TARGET_DIR)/lib/firmware/$(AIC8800_OPENIPC_FW_DIR)
+	$(INSTALL) -m 0644 $(@D)/fw/$(AIC8800_OPENIPC_FW_DIR)/* $(TARGET_DIR)/lib/firmware/$(AIC8800_OPENIPC_FW_DIR)/
Evidence
The choice changes the selected directory, while the added hook only creates and populates that
directory. The repository's normal build path runs defconfig and Buildroot all without the separate
clean target that removes the existing target tree; the rootfs is then assembled from that tree.

general/package/aic8800-openipc/Config.in[11-29]
general/package/aic8800-openipc/aic8800-openipc.mk[15-30]
Makefile[47-65]
Makefile[141-149]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
Changing the selected chip variant in a reused build directory can leave firmware from the previous selection in the target tree and image. The install hook also needs to run for the new selection; a configuration change alone must not be assumed to rerun an already-installed package.
## Fix Focus Areas
- general/package/aic8800-openipc/aic8800-openipc.mk[15-31]
- Makefile[47-56]
## Recommended Fix
Make variant changes trigger the necessary firmware installation or explicitly require a clean rebuild for this workflow. When installing a variant, remove the other AIC8800 variant directories from the target tree before copying the selected files. Verify a DC-to-D80X2 switch using the supported workflow and confirm that the resulting image contains only D80X2 firmware.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


3. Firmware blobs float with the upstream HEAD ✓ Resolved
Description
The new AIC8800_OPENIPC_INSTALL_FW hook copies $(@D)/fw/aic8800DC/* from a source tree fetched at
AIC8800_OPENIPC_VERSION = HEAD, so the installed firmware is whatever the upstream default branch
holds at build time. Every image built from this package picks up upstream changes to the firmware
without any change in this repo.

Grey Divider

Tip of the day
💡 Did you know, you can hide the parts of a finding you never read, like the evidence or the agent prompt

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

@PeterBeklemishev
PeterBeklemishev force-pushed the aic8800-openipc-fw branch 2 times, most recently from 3c1f99f to d808d95 Compare November 29, 2026 10:59
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.
@PeterBeklemishev PeterBeklemishev changed the title aic8800-openipc: install the aic8800DC firmware aic8800-openipc: install the firmware for specific aic8800 version Nov 29, 2026
@PeterBeklemishev

Copy link
Copy Markdown
Contributor Author

@qodo-free-for-open-source-projects @openipc-ai

@PeterBeklemishev

Copy link
Copy Markdown
Contributor Author

/review

@openipc-ai openipc-ai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 makes aic_default_fw_path /lib/firmware rather than /vendor/etc/firmware.
  • The variant directory is appended by the driver: aic8800DC in rwnx_platform.c, aic8800D80 and aic8800D80X2 in the compat files, and aic8800 in aic_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:

  1. Pin the source (Qodo #3 is valid). With AIC8800_OPENIPC_VERSION = HEAD, the blobs in /lib/firmware change whenever upstream does. Please pin the commit you tested:
    AIC8800_OPENIPC_VERSION = 0e218ed686ee04a3006bb142ca70450dfa72f4d2
    
  2. Untick "New code is selected by a defconfig, so CI actually builds it." No defconfig here selects the package, and .github/scripts/ci-matrix.py lists aic8800-openipc in NOT_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.
  3. 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.
  4. Consider moving the board's Wi-Fi profile here.
    • #278 carries a full copy of general/overlay/etc/wireless/usb just to add its aic8800-t23-vstarcam-c8622 arm, and that copy is already behind master. It lacks rt2800usb-generic and 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-broadband in the shared file, under a generic name such as aic8800-usb that other boards can use.
    • modprobe mac80211 can go from it: the aic8800 driver is FullMAC and calls no mac80211 functions, so loading it only costs RAM.

Small things:

  • The DC entry's help could say it also covers the AIC8800DW; the driver uses aic8800DC for 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 openipc-ai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
@openipc-ai

Copy link
Copy Markdown
Collaborator

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 fmacfw_patch_8800dc_h_u02.bin from /lib/firmware/aic8800DC, the USB probe succeeding, wlan0 appearing and associating. Once that's in and CI is green, I'll approve.

echoechoechoechoechoechoechoecho pushed a commit to echoechoechoechoechoechoechoecho/builder that referenced this pull request Nov 29, 2026
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>
echoechoechoechoechoechoechoecho pushed a commit to echoechoechoechoechoechoechoecho/builder that referenced this pull request Nov 29, 2026
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>
echoechoechoechoechoechoechoecho pushed a commit to echoechoechoechoechoechoechoecho/builder that referenced this pull request Nov 29, 2026
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>
@echoechoechoechoechoechoechoecho

Copy link
Copy Markdown

The D80 entry now has a board behind it: the Baseus P1 Pro (AK3918AV100X, USB a69c:8d80, 8d81 after aic_load_fw). I built its profile (OpenIPC/builder#282) on firmware master 79c9989 with this PR applied and BR2_PACKAGE_AIC8800_OPENIPC_D80=y, no aic_fw_path override, and flashed it. The driver finds the set in /lib/firmware/aic8800D80 on its own:

usb 1-1: New USB device found, idVendor=a69c, idProduct=8d80
AICWFDBG(LOGINFO)	aicloadfw_chipmatch USE AIC8800D80
aic_load_firmware :firmware path = /lib/firmware/aic8800D80/fw_patch_table_8800d80_u02.bin
aic_load_firmware :firmware path = /lib/firmware/aic8800D80/fw_adid_8800d80_u02.bin
aic_load_firmware :firmware path = /lib/firmware/aic8800D80/fw_patch_8800d80_u02.bin
aic_load_firmware :firmware path = /lib/firmware/aic8800D80/fw_patch_8800d80_u02_ext0.bin
aic_load_firmware :firmware path = /lib/firmware/aic8800D80/fmacfw_8800d80_u02.bin
### Upload fmacfw_8800d80_u02.bin firmware, @ = 120000  size=347644
usb 1-1: USB disconnect, device number 2
usb 1-1: New USB device found, idVendor=a69c, idProduct=8d81
AICWFDBG(LOGINFO)	aicwf_usb_chipmatch USE AIC8800D81
AICWFDBG(LOGINFO)	rwnx_load_firmware :firmware path = /lib/firmware/aic8800D80/aic_userconfig_8800d80.txt
AICWFDBG(LOGINFO)	Firmware Version: di Aug 09 2024 12:29:36 - g1ee3f1e
AICWFDBG(LOGINFO)	New interface create wlan0
AICWFDBG(LOGINFO)	rwnx_rx_sm_connect_ind cfg80211_connect_result pass, rwnx_vif->drv_conn_state:3
$ iwconfig wlan0
wlan0     IEEE 802.11abgn  ESSID:"<ssid>"
          Mode:Managed  Frequency:5.24 GHz  Access Point: <bssid>
          Bit Rate=162 Mb/s
          Link Quality=55/70  Signal level=-55 dBm

One thing for 8 MB boards: of the twelve files in fw/aic8800D80, a U02 D80 loads nine (the log above shows all of them). fmacfw_8800d80_h_u02.bin is for the H revision, fmacfw_8800d80_u02_ipc.bin is used only with CONFIG_FOR_IPCAM (off in the driver's Makefile), and fw_ble_scan_ad_filter.bin is for BLE. In squashfs they take about 590 KiB, since each file is compressed on its own and the three MAC images do not share a dictionary. On this camera that is the difference between fitting and not: 7680 of 7616 KiB with the whole directory, 7104 without those three, so the profile drops them in its excludes list. If you would rather ship only what the driver loads, a per-variant file list in the .mk would do it; either way works for this board.

@openipc-ai openipc-ai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-ai
openipc-ai merged commit 5634fda into OpenIPC:master Nov 30, 2026
48 checks passed
PeterBeklemishev added a commit to PeterBeklemishev/oipc-builder that referenced this pull request Nov 30, 2026
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants