Skip to content

axera: AX620E and AX620U on OpenIPC's kernel, U-Boot and flash layouts - #2670

Merged
dimerr merged 29 commits into
masterfrom
axera
Nov 20, 2026
Merged

dimerr merged 29 commits into
masterfrom
axera

Conversation

@dimerr

@dimerr dimerr commented Oct 24, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Axera AX620E (2x Cortex-A53, kernel 5.15.73, SPI NOR) and AX620U (4x Cortex-A7, kernel 4.19.125, SPI NAND) camera support: br-ext-chip-axera boards, defconfigs, kernel configs/devicetrees, and axera-osdrv-ax620e/axera-osdrv-ax620u packages carrying the vendor media modules with a load_axera that loads them as the stock firmware does.

Both images follow OpenIPC's standard flash layouts and boot with OpenIPC's own U-Boot (no vendor bootloader beyond the DDR-init SPL the boot ROM loads):

  • AX620E — standard NOR layout (boot 256K, env, kernel 2M, rootfs 5M, rootfs_data); kernel = OpenIPC/linux axera-ax620e (Axera's drivers ported from the SDK to 5.15.73 incl. the OSAL the vendor modules need).
  • AX620U — standard all-in-UBI NAND layout (board/ax620u/nand-fit.its + ubinize-nand.cfg: UBIFS rootfs with the kernel as /boot/fitImage, autoresize rootfs_data; openipc.ax620u-nand-lite.tgz); kernel = OpenIPC/linux axera-ax620u (Axera's SDK 4.19.125 kernel + AX620U support).

Also: the build fixes a first full buildroot build needed (libcurl options as on other lite boards; kernel image load address/devicetree), majestic disabled for now (there is no Axera majestic build yet), and an ipctool Axera HAL patch so the vendor init runs load_axera (carried until OpenIPC/ipctool#290 is in a release).

Depends on

Test plan (OpenIPC/qemu-bench ax620e / ax620u machines; real hardware pending)

Built at 837f87c with LINUX_OVERRIDE_SRCDIR = the OpenIPC/linux#259 / #260 heads, then booted from whole-flash images (vendor SPL + OpenIPC U-Boot + this build's images, env blank):

  • make BOARD=ax620e_lite → openipc.ax620e-nor-lite.tgz (uImage 1960K/2048K, squashfs 3692K); make BOARD=ax620u_lite → openipc.ax620u-nand-lite.tgz.
  • AX620E: U-Boot saves its default env, boots the kernel slot → 5.15.73, squashfs root, jffs2 rootfs_data on /overlay → first login sets the password; ipcinfo -v/-c/-f = axera/ax620e/ax620e; S70vendor → load_axera (modprobe): 21/21 modules loaded, no failure logged, no oops; a file in /etc and the password survive a reboot.
  • AX620U: U-Boot boots /boot/fitImage from UBIFS → 4.19.125 on 4 CPUs, UBIFS rootfs_data on /overlay → first login; ipcinfo = axera/ax620u/ax620u; 28/28 modules loaded, no oops; persistence across reboot as above.
  • ci-matrix.py --self-test ok (both boards in UNBUILT_BOARDS until linux#259/Uboot-env integration in Busybox #260 merge).
  • Sensor tuning (aedb3ee), rebuilt with the kernels from OpenIPC/linux axera-ax620e/axera-ax620u (no override): make BOARD=ax620e_lite → squashfs 2948K (4460K with BR2_PACKAGE_AXERA_OSDRV_AX620E_AI_ISP=y, off by default), make BOARD=ax620u_lite → rootfs.ubi 18432K/24576K. Booted both in QEMU: the 6 SC450AI / 8 OS04A10 bins in /etc/sensors and the 3 AX620U .pro models in /etc/sensors/ai_isp (also through /mnt/custom/ai_isp) have the stock files' md5s; libsns_*.so in /usr/lib/sensors differs from stock only by the .comment section Buildroot's strip drops; still 21/21 and 28/28 modules loaded, no oops. AX620E option toggled on and off in one build dir: model and link appear, then are removed.
  • A streamer: majestic has no Axera backend yet (the stock vendor App does stream RTSP on the AX620U kernel, so the media stack itself works).
  • Real hardware: not yet run on a camera (clocks, EPHY, watchdog, secure-boot behaviour of the vendor SPL).

New chip-family skeleton following the usual br-ext-chip-<vendor>
layout: defconfigs (lite + toolchain-only, aarch64 musl for AX620E's
kernel 5.15.73, arm musleabihf for AX620U's kernel 4.19.125 -- both
read directly off real deployed camera firmware, not the public vendor
SDK which never shipped a kernel newer than 4.19), and axera-osdrv-*
packages carrying the vendor's closed kernel modules (ax_sys/ax_pool/
ax_cmm/ax_proton/ax_npu/ax_venc/ax_vdec/... plus the Xiongmai Xm*.ko
peripheral modules from the same firmware) with a load_axera script
that insmods them in the real dependency order read from each module's
own `depends=`.

Each osdrv package's README documents exactly where its modules came
from and why no public source exists for them at any kernel version.

Board kernel .config files (board/ax620e/ax620e.lite.config etc.) don't
exist yet -- they depend on the axera-ax620e / axera-ax620u kernel
branches, still in progress.
ax620e_lite_defconfig/ax620u_lite_defconfig already referenced
board/<family>/<family>.lite.config via BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE,
but neither file existed -- a build would have failed copying the
kernel config. Both kernel branches now build clean with real
artifacts (openipc-linux-ax620e's Image, openipc-linux-ax620u's
zImage), so copy their real working .config in as the referenced file
and update the board READMEs from "scaffold/not started" to reflect
that.
@qodo-free-for-open-source-projects

Copy link
Copy Markdown

PR Summary by Qodo

Add AX620E and AX620U board support and vendor module packages

✨ Enhancement ⚙️ Configuration changes 📝 Documentation 🕐 40+ Minutes

Grey Divider

AI Description

• Add AX620E and AX620U board configurations targeting their deployed firmware’s distinct
 architectures and kernels.
• Package firmware-derived vendor modules and chip-specific load scripts for the closed driver
 stacks.
• Supply working kernel configurations; full Buildroot builds and hardware boots remain unverified.
Diagram

graph TD
  A["Lite defconfigs"] --> B["Kernel configs"] --> C["Linux branches"]
  A --> D["OSDRV packages"] --> E["Vendor modules"]
  D --> F["Load scripts"] --> E
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Use depmod and modprobe for module dependencies
  • ➕ Uses module metadata instead of maintaining two manual load orders.
  • ➕ Can surface missing dependencies during integration.
  • ➖ Requires suitable target-side tooling and module-dependency generation.
  • ➖ Chip-specific initialization order may require additional handling.

Recommendation: Keeping separate packages and configs is appropriate because the chips have different architectures, kernel versions, and module sets. Before relying on either loading strategy, reconcile AX620U’s disabled CONFIG_MODULES with its packaged .ko files and verify the resulting kernel release matches the module install path and vermagic. Consider depmod/modprobe if the target supports it; otherwise retain the explicit, chip-specific scripts.

Files changed (66) +11042 / -0

Enhancement (4) +121 / -0
axera-osdrv-ax620e.mkInstall AX620E modules and loader +18/-0

Install AX620E modules and loader

• Defines a local Buildroot package that copies .ko files into the 5.15.73 module directory and installs load_axera in /usr/bin.

general/package/axera-osdrv-ax620e/axera-osdrv-ax620e.mk

load_axeraLoad AX620E Axera modules in fixed order +40/-0

Load AX620E Axera modules in fixed order

• Adds an insmod script that checks the running kernel’s Axera module directory, then loads foundation, media, NPU, and ISP modules. It does not load the packaged Xiongmai modules.

general/package/axera-osdrv-ax620e/files/script/load_axera

axera-osdrv-ax620u.mkInstall AX620U modules and loader +18/-0

Install AX620U modules and loader

• Defines a local Buildroot package that copies .ko files into the 4.19.125 module directory and installs load_axera in /usr/bin.

general/package/axera-osdrv-ax620u/axera-osdrv-ax620u.mk

load_axeraLoad AX620U Axera modules in fixed order +45/-0

Load AX620U Axera modules in fixed order

• Adds an AX620U-specific insmod script that checks the running kernel’s module directory and loads foundation, peripheral, media, NPU, and ISP modules. It does not load the packaged Xiongmai modules.

general/package/axera-osdrv-ax620u/files/script/load_axera

Documentation (4) +81 / -0
README.mdDocument AX620E kernel provenance +11/-0

Document AX620E kernel provenance

• Records the working 5.15.73 AArch64 kernel configuration and its origin in deployed AX620E firmware rather than the older public SDK.

br-ext-chip-axera/board/ax620e/README.md

README.mdDocument distinct AX620U platform +13/-0

Document distinct AX620U platform

• Records the working ARMv7 4.19.125 kernel configuration and explains why AX620E platform drivers cannot simply be reused.

br-ext-chip-axera/board/ax620u/README.md

README.mdDocument AX620E module origins and scope +28/-0

Document AX620E module origins and scope

• Identifies firmware-derived closed modules, in-tree kernel drivers, provenance, and the purpose of the load script.

general/package/axera-osdrv-ax620e/README.md

README.mdDocument AX620U module origins and platform +29/-0

Document AX620U module origins and platform

• Explains the AX620U-specific platform and driver work, identifies the firmware-derived modules, and records their 4.19.125 provenance.

general/package/axera-osdrv-ax620u/README.md

Other (58) +10840 / -0
ax620e.lite.configSupply AX620E Linux 5.15.73 configuration +9336/-0

Supply AX620E Linux 5.15.73 configuration

• Adds the generated arm64 kernel configuration referenced by the AX620E lite defconfig, including Axera platform support and loadable modules.

br-ext-chip-axera/board/ax620e/ax620e.lite.config

ax620u.lite.configSupply AX620U Linux 4.19.125 configuration +1314/-0

Supply AX620U Linux 4.19.125 configuration

• Adds the generated ARM kernel configuration referenced by the AX620U lite defconfig. The configuration currently has CONFIG_MODULES disabled despite the separately packaged kernel modules.

br-ext-chip-axera/board/ax620u/ax620u.lite.config

ax620e_lite_defconfigDefine AX620E lite firmware build +54/-0

Define AX620E lite firmware build

• Selects Cortex-A53 AArch64, an external musl toolchain, the AX620E kernel configuration, root filesystems, and OpenIPC and Axera packages.

br-ext-chip-axera/configs/ax620e_lite_defconfig

ax620e_toolchain_defconfigDefine AX620E toolchain-only build +32/-0

Define AX620E toolchain-only build

• Pins the AArch64 musl toolchain inputs and 5.15 headers without selecting the full firmware package set.

br-ext-chip-axera/configs/ax620e_toolchain_defconfig

ax620u_lite_defconfigDefine AX620U lite firmware build +55/-0

Define AX620U lite firmware build

• Selects Cortex-A7 ARM, an external musl hard-float toolchain, the AX620U kernel configuration, root filesystems, and OpenIPC and Axera packages.

br-ext-chip-axera/configs/ax620u_lite_defconfig

ax620u_toolchain_defconfigDefine AX620U toolchain-only build +29/-0

Define AX620U toolchain-only build

• Pins the ARM musl hard-float toolchain inputs and 4.19 headers independently of the firmware build.

br-ext-chip-axera/configs/ax620u_toolchain_defconfig

Config.inExpose both Axera OSDRV packages +2/-0

Expose both Axera OSDRV packages

• Sources the AX620E and AX620U package menus so their lite defconfigs can select the corresponding drivers.

general/package/Config.in

Config.inDeclare AX620E OSDRV package +10/-0

Declare AX620E OSDRV package

• Adds the Buildroot selection and distinguishes closed vendor modules from drivers supplied by the companion kernel branch.

general/package/axera-osdrv-ax620e/Config.in

XmCommon.koAdd AX620E Xiongmai common module +0/-0

Add AX620E Xiongmai common module

• Adds the firmware-derived Xiongmai common peripheral binary; the binary contents are not represented in the text patch.

general/package/axera-osdrv-ax620e/files/kmod/XmCommon.ko

XmDemux.koAdd AX620E Xiongmai demux module +0/-0

Add AX620E Xiongmai demux module

• Adds the firmware-derived Xiongmai demux binary; the binary contents are not represented in the text patch.

general/package/axera-osdrv-ax620e/files/kmod/XmDemux.ko

XmGpio.koAdd AX620E Xiongmai GPIO module +0/-0

Add AX620E Xiongmai GPIO module

• Adds the firmware-derived Xiongmai GPIO binary; the binary contents are not represented in the text patch.

general/package/axera-osdrv-ax620e/files/kmod/XmGpio.ko

XmGpioI2c.koAdd AX620E Xiongmai GPIO-I2C module +0/-0

Add AX620E Xiongmai GPIO-I2C module

• Adds the firmware-derived Xiongmai GPIO-I2C binary; the binary contents are not represented in the text patch.

general/package/axera-osdrv-ax620e/files/kmod/XmGpioI2c.ko

XmIrCut.koAdd AX620E Xiongmai IR-cut module +0/-0

Add AX620E Xiongmai IR-cut module

• Adds the firmware-derived Xiongmai IR-cut peripheral binary; the binary contents are not represented in the text patch.

general/package/axera-osdrv-ax620e/files/kmod/XmIrCut.ko

ax_audio.koAdd AX620E audio module +0/-0

Add AX620E audio module

• Adds the firmware-derived Axera audio kernel binary; the binary contents are not represented in the text patch.

general/package/axera-osdrv-ax620e/files/kmod/ax_audio.ko

ax_base.koAdd AX620E base module +0/-0

Add AX620E base module

• Adds the firmware-derived Axera foundation binary used by other modules; the binary contents are not represented in the text patch.

general/package/axera-osdrv-ax620e/files/kmod/ax_base.ko

ax_cmm.koAdd AX620E common-memory module +0/-0

Add AX620E common-memory module

• Adds the firmware-derived Axera common-memory binary; the binary contents are not represented in the text patch.

general/package/axera-osdrv-ax620e/files/kmod/ax_cmm.ko

ax_gdc.koAdd AX620E GDC module +0/-0

Add AX620E GDC module

• Adds the firmware-derived Axera GDC binary; the binary contents are not represented in the text patch.

general/package/axera-osdrv-ax620e/files/kmod/ax_gdc.ko

ax_ivps.koAdd AX620E IVPS module +0/-0

Add AX620E IVPS module

• Adds the firmware-derived Axera image-processing binary; the binary contents are not represented in the text patch.

general/package/axera-osdrv-ax620e/files/kmod/ax_ivps.ko

ax_jenc.koAdd AX620E JPEG encoder module +0/-0

Add AX620E JPEG encoder module

• Adds the firmware-derived Axera JPEG encoder binary; the binary contents are not represented in the text patch.

general/package/axera-osdrv-ax620e/files/kmod/ax_jenc.ko

ax_mipi_rx.koAdd AX620E MIPI receiver module +0/-0

Add AX620E MIPI receiver module

• Adds the firmware-derived Axera MIPI receiver binary; the binary contents are not represented in the text patch.

general/package/axera-osdrv-ax620e/files/kmod/ax_mipi_rx.ko

ax_npu.koAdd AX620E NPU module +0/-0

Add AX620E NPU module

• Adds the firmware-derived Axera NPU binary; the binary contents are not represented in the text patch.

general/package/axera-osdrv-ax620e/files/kmod/ax_npu.ko

ax_pool.koAdd AX620E memory-pool module +0/-0

Add AX620E memory-pool module

• Adds the firmware-derived Axera pool binary; the binary contents are not represented in the text patch.

general/package/axera-osdrv-ax620e/files/kmod/ax_pool.ko

ax_proton.koAdd AX620E ISP module +0/-0

Add AX620E ISP module

• Adds the firmware-derived Axera ISP 3A binary; the binary contents are not represented in the text patch.

general/package/axera-osdrv-ax620e/files/kmod/ax_proton.ko

ax_sys.koAdd AX620E system module +0/-0

Add AX620E system module

• Adds the firmware-derived Axera system foundation binary; the binary contents are not represented in the text patch.

general/package/axera-osdrv-ax620e/files/kmod/ax_sys.ko

ax_tdp.koAdd AX620E TDP module +0/-0

Add AX620E TDP module

• Adds the firmware-derived Axera TDP binary; the binary contents are not represented in the text patch.

general/package/axera-osdrv-ax620e/files/kmod/ax_tdp.ko

ax_vdec.koAdd AX620E video-decoder module +0/-0

Add AX620E video-decoder module

• Adds the firmware-derived Axera video-decoder binary; the binary contents are not represented in the text patch.

general/package/axera-osdrv-ax620e/files/kmod/ax_vdec.ko

ax_venc.koAdd AX620E video-encoder module +0/-0

Add AX620E video-encoder module

• Adds the firmware-derived Axera video-encoder binary; the binary contents are not represented in the text patch.

general/package/axera-osdrv-ax620e/files/kmod/ax_venc.ko

ax_vo.koAdd AX620E video-output module +0/-0

Add AX620E video-output module

• Adds the firmware-derived Axera video-output binary; the binary contents are not represented in the text patch.

general/package/axera-osdrv-ax620e/files/kmod/ax_vo.ko

ax_vpp.koAdd AX620E video post-processing module +0/-0

Add AX620E video post-processing module

• Adds the firmware-derived Axera video post-processing binary; the binary contents are not represented in the text patch.

general/package/axera-osdrv-ax620e/files/kmod/ax_vpp.ko

Config.inDeclare AX620U OSDRV package +8/-0

Declare AX620U OSDRV package

• Adds the Buildroot selection for AX620U’s closed kernel modules and documents its distinct platform-driver situation.

general/package/axera-osdrv-ax620u/Config.in

XmCommon.koAdd AX620U Xiongmai common module +0/-0

Add AX620U Xiongmai common module

• Adds the firmware-derived Xiongmai common peripheral binary; the binary contents are not represented in the text patch.

general/package/axera-osdrv-ax620u/files/kmod/XmCommon.ko

XmDemux.koAdd AX620U Xiongmai demux module +0/-0

Add AX620U Xiongmai demux module

• Adds the firmware-derived Xiongmai demux binary; the binary contents are not represented in the text patch.

general/package/axera-osdrv-ax620u/files/kmod/XmDemux.ko

XmGpio.koAdd AX620U Xiongmai GPIO module +0/-0

Add AX620U Xiongmai GPIO module

• Adds the firmware-derived Xiongmai GPIO binary; the binary contents are not represented in the text patch.

general/package/axera-osdrv-ax620u/files/kmod/XmGpio.ko

XmGpioI2c.koAdd AX620U Xiongmai GPIO-I2C module +0/-0

Add AX620U Xiongmai GPIO-I2C module

• Adds the firmware-derived Xiongmai GPIO-I2C binary; the binary contents are not represented in the text patch.

general/package/axera-osdrv-ax620u/files/kmod/XmGpioI2c.ko

XmIrCut.koAdd AX620U Xiongmai IR-cut module +0/-0

Add AX620U Xiongmai IR-cut module

• Adds the firmware-derived Xiongmai IR-cut peripheral binary; the binary contents are not represented in the text patch.

general/package/axera-osdrv-ax620u/files/kmod/XmIrCut.ko

ax_audio.koAdd AX620U audio module +0/-0

Add AX620U audio module

• Adds the firmware-derived Axera audio binary; the binary contents are not represented in the text patch.

general/package/axera-osdrv-ax620u/files/kmod/ax_audio.ko

ax_avs.koAdd AX620U AVS module +0/-0

Add AX620U AVS module

• Adds the firmware-derived Axera AVS binary; the binary contents are not represented in the text patch.

general/package/axera-osdrv-ax620u/files/kmod/ax_avs.ko

ax_cmm.koAdd AX620U common-memory module +0/-0

Add AX620U common-memory module

• Adds the firmware-derived Axera common-memory binary; the binary contents are not represented in the text patch.

general/package/axera-osdrv-ax620u/files/kmod/ax_cmm.ko

ax_ddr_retention.koAdd AX620U DDR-retention module +0/-0

Add AX620U DDR-retention module

• Adds the firmware-derived Axera DDR-retention binary; the binary contents are not represented in the text patch.

general/package/axera-osdrv-ax620u/files/kmod/ax_ddr_retention.ko

ax_dma_hal.koAdd AX620U DMA HAL module +0/-0

Add AX620U DMA HAL module

• Adds the firmware-derived Axera DMA HAL binary; the binary contents are not represented in the text patch.

general/package/axera-osdrv-ax620u/files/kmod/ax_dma_hal.ko

ax_gdc.koAdd AX620U GDC module +0/-0

Add AX620U GDC module

• Adds the firmware-derived Axera GDC binary; the binary contents are not represented in the text patch.

general/package/axera-osdrv-ax620u/files/kmod/ax_gdc.ko

ax_hwinfo.koAdd AX620U hardware-info module +0/-0

Add AX620U hardware-info module

• Adds the firmware-derived Axera hardware-info binary; the binary contents are not represented in the text patch.

general/package/axera-osdrv-ax620u/files/kmod/ax_hwinfo.ko

ax_ives.koAdd AX620U IVES module +0/-0

Add AX620U IVES module

• Adds the firmware-derived Axera IVES binary; the binary contents are not represented in the text patch.

general/package/axera-osdrv-ax620u/files/kmod/ax_ives.ko

ax_ivps.koAdd AX620U IVPS module +0/-0

Add AX620U IVPS module

• Adds the firmware-derived Axera image-processing binary; the binary contents are not represented in the text patch.

general/package/axera-osdrv-ax620u/files/kmod/ax_ivps.ko

ax_jenc.koAdd AX620U JPEG encoder module +0/-0

Add AX620U JPEG encoder module

• Adds the firmware-derived Axera JPEG encoder binary; the binary contents are not represented in the text patch.

general/package/axera-osdrv-ax620u/files/kmod/ax_jenc.ko

ax_logctl.koAdd AX620U logging-control module +0/-0

Add AX620U logging-control module

• Adds the firmware-derived Axera logging-control binary; the binary contents are not represented in the text patch.

general/package/axera-osdrv-ax620u/files/kmod/ax_logctl.ko

ax_mipi.koAdd AX620U MIPI module +0/-0

Add AX620U MIPI module

• Adds the firmware-derived AX620U-specific Axera MIPI binary; the binary contents are not represented in the text patch.

general/package/axera-osdrv-ax620u/files/kmod/ax_mipi.ko

ax_npu.koAdd AX620U NPU module +0/-0

Add AX620U NPU module

• Adds the firmware-derived Axera NPU binary; the binary contents are not represented in the text patch.

general/package/axera-osdrv-ax620u/files/kmod/ax_npu.ko

ax_osal.koAdd AX620U OSAL module +0/-0

Add AX620U OSAL module

• Adds the firmware-derived Axera OSAL foundation binary; the binary contents are not represented in the text patch.

general/package/axera-osdrv-ax620u/files/kmod/ax_osal.ko

ax_pcal6416a.koAdd AX620U PCAL6416A module +0/-0

Add AX620U PCAL6416A module

• Adds the firmware-derived Axera PCAL6416A peripheral binary; the binary contents are not represented in the text patch.

general/package/axera-osdrv-ax620u/files/kmod/ax_pcal6416a.ko

ax_pool.koAdd AX620U memory-pool module +0/-0

Add AX620U memory-pool module

• Adds the firmware-derived Axera pool binary; the binary contents are not represented in the text patch.

general/package/axera-osdrv-ax620u/files/kmod/ax_pool.ko

ax_proton.koAdd AX620U ISP module +0/-0

Add AX620U ISP module

• Adds the firmware-derived Axera ISP binary; the binary contents are not represented in the text patch.

general/package/axera-osdrv-ax620u/files/kmod/ax_proton.ko

ax_rtc.koAdd AX620U RTC module +0/-0

Add AX620U RTC module

• Adds the firmware-derived Axera RTC binary; the binary contents are not represented in the text patch.

general/package/axera-osdrv-ax620u/files/kmod/ax_rtc.ko

ax_sdio_host.koAdd AX620U SDIO-host module +0/-0

Add AX620U SDIO-host module

• Adds the firmware-derived Axera SDIO-host binary; the binary contents are not represented in the text patch.

general/package/axera-osdrv-ax620u/files/kmod/ax_sdio_host.ko

ax_sys.koAdd AX620U system module +0/-0

Add AX620U system module

• Adds the firmware-derived Axera system binary; the binary contents are not represented in the text patch.

general/package/axera-osdrv-ax620u/files/kmod/ax_sys.ko

ax_vdec.koAdd AX620U video-decoder module +0/-0

Add AX620U video-decoder module

• Adds the firmware-derived Axera video-decoder binary; the binary contents are not represented in the text patch.

general/package/axera-osdrv-ax620u/files/kmod/ax_vdec.ko

ax_venc.koAdd AX620U video-encoder module +0/-0

Add AX620U video-encoder module

• Adds the firmware-derived Axera video-encoder binary; the binary contents are not represented in the text patch.

general/package/axera-osdrv-ax620u/files/kmod/ax_venc.ko

ax_vo.koAdd AX620U video-output module +0/-0

Add AX620U video-output module

• Adds the firmware-derived Axera video-output binary; the binary contents are not represented in the text patch.

general/package/axera-osdrv-ax620u/files/kmod/ax_vo.ko

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

qodo-free-for-open-source-projects Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

Code Review by Qodo

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

Grey Divider


Action required

1. New camera boards never enter CI ✓ Resolved
Description
The PR adds AX620E and AX620U board directories and four defconfigs without adding either family to
the CI board list or the documented unbuilt-family exclusions. The matrix self-test therefore
reports the new family as unaccounted for, and its images are not covered by the standard build
matrix.

2. AX620E and AX620U lack boot evidence 📘 Rule violation ☼ Reliability
Description
The PR test plan leaves the full Buildroot builds and flash/boot checks unchecked, while the added
board configurations and vendor modules change the firmware produced for both camera families. The
README evidence only reports kernel artifacts, so no real-camera output demonstrates that either
image boots and streams.
Code

br-ext-chip-axera/board/ax620e/README.md[R3-5]

+Status: `ax620e.lite.config` is the real working config from the
+`axera-ax620e` kernel branch (openipc-linux-ax620e, branch
+`axera-ax620e`) -- builds clean, produces a real `Image` + devicetree.
Evidence
The PR description explicitly leaves the full Buildroot build and flash/boot test boxes unchecked.
The changed board READMEs document only that kernel artifacts build, which does not provide the
required real-camera boot and streaming evidence for a firmware-changing PR.

Rule 3: Hardware evidence is present and honest
br-ext-chip-axera/board/ax620e/README.md[3-5]
br-ext-chip-axera/board/ax620u/README.md[3-5]

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 description leaves the full image builds and flash/boot checks unchecked and provides no real-camera boot or streaming output for the new firmware targets.
## Fix Focus Areas
- br-ext-chip-axera/board/ax620e/README.md[3-11]
- br-ext-chip-axera/board/ax620u/README.md[3-13]
## Recommended Fix
Build both lite images end to end, flash each image to the affected camera, and update the PR evidence with before/after boot logs, kernel messages, and streaming results naming the tested AX620E and AX620U boards.

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


3. Unbuildable driver binaries enter firmware 📘 Rule violation ⚙ Maintainability
Description
The AX620E and AX620U osdrv packages install committed kernel modules from files/kmod/ that their
READMEs identify as extracted from deployed firmware, with no public source or documented vendor
release from which to build them. Because both images depend on these binaries, clean builds cannot
reproduce the drivers and future kernel updates cannot rebuild or validate them; the supplied diff
also does not expose the blobs’ contents for review.
Code

general/package/axera-osdrv-ax620e/axera-osdrv-ax620e.mk[R11-15]

+define AXERA_OSDRV_AX620E_INSTALL_TARGET_CMDS
+	$(INSTALL) -m 755 -d $(TARGET_DIR)/lib/modules/5.15.73/axera
+	$(INSTALL) -m 644 -t $(TARGET_DIR)/lib/modules/5.15.73/axera $(AXERA_OSDRV_AX620E_PKGDIR)/files/kmod/*
+
+	$(INSTALL) -m 755 -t $(TARGET_DIR)/usr/bin $(AXERA_OSDRV_AX620E_PKGDIR)/files/script/load_axera
Evidence
Both package makefiles copy the committed .ko files into their target images, and the added module
files confirm that binaries are being shipped. The READMEs identify files/kmod/ as binaries pulled
from deployed firmware and state that no public source exists, establishing why the installed
drivers lack a rebuildable source.

Rule 6: No binaries without a buildable source
general/package/axera-osdrv-ax620e/axera-osdrv-ax620e.mk[11-15]
general/package/axera-osdrv-ax620e/README.md[12-25]
general/package/axera-osdrv-ax620u/README.md[20-29]
general/package/axera-osdrv-ax620e/axera-osdrv-ax620e.mk[11-13]
general/package/axera-osdrv-ax620u/axera-osdrv-ax620u.mk[11-13]
CLAUDE.md: Do Not Add Unbuildable Binaries or Extracted Vendor Code: CLAUDE.md: Do Not Add Unbuildable Binaries or Extracted Vendor Code: CLAUDE.md: Do Not Add Unbuildable Binaries or Extracted Vendor Code: CLAUDE.md: Do Not Add Unbuildable Binaries or Extracted Vendor Code: CLAUDE.md: Do Not Add Unbuildable Binaries or Extracted Vendor Code: CLAUDE.md: Do Not Add Unbuildable Binaries or Extracted Vendor Code: CLAUDE.md: Do Not Add Unbuildable Binaries or Extracted Vendor Code: CLAUDE.md: Do Not Add Unbuildable Binaries or Extracted Vendor Code: CLAUDE.md: Do Not Add Unbuildable Binaries or Extracted Vendor Code: CLAUDE.md: Do Not Add Unbuildable Binaries or Extracted Vendor Code: CLAUDE.md: Do Not Add Unbuildable Binaries or Extracted Vendor Code: CLAUDE.md: Do Not Add Unbuildable Binaries or Extracted Vendor Code: CLAUDE.md: Do Not Add Unbuildable Binaries or Extracted Vendor Code: CLAUDE.md: Do Not Add Unbuildable Binaries or Extracted Vendor Code: CLAUDE.md: Do Not Add Unbuildable Binaries or Extracted Vendor Code: CLAUDE.md: Do Not Add Unbuildable Binaries or Extracted Vendor Code: CLAUDE.md: Do Not Add Unbuildable Binaries or Extracted Vendor Code: CLAUDE.md: Do Not Add Unbuildable Binaries or Extracted Vendor Code: CLAUDE.md: Do Not Add Unbuildable Binaries or Extracted Vendor Code: CLAUDE.md: Do Not Add Unbuildable Binaries or Extracted Vendor Code: CLAUDE.md: Do Not Add Unbuildable Binaries or Extracted Vendor Code: CLAUDE.md: Do Not Add Unbuildable Binaries or Extracted Vendor Code: CLAUDE.md: Do Not Add Unbuildable Binaries or Extracted Vendor Code: CLAUDE.md: Do Not Add Unbuildable Binaries or Extracted Vendor Code: CLAUDE.md: Do Not Add Unbuildable Binaries or Extracted Vendor Code: CLAUDE.md: Do Not Add Unbuildable Binaries or Extracted Vendor Code: CLAUDE.md: Do Not Add Unbuildable Binaries or Extracted Vendor Code: CLAUDE.md: Do Not Add Unbuildable Binaries or Extracted Vendor Code: CLAUDE.md: Do Not Add Unbuildable Binaries or Extracted Vendor Code: CLAUDE.md: Do Not Add Unbuildable Binaries or Extracted Vendor Code: CLAUDE.md: Do Not Add Unbuildable Binaries or Extracted Vendor Code: CLAUDE.md: Do Not Add Unbuildable Binaries or Extracted Vendor Code: CLAUDE.md: Do Not Add Unbuildable Binaries or Extracted Vendor Code: CLAUDE.md: Do Not Add Unbuildable Binaries or Extracted Vendor Code: CLAUDE.md: Do Not Add Unbuildable Binaries or Extracted Vendor Code: CLAUDE.md: Do Not Add Unbuildable Binaries or Extracted Vendor Code: CLAUDE.md: Do Not Add Unbuildable Binaries or Extracted Vendor Code: CLAUDE.md: Do Not Add Unbuildable Binaries or Extracted Vendor Code: CLAUDE.md: Do Not Add Unbuildable Binaries or Extracted Vendor Code: CLAUDE.md: Do Not Add Unbuildable Binaries or Extracted Vendor Code: CLAUDE.md: Do Not Add Unbuildable Binaries or Extracted Vendor Code: CLAUDE.md: Do Not Add Unbuildable Binaries or Extracted Vendor Code: CLAUDE.md: Do Not Add Unbuildable Binaries or Extracted Vendor Code: CLAUDE.md: Do Not Add Unbuildable Binaries or Extracted Vendor Code: CLAUDE.md: Do Not Add Unbuildable Binaries or Extracted Vendor Code: CLAUDE.md: Do Not Add Unbuildable Binaries or Extracted Vendor Code: CLAUDE.md: Do Not Add Unbuildable Binaries or Extracted Vendor Code: CLAUDE.md: Do Not Add Unbuildable Binaries or Extracted Vendor Code: CLAUDE.md: Do Not Add Unbuildable Binaries or Extracted Vendor Code: CLAUDE.md: Do Not Add Unbuildable Binaries or Extracted Vendor Code: CLAUDE.md: Do Not Add Unbuildable Binaries or Extracted Vendor Code: CLAUDE.md: Do Not Add Unbuildable Binaries or Extracted Vendor Code: CLAUDE.md: Do Not Add Unbuildable Binaries or Extracted Vendor Code: CLAUDE.md: Do Not Add Unbuildable Binaries or Extracted Vendor Code: CLAUDE.md: Do Not Add Unbuildable Binaries or Extracted Vendor Code: CLAUDE.md: Do Not Add Unbuildable Binaries or Extracted Vendor Code: CLAUDE.md: Do Not Add Unbuildable Binaries or Extracted Vendor Code: CLAUDE.md: Do Not Add Unbuildable Binaries or Extracted Vendor Code: CLAUDE.md: Do Not Add Unbuildable Binaries or Extracted Vendor Code: CLAUDE.md: Do Not Add Unbuildable Binaries or Extracted Vendor Code: CLAUDE.md: Do Not Add Unbuildable Binaries or Extracted Vendor Code: CLAUDE.md: Do Not Add Unbuildable Binaries or Extracted Vendor Code: CLAUDE.md: Do Not Add Unbuildable Binaries or Extracted Vendor Code: CLAUDE.md: Do Not Add Unbuildable Binaries or Extracted Vendor Code
general/package/axera-osdrv-ax620e/README.md[14-25]
Best Practice: Repository guidelines

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 AX620E and AX620U osdrv packages ship firmware-extracted kernel modules with no public source or documented buildable provenance. The drivers cannot be reproduced from a clean build or rebuilt and validated for future kernel updates.
## Fix Focus Areas
- general/package/axera-osdrv-ax620e/axera-osdrv-ax620e.mk[11-15]
- general/package/axera-osdrv-ax620u/axera-osdrv-ax620u.mk[11-15]
- general/package/axera-osdrv-ax620e/README.md[12-25]
- general/package/axera-osdrv-ax620u/README.md[20-29]
- general/package/axera-osdrv-ax620e/files/kmod/ax_sys.ko[1-1]
- general/package/axera-osdrv-ax620u/files/kmod/ax_sys.ko[1-1]
## Recommended Fix
Replace the extracted `.ko` files with modules built from a documented, maintainable vendor SDK release or buildable vendor or community source tree. Record the exact source version and build inputs needed to reproduce them and maintain their kernel integration. If buildable provenance cannot be obtained, do not ship the extracted binaries in the firmware packages.

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


View action required (10)
4. Modules can fail to load dependencies ✓ Resolved
Description
Both load_axera scripts call insmod on absolute .ko paths rather than using
dependency-resolving modprobe calls. If a dependency is another kernel module or the
hand-maintained load order diverges from module metadata, the Axera driver stack can fail to
initialize while the scripts continue loading the remaining modules.

5. AX620E firmware packaging lacks a kernel ✓ Resolved
Description
ax620e_lite_defconfig selects Image but provides neither a uImage nor the post-image script and
load address that would create one. The repository's NOR repack path packages uImage, so a build
reaching that step has no kernel artifact to include.

6. AX620E cannot mount its root filesystem ✓ Resolved
Description
ax620e.lite.config disables CONFIG_SQUASHFS_XZ while the lite defconfig builds an XZ-compressed
SquashFS image. A kernel booting from that image cannot decompress the filesystem, regardless of
whether the missing uImage packaging is fixed.

7. AX620E boots without a writable overlay 🐞 Bug ≡ Correctness
Description
ax620e.lite.config builds overlayfs as a module, but /init checks /proc/filesystems for
overlay support before the normal module-loading init scripts run. When that check finds no loaded
overlayfs, /init exits before mounting the writable root overlay.
Code

br-ext-chip-axera/board/ax620e/ax620e.lite.config[8450]

+CONFIG_OVERLAY_FS=m
Evidence
Early initialization requires overlayfs immediately; the module loader is part of the later
init-script sequence.

br-ext-chip-axera/board/ax620e/ax620e.lite.config[8450-8450]
general/overlay/init[157-159]
general/overlay/etc/init.d/rcS[19-25]
general/overlay/etc/init.d/S35modules[5-19]

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 early root initialization checks for overlayfs before modules are loaded.
## Fix Focus Areas
- br-ext-chip-axera/board/ax620e/ax620e.lite.config[8450-8450]
## Recommended Fix
Set CONFIG_OVERLAY_FS=y so overlayfs is available when /init checks /proc/filesystems.

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


8. AX620E settings cannot persist on flash ✓ Resolved

Resolving commit: befce01

Resolution reason
Enabled JFFS2 in the AX620E kernel config (CONFIG_JFFS2_FS=y with zlib and rtime compression, write
buffer, and xattr support), replacing the disabled setting the finding flagged.
Description
ax620e.lite.config disables JFFS2, the filesystem that /init mounts for its NOR rootfs_data
overlay. Once the boot's overlayfs issue is corrected, the normal NOR path still falls back to RAM
instead of persisting settings across reboots.

9. AX620U cannot load its camera drivers ✓ Resolved
Description
ax620u.lite.config disables CONFIG_MODULES, although the selected driver package installs .ko
files and load_axera invokes insmod for them. Every packaged AX620U driver load fails, including
the ISP and NPU modules.

10. AX620U has no usable flash root ✓ Resolved
Description
ax620u.lite.config disables MTD and has no SquashFS support, while the lite defconfig produces a
SquashFS flash root filesystem. The kernel cannot expose the flash partitions or mount the generated
root image, even after its module-loading issue is corrected.

11. AX620U exits early root initialization ✓ Resolved

Resolving commit: befce01

Resolution reason
The commit enables CONFIG_OVERLAY_FS=y (plus CONFIG_OVERLAY_FS_REDIRECT_ALWAYS_FOLLOW=y) in
ax620u.lite.config, so overlayfs is built into the kernel and /init's /proc/filesystems overlay
check can pass.
Description
ax620u.lite.config disables CONFIG_OVERLAY_FS, but /init requires overlay support in
/proc/filesystems before setting up the root filesystem. Even with working flash and SquashFS
drivers, that check exits before the normal writable-root setup.

12. AX620U loses flash probing and fallback ✓ Resolved
Description
ax620u.lite.config disables both sysfs and tmpfs, which /init uses for flash geometry checks and
its RAM-overlay fallback. If the other root-filesystem blockers are fixed, startup still cannot
perform those operations, and the shared GPIO and network helpers also lack their /sys interfaces.

13. Neither AX620 toolchain is published ✓ Resolved
Description
ax620e_lite_defconfig and ax620u_lite_defconfig download external toolchains whose new toolchain
configurations are absent from the curated toolchain workflow. Default workflow runs omit both
platforms, and its input validation rejects them when requested explicitly, leaving the firmware
builds without their configured release assets.


Remediation recommended

14. AX620U boot image omits its devicetree ✓ Resolved
Description
ax620u_lite_defconfig requests a uImage without selecting a DTB, and its kernel configuration
disables appended DTB support. The packaged kernel therefore contains no devicetree from the build,
despite the board's documented zImage-plus-devicetree boot requirement.

Grey Divider

Tip of the day
💡 Did you know, you can turn on the rule miner and Qodo learns your standards from review history

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

@openipc-ai

Copy link
Copy Markdown
Collaborator

The two toolchain configs from this PR are now in #2852, with your authorship kept, along with their CI registration. Once that merges, a toolchain.yml dispatch publishes toolchain.axera-ax620e and toolchain.axera-ax620u. That unblocks a majestic port, and every image here needs majestic first.

The rest stays here, because none of it can land yet:

  1. majestic has no Axera build. majestic.ax620e.lite.master.tar.bz2 and majestic.ax620u.lite.master.tar.bz2 return 403, so both lite defconfigs fail at download.
  2. The .ko files come from factory firmware (best_practices §2.4, the same shape as Gk7201v200 support #2234). The exception for vendor modules with no source anywhere needs evidence from a real camera: insmod, sensor probe, a stream. That hasn't run yet. The Xm*.ko modules are Xiongmai's per-model peripherals and belong in OpenIPC/builder.
  3. ax620u.lite.config has CONFIG_MODULES off, with no squashfs, MTD or overlayfs. The package's modules can't load and the rootfs can't mount.
  4. ax620e.lite.config has CONFIG_OVERLAY_FS=m and no JFFS2, so there's no writable overlay at boot.
  5. The axera-ax620e / axera-ax620u branches on OpenIPC/linux have no pull requests open against them yet.

Which cameras did the IVG-A6 (AX620E) and the OS04A10 (AX620U) dumps come from? That is the hardware the module evidence has to come from.

openipc-ai added a commit that referenced this pull request Nov 14, 2026
Cut from #2670: only the two toolchain configs, aarch64 musl with 5.15 headers for AX620E and armhf musl with 4.19 headers for AX620U. They are registered in ci-matrix as image-less configs and named in toolchain.yml, so a dispatch publishes toolchain.axera-ax620e and toolchain.axera-ax620u. The board images, osdrv packages and kernel configs stay in #2670 until a camera and a majestic build exist.

Co-authored-by: Dmitry Ermakov <7954832+dimerr@users.noreply.github.com>
openipc-ai and others added 12 commits November 18, 2026 18:53
- uImage of a multiplatform ARM kernel needs LOADADDR: 0x40008000, the
  vendor FIT's own kernel load address (build failed: 'multiple (or no)
  load addresses').
- build ax620u.dtb in-tree; nothing else produces the devicetree the
  kernel cannot boot without.
- libcurl-openipc: the lite set every other lite board uses; with
  EXTRA_PROTOCOLS_FEATURES left at its default, configure fails
  ('couldn't detect the LDAP libraries').
- majestic: majestic.ax620u.lite.master.tar.bz2 does not exist (403),
  the download aborts the build.
ax_cmm without cmmpool= has no media memory at all; the stock loader
(/usr/lib/modules/Load_AX620U) passes anonymous,0,<0x40000000+osmem>,
<total-osmem>. Follow its order, take osmem from mem= and totalmem from
the env (stock defaults 87M/256M), load the Xm* helpers the stock
loadpublic loads, and leave out ax_audio and ax_pcal6416a, which oops
in probe on the OpenIPC kernel (vendor struct layouts) and stall all
CPUs. Verified in QEMU: 25 modules load from S70vendor at boot.
The near-allnoconfig config had no CONFIG_MODULES (the vendor modules
cannot load at all), no networking, no sysfs/tmpfs, no MTD/SPI/UBI/
squashfs (no root filesystem), no 8250_dw, and Thumb-2 + PREEMPT_NONE
where the vendor modules' vermagic is 'SMP preempt mod_unload ARMv7'.
This adds those plus what the closed modules import (HIGHMEM,
STACKPROTECTOR, DMA engine/virt-dma, ASoC, MMC/SDIO, pinctrl, debugfs,
kernel-mode NEON) and CONFIG_AXERA_AX620U_COMPAT from the companion
kernel patch.
- Kernel: OpenIPC/linux axera-ax620u rebased on Axera's SDK kernel
  (4.19.125 + Axera BSP + AX620U support); ax620u.lite.config is the
  stock camera kernel's own config on that tree, so the stock modules
  load unchanged. zImage + ax620u.dtb.
- Layout as on the other NAND boards: one UBI partition with rootfs
  (UBIFS, kernel inside as /boot/fitImage from nand-fit.its) and
  rootfs_data (autoresize); ubinize-nand.cfg; package fitImage,
  rootfs.ubifs, rootfs.ubi (openipc.ax620u-nand-lite.tgz).
  mtdparts spi4.0_nand:1024k(spl),1536k(boot),512k(env),-(ubi): the
  vendor SPL keeps the first 1 MiB and loads U-Boot from 0x100000.
- Booted by OpenIPC's AX620U U-Boot (u-boot branch openipc-ax620u).
- mknand.py: whole-flash image (vendor SPL + U-Boot + rootfs.ubi).
On the SDK-based kernel their struct layouts match the vendor kernel's:
all 28 load in the stock order (loadpublic: XmCommon, XmDemux, XmGpio;
Load_AX620U; XmGpioI2c), XmIrCut last.
ipcinfo -v answers "axera" (devicetree root compatible, axera,ax620x is
AX620U) instead of "generic". Carried as a package patch until ipctool
has it.
- majestic: there is no majestic.ax620e.lite.master.tar.bz2 on the
  release bucket (S3 answers AccessDenied, i.e. no such key; the
  gk7205v200/t31 ones answer 206), so the download step stops the build.
  Leave it out until an Axera majestic exists.
- libcurl-openipc: EXTRA_PROTOCOLS_FEATURES defaults to y and turns on
  --enable-ldap, whose configure fails ("couldn't detect the LDAP
  libraries"). Use the libcurl lines every other lite board carries.
The config was arm64 defconfig plus ARCH_AXERA: every other ARM64
platform (Tegra, QCOM, Rockchip, ...), 715 modules (47 MB in the rootfs),
a 33.8 MB Image -- 4x the 16 MB flash before the rootfs.

Drop the foreign ARCH_* platforms, PCI, DRM, sound, KVM, debug info and
all modules; build in what the NOR camera needs to boot from flash:
SPI_DESIGNWARE + SPI_DW_MMIO (the boot NOR), MTD_CMDLINE_PARTS (U-Boot
passes mtdparts=), SQUASHFS_XZ (the rootfs is xz squashfs, it was off),
JFFS2_FS and OVERLAY_FS (rootfs_data overlay), STMMAC + DWMAC_GENERIC
(the EMAC). CC_OPTIMIZE_FOR_SIZE. Image 12.3 MB, 3.6 MB as LZMA.
vermagic stays "5.15.73 SMP preempt mod_unload aarch64" (PREEMPT,
MODULE_UNLOAD, no MODVERSIONS), which the vendor .ko require.
busybox insmod resolves no dependencies, and the order here broke four
of them (modinfo depends=): ax_pool needs ax_cmm, ax_vpp needs ax_ivps,
ax_gdc needs ax_ivps and ax_vpp, ax_tdp needs ax_vo. ax_cmm also needs
cmmpool=: without it there is no pool for anything above it.

Follow the stock IVG-A6 firmware instead (/usr/lib/modules/Load_AX620E
and /usr/etc/loadpublic): XmCommon/XmDemux/XmGpio first, then sys, cmm
(cmmpool=anonymous,0,<0x40000000 + mem=>,<totalmem - mem=>M), pool,
base, npu, vo, ivps, vpp, gdc, tdp, venc, jenc, mipi_rx, proton, audio,
vdec, then XmGpioI2c/XmIrCut. totalmem comes from the U-Boot env
(default 256M, the stock script's TOTAL_MEM). -r unloads, -a reloads,
anything else (S70vendor passes -i) loads.
The board built no DTB at all, and the only one in the kernel branch is
ax630c.dts, a NanoKVM-Pro HDMI box (LT6911, JD9853 panel, RGMII PHY).
The ax620e.dtsi has no node for the boot SPI NOR. repack then failed:
there is no images/uImage.

ax620e-xm-ipc.dts, from the stock IVG-A6 firmware's own DT:
- the SPI NOR at 0x1a00000 (CS GPIO2_29, jedec,spi-nor);
- internal EPHY over RMII (ethernet-phy-id0044.1400), resets dropped
  (no reset-controller driver in the kernel branch yet: the probe would
  defer forever);
- spin-table SMP at 0x23400dc and no PSCI node: this NOR profile has
  no ATF (SPL -> DDRINIT -> U-Boot), nothing answers an SMC;
- 256 MB at 0x40000000; U-Boot passes mem= (osmem), the rest is CMM.

Image: the split NOR layout (post-image-split.sh) at 0x60000, after the
vendor spl (64K) + U-Boot (256K) + env (64K). Two fixes there for arm64:
- LZMA: this U-Boot's bootm has no gunzip ("Unimplemented compression
  type 1"); BR2_OPENIPC_ARM64_UIMAGE_COMP selects lzma (default gzip).
- the multi-file format pads parts to 4 bytes, so the DTB can land on a
  4-byte boundary; with fdt_high=0xffffffffffffffff (this U-Boot) it is
  booted in place and arm64 Linux spins in setup_arch on the misaligned
  FDT with no output. Pad the empty cpio to put the DTB on 8 bytes.

Kernel read size 6M: the uImage is 3.6M; U-Boot reads what its env says.

Verified in qemu-bench -M ax620e (flash-file= of the IVG-A6 dump with
this firmware.bin at 0x60000): U-Boot loads, LZMA-unpacks and boots the
kernel; both CPUs come up via spin-table.
The kernel branch now carries Axera's SDK drivers ported to 5.15.73
(clocks, pinctrl, GPIO, resets, the vendor SPI NOR driver + AX_DMAPER,
EQOS + EPHY, watchdog reboot, the built-in OSAL with /proc/ax_proc,
hwinfo/os_mem/hrtimer) and the Xiongmai IVG-A6 devicetree,
axera/ax620e-xm-ipc.dts, rebuilt from the stock camera's own DT. Use
both; the board-dir DTS (a cut-down copy that had to drop the resets)
goes.

ax620e.lite.config is the branch's ax620e_xm_ipc_defconfig: HZ=100,
SMP, PREEMPT, KPROBES, unload, no modversions, as the closed ax_*.ko
need; squashfs xz + jffs2 (xattr) + overlay on 64 KiB-erase MTD named
spi_nor.0 (the label the vendor kernel and its mtdparts= use).

Verified in qemu -M ax620e from the stock U-Boot (env from flash): both
CPUs (spin-table), root from NOR through the vendor SPI driver, jffs2
overlay, DHCP and dropbear, S70vendor -> load_axera loads all 21 vendor
modules with no oops (ax_vdec fails its probe on QEMU's missing decoder,
as the stock firmware does), reboot through the watchdog.

For a local kernel tree: make BOARD=ax620e_lite LINUX_OVERRIDE_SRCDIR=...
ipcinfo -v printed "unknown" on Axera boards, so S70vendor never ran
load_axera. Detect the SoC from the root compatible (axera,ax620e;
AX620U's devicetree says axera,ax620x) on both the 32-bit (AX620U) and
the 64-bit (AX620E/AX630C) builds, and look for the sensor on the bus
the boards use: i2c6 on the AX620E IPC (SC450AI at 0x30), i2c8 on
AX620U. Build only that HAL into libipchw for the axera family.
Kernel 2M @0x50000 and rootfs 5M @0x250000 instead of the Xiongmai
boot area's 0x60000: the board boots with OpenIPC's own U-Boot for it
(the SDK U-Boot 2020.04, openipc_ax620e_nor_defconfig) behind the vendor
SPL, which leaves boot 256K and env @0x40000 as on every OpenIPC NOR
camera. The camera kernel drops KALLSYMS_ALL and IKCONFIG to keep the
LZMA uImage (with its 137K devicetree) inside the 2M kernel slot, and
gains /dev/mem for the vendor user-space libraries.

Verified in qemu -M ax620e: vendor SPL -> OpenIPC U-Boot (first-start
env save) -> kernel on both CPUs -> squashfs + jffs2 overlay, DHCP,
load_axera with all 21 modules, fw_setenv extras reaching the next boot's
command line through U-Boot, reboot via the watchdog.
The AX620E patch covers AX620U too (axera,ax620x maps to ax620u); the
AX620U-only copy would fail to apply on top of it. Carried until
OpenIPC/ipctool#290 is in a release.
@dimerr dimerr changed the title axera: AX620E and AX620U chip family (br-ext-chip-axera) axera: AX620E and AX620U on OpenIPC's kernel, U-Boot and flash layouts Nov 18, 2026
ax620e_lite ships OpenIPC's fixed NOR slots (kernel 2M @0x50000, rootfs
@0x250000) and its kernel has no mtdsplit, so post-image-split.sh's guard
(from master) rightly refuses it. Move the arm64 multi-file uImage step into
post-image-arm64-uimage.sh, which post-image-split.sh still runs first, and
point ax620e_lite at it alone: the build now packages uImage and
rootfs.squashfs as openipc.ax620e-nor-lite.tgz instead of a -split firmware.bin
the kernel could not have booted.
ax620e_lite and ax620u_lite build against the kernels in OpenIPC/linux#259
and #260; the axera-ax620e/u branch tarballs CI downloads do not have them
yet. List both boards in UNBUILT_BOARDS with that reason, their board
directories in UNBUILT_FAMILIES and their osdrv packages in NOT_BUILT, so
--self-test passes; they move into ALL_BOARDS once the kernels merge.
The modules sit under /lib/modules/<release>/axera, where Buildroot's depmod
indexes them (21 and 28 entries in modules.dep), so load_axera now uses
modprobe by module name. The stock order stays: ax_cmm has to be loaded
with its cmmpool= before anything that depends on it. A failed load is
logged and makes load_axera return non-zero.

The READMEs state where the binaries come from, the vermagic and kernel
config they bind to, and their declared licences.
Every NUL-separated compatible entry is read, the HAL is registered once
under an __arm__/__aarch64__ guard, chip_generation is documented as 0.
Diffed against the merge base e2ebc24; applies to ipctool master.
@dimerr

dimerr commented Nov 18, 2026

Copy link
Copy Markdown
Collaborator Author

Thanks for the review. Pushed a188e58..837f87c (master merged in first, so #2852's toolchain configs and toolchain.yml entries are now in the branch). Per finding:

  1. Boards not in CI. ax620e_lite/ax620u_lite are now listed in UNBUILT_BOARDS with the reason, their board dirs in UNBUILT_FAMILIES, and both osdrv packages in NOT_BUILT (fafd9d4). ci-matrix.py --self-test passes. They aren't in ALL_BOARDS yet because the build downloads the axera-ax620e/axera-ax620u branches of OpenIPC/linux, and those don't have the kernels from axera: AX620E camera support on 5.15.73, ported from Axera's SDK kernel linux#259/Uboot-env integration in Busybox #260 yet (no axera/ax620e-xm-ipc DT, for one). Building them now would fail for that reason alone. Same pattern as ak3918av100_lite: they move into ALL_BOARDS once those kernels merge.
  2. Boot evidence. Both images were rebuilt at 837f87c and booted in qemu-bench from whole-flash images (vendor SPL + OpenIPC U-Boot + build output). Each board README now has a Tested section, and the PR test plan is updated with these results: root on squashfs+jffs2 (E) / UBIFS (U), overlay persists across a reboot, login works, ipcinfo -v/-c/-f, and all 21/28 vendor modules load with no failures and no oops. These runs are QEMU only. No real camera has run these images yet, and the README and PR say so.
  3. Vendor .ko binaries. These are Axera's binary-only media drivers (ISP, NPU, encoders, CMM), copied unmodified from the stock firmware of the cameras the boards target. No source is available at any kernel version. Other vendors' osdrv packages in this tree work the same way, e.g. hisilicon-osdrv-hi3516ev200 (44 .ko), goke-osdrv-gk7205v200 (39), sigmastar-osdrv-infinity6e (14), novatek-osdrv-nt9856x (136), xiongmai-osdrv-xm530v200 (92): the kernel builds from source, and the vendor's media modules are pinned to it. Both package READMEs now list the provenance, the exact vermagic (5.15.73 SMP preempt mod_unload aarch64 / 4.19.125 SMP preempt mod_unload ARMv7 p2v8), the kernel config they need, and the licences the modules declare (80420f3).
  4. insmod vs modprobe. Fixed (80420f3). The modules install under /lib/modules/<release>/axera, and Buildroot's target-finalize depmod indexes them (21 and 28 axera/ entries in modules.dep), so load_axera now calls modprobe <name>. The explicit order stays for one reason: ax_cmm has to be loaded first with its cmmpool=, or modprobe would load it as a dependency without the pool. A failed load is logged and load_axera returns non-zero.
    7, 8, 11, 12. Kernel configs. Already fixed in 9f7431e / d0b582c, and these are the configs the defconfigs build with: AX620E has OVERLAY_FS=y and JFFS2_FS=y, AX620U has OVERLAY_FS=y, SYSFS=y and TMPFS=y. The QEMU boots above mount jffs2 / UBIFS rootfs_data under overlayfs from /init.
  5. Toolchains. These came in with axera: toolchain-only configs for AX620E and AX620U #2852, which this branch now has: toolchain.yml lists ax620e_toolchain / ax620u_toolchain, and toolchain.axera-ax620e.tgz / toolchain.axera-ax620u.tgz are published under the toolchain release, matching the $(OPENIPC_TOOLCHAIN) URLs in both lite defconfigs.

Also in this push:

  • AX620E packaging (4013ffc). Master's new guard in post-image-split.sh refuses a kernel without mtdsplit, and AX620E's kernel has none. AX620E uses fixed NOR slots anyway, so the arm64 uImage step now lives in post-image-arm64-uimage.sh. post-image-split.sh still calls it, and ax620e_lite uses it on its own. The board now ships openipc.ax620e-nor-lite.tgz (uImage + rootfs) instead of a split firmware.bin its kernel couldn't boot.
  • ipctool patch (f7bc3d0). Regenerated from axera: an Axera HAL for the AX620E and AX620U ipctool#290 at e6386eb.

@dimerr

dimerr commented Nov 18, 2026 •

Copy link
Copy Markdown
Collaborator Author

Follow-up on the re-review at 837f87c (no new findings; 1, 4, 12, 13 resolved):

  • 7, 8, 11 cite ax620e.lite.config lines 8450 / 8516-8522 and ax620u.lite.config lines 1080-1084. At 837f87c, ax620e.lite.config is 2751 lines long, so those anchors come from the first commit's configs. The files the defconfigs build with have CONFIG_OVERLAY_FS=y (L2139) and CONFIG_JFFS2_FS=y (L2204) for AX620E, and CONFIG_OVERLAY_FS=y (L2901) for AX620U. In both QEMU boots /init mounts the overlay (jffs2 / UBIFS rootfs_data), and it persists across a reboot.
  • 2 cites README lines that were replaced: the old "Status" text is gone, and both board READMEs now have a Tested section. The remaining gap is real-camera boot and streaming. That is stated in the READMEs and the PR test plan. (The boards are out of the CI matrix for a separate reason: the kernels from linux#259/Uboot-env integration in Busybox #260 have not merged yet.)
  • 3 is a maintainer call. The modules are the SoC vendor's binary-only media stack, which is how every other vendor osdrv package in this tree ships. Provenance and kernel binding are now documented.

dimerr added a commit to OpenIPC/qemu-bench that referenced this pull request Nov 18, 2026
… env (#342)

The AX620E SPI-NOR model answers reads of the U-Boot env window with a
synthetic env (what the stock Xiongmai firmware needs to boot). OpenIPC
firmware, with its own U-Boot and 'fw_setenv', needs the env it wrote
to the flash file back. -global axera-spi-nor.env-from-flash=on serves
the flash contents there; off by default, so the stock dumps boot as
before. Used to boot OpenIPC's AX620E image (OpenIPC/firmware#2670).
Their kernels are on OpenIPC/linux axera-ax620e (#259) and axera-ax620u
(#260) now, and toolchain.axera-ax620{e,u} are published, so the images
build in CI like every other board: both join ALL_BOARDS, the axera
family and its osdrv packages leave the unbuilt lists, and ax620u_lite
(an all-in-UBI NAND image) joins SMOKE_BOARDS so the vendor has cover.
The ISP bins, sensor library and AI-ISP models the stock App runs each
camera's sensor with: SC450AI on the Xiongmai IVG-A6 (AX620E), OS04A10
on the JFtech IPC_AX620U_A8 (AX620U). Without a bin, AX_ISP_LoadBinParams
leaves the ISP on the sensor driver's defaults, so any streamer on these
cameras needs them.

Bins go to /etc/sensors, libsns_<sensor>.so to /usr/lib/sensors, as in
the other vendors' osdrv packages, filtered by BR2_OPENIPC_SNS_MODEL when
a board sets it. The bins and libsns name AI-ISP models by the stock
path /mnt/custom/ai_isp/<name>; the models go to /etc/sensors/ai_isp and
that path links there. AX620U (NAND) ships its three models; AX620E's
1.3 MB model (rootfs 2948 KB -> 4460 KB of the 5 MB NOR slot) is behind
BR2_PACKAGE_AXERA_OSDRV_AX620E_AI_ISP, off by default.
@dimerr

dimerr commented Nov 19, 2026

Copy link
Copy Markdown
Collaborator Author

aedb3ee adds the image tuning each camera's stock firmware runs its sensor with. Any streamer that drives Axera's ISP on these cameras needs it, not just the stock App: without a bin, AX_ISP_LoadBinParams leaves the ISP on the sensor driver's built-in defaults.

AX620E (Xiongmai IVG-A6, SC450AI) AX620U (JFtech IPC_AX620U_A8, OS04A10)
ISP bins → /etc/sensors/ sc450ai_{sdr,sdr_ONE,sdr_TWO,sdr_THREE,deepdark,hightemp}.bin os04a10_{sdr,deepdark}{,_ONE,_TWO,_THREE}.bin
sensor library → /usr/lib/sensors/ libsns_sc450ai.so libsns_os04a10.so
AI-ISP models → /etc/sensors/ai_isp/ 1 .axmodel (4.3 MB), behind BR2_PACKAGE_AXERA_OSDRV_AX620E_AI_ISP, off by default 3 .pro (880 KB), always
  • Install paths follow the other osdrv packages: tuning in /etc/sensors, libsns_* in /usr/lib/sensors, filtered by BR2_OPENIPC_SNS_MODEL when a board sets it.
  • The bins and libsns_*.so name AI-ISP models by their absolute stock path /mnt/custom/ai_isp/<name>, so that path is a link to /etc/sensors/ai_isp.
  • The AX620E model costs about 1.3 MB of xz squashfs (lite rootfs 2948 KB → 4460 KB in the 5 MB NOR slot), which would leave too little room for a streamer, so it is opt-in. The bins and the sensor library add about 110 KB.
  • Not included, because they are not tuning: the Xiongmai App's encrypted jsons//CustomConfig/, fonts and strings, and the res/ax_ai detection models.

The package READMEs give provenance, sizes and the stock-to-OpenIPC path mapping. Both boards were rebuilt with the kernels from OpenIPC/linux and booted in QEMU. The installed files have the stock md5s; libsns differs only by the .comment section that Buildroot's strip removes. All vendor modules still load (21/21 and 28/28). The test plan in the description has the details.

@dimerr

dimerr commented Nov 20, 2026

Copy link
Copy Markdown
Collaborator Author

Pushed aedb3ee..befce01. Master is merged in first, as a merge commit.

  • cf8baba ax620e_lite and ax620u_lite move from ALL_BOARDS and SMOKE_BOARDS to WEEKLY_BOARDS. The nightly builds them on Sundays only, next to v83x. The toolchain configs stay in UNBUILT_BOARDS, and their comment now points at the weekly boards.
  • 0bebcd8 ci-matrix.py: a widening pull request now also builds any weekly board it adds to the matrix. Before, the Axera boards would never have been built on this PR. Its diff touches general/Config.in and the post-image scripts, so it widens, and the widened PR matrix leaves out weekly boards. A pull request that changes only Axera files was already narrowed to the Axera boards. A self-test case covers the new rule.
  • befce01 Drops general/package/ipctool/0001-axera-hal-ax620e-ax620u.patch. ipctool#290 is merged as b1f0324. Since ipctool.mk builds HEAD, there is no pin to bump, and the patch no longer applies.

Matrix (--self-test ok, 134 boards):

  • Weekday nightly: 130 boards, without the Axera and v83x boards.
  • Sunday nightly: all 134.
  • This PR: 130 + ax620e_lite and ax620u_lite.

CI is green: 163 checks pass, including both Axera boards. The six ssc377/ssc378 boards no longer fail "size exceeded". #2910 fixed that on master, and it is merged in here.

@dimerr
dimerr merged commit 798e308 into master Nov 20, 2026
165 checks passed
@dimerr
dimerr deleted the axera branch November 20, 2026 09:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants