Skip to content

anyka: v4l-utils on every AK39 image - #2654

Merged
dimerr merged 1 commit into
masterfrom
anyka-v4l-utils
Oct 21, 2026
Merged

dimerr merged 1 commit into
masterfrom
anyka-v4l-utils

Conversation

@dimerr

@dimerr dimerr commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

The Anyka capture path (ak_camera, the open ISP host) and the EV200 encoder (ak-venc) are V4L2 devices, and the AK39 images ship no tool to list or set their formats and controls.

Changes

BR2_PACKAGE_LIBV4L=y and BR2_PACKAGE_LIBV4L_UTILS=y in every AK39 defconfig, as v83x_lite, v83x_ultimate and dm36x_lite already do.

ak3918av130_lite stays out: it is at 4608 KB of 5120, and v4l-utils with libstdc++ adds about 1190 KB.

Hardware tested on

No camera. Built locally and booted in the qemu-hisilicon emulator (ak3918ev200 machine), which has no sensor or 8290 encoder model, so there is no /dev/video0 there.

Evidence

ak3918ev200_lite, built locally with #2653's rda5995 pin:

before: - rootfs.squashfs: [3620KB/5120KB]
after:  - rootfs.squashfs: [4812KB/5120KB]

Installed: v4l2-ctl, media-ctl, v4l2-compliance, v4l2-sysfs-path, cec-*, ir-ctl, ir-keytable, rds-ctl, cx18-ctl, ivtv-ctl, decode_tm6000, the libv4l libraries and libstdc++.

ci-matrix.py --self-test passes.

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

The Anyka capture path and the EV200 encoder are V4L2 devices, and the
images had no tool to list or set their formats and controls. Enabled
as v83x and dm36x do. AV130 stays out: at 4608KB of 5120 it does not
fit v4l-utils and libstdc++.
@dimerr dimerr changed the title anyka: v4l2-ctl and media-ctl on every AK39 image, without the rest of v4l-utils anyka: v4l-utils on every AK39 image Oct 21, 2026
@dimerr
dimerr marked this pull request as ready for review October 21, 2026 14:58
@qodo-free-for-open-source-projects

Copy link
Copy Markdown

PR Summary by Qodo

Add V4L2 utilities to seven Anyka AK39 images

⚙️ Configuration changes ✨ Enhancement 🕐 10-20 Minutes

Grey Divider

AI Description

• Enable libv4l and V4L2 utilities in seven AK39 images to inspect camera and encoder devices.
• Leave AK3918AV130 unchanged because the additional packages would exceed its rootfs budget.
Diagram

graph TD
  Defconfigs["Anyka defconfigs"] --> Selection{"AV130 image?"} -->|No| Enabled["Seven AK39 configs"] --> Utilities["libv4l utilities"] --> Devices["V4L2 devices"]
  Selection -->|Yes| Excluded["AV130 unchanged"]
Loading
High-Level Assessment

Selecting the existing Buildroot packages directly in each eligible defconfig follows the repository's established pattern and keeps image contents explicit. A shared configuration fragment would add indirection for two settings; excluding AV130 respects its stated flash constraint.

Files changed (7) +14 / -0

Other (7) +14 / -0
ak3910_lite_defconfigInclude V4L2 tools in AK3910 lite +2/-0

Include V4L2 tools in AK3910 lite

• Selects libv4l and its utilities for the AK3910 lite image so V4L2 formats and controls can be inspected.

br-ext-chip-anyka/configs/ak3910_lite_defconfig

ak3916ev300_lite_defconfigInclude V4L2 tools in AK3916EV300 lite +2/-0

Include V4L2 tools in AK3916EV300 lite

• Selects libv4l and its utilities for the AK3916EV300 lite image.

br-ext-chip-anyka/configs/ak3916ev300_lite_defconfig

ak3918_lite_defconfigInclude V4L2 tools in AK3918 lite +2/-0

Include V4L2 tools in AK3918 lite

• Selects libv4l and its utilities for the AK3918 lite image.

br-ext-chip-anyka/configs/ak3918_lite_defconfig

ak3918ev200_lite_defconfigInclude V4L2 tools in AK3918EV200 lite +2/-0

Include V4L2 tools in AK3918EV200 lite

• Selects libv4l and its utilities for the AK3918EV200 lite image. The PR reports a local rootfs build within the 5120 KB limit.

br-ext-chip-anyka/configs/ak3918ev200_lite_defconfig

ak3918ev300_lite_defconfigInclude V4L2 tools in AK3918EV300 lite +2/-0

Include V4L2 tools in AK3918EV300 lite

• Selects libv4l and its utilities for the AK3918EV300 lite image.

br-ext-chip-anyka/configs/ak3918ev300_lite_defconfig

ak3918ev330_lite_defconfigInclude V4L2 tools in AK3918EV330 lite +2/-0

Include V4L2 tools in AK3918EV330 lite

• Selects libv4l and its utilities for the AK3918EV330 lite image.

br-ext-chip-anyka/configs/ak3918ev330_lite_defconfig

ak3918ev331_lite_defconfigInclude V4L2 tools in AK3918EV331 lite +2/-0

Include V4L2 tools in AK3918EV331 lite

• Selects libv4l and its utilities for the AK3918EV331 lite image.

br-ext-chip-anyka/configs/ak3918ev331_lite_defconfig

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

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

Copy link
Copy Markdown

Code Review by Qodo

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

Grey Divider


Action required

1. Camera images lack hardware testing 📘 Rule violation ☼ Reliability
Description
ak3918ev200_lite_defconfig enables both V4L2 packages. The PR says no camera was available and
only QEMU was booted, so the affected images lack real-camera boot or streaming evidence.
Code

br-ext-chip-anyka/configs/ak3918ev200_lite_defconfig[R30-31]

+BR2_PACKAGE_LIBV4L=y
+BR2_PACKAGE_LIBV4L_UTILS=y
Evidence
PR Compliance ID 3 requires real-camera evidence for changes that can alter firmware behavior. The
changed defconfig selects the V4L2 packages, while the PR description states that no camera was
available and testing was limited to QEMU without the relevant video devices.

Rule 3: Hardware evidence is present and honest
br-ext-chip-anyka/configs/ak3918ev200_lite_defconfig[30-31]

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 defconfig changes alter firmware images that can run on cameras, but the PR provides only QEMU evidence and explicitly states that no camera was tested.
## Fix Focus Areas
- br-ext-chip-anyka/configs/ak3918ev200_lite_defconfig[30-31]
## Recommended Fix
Boot an affected AK39 image on real camera hardware and provide before/after evidence for the relevant behavior, such as successful boot, V4L2 device discovery, format inspection, or streaming.

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


Grey Divider

Tip of the day
💡 Did you know, you can start a comment with 'qodo' or '@qodo' to chat about any finding

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

Comment on lines +30 to +31
BR2_PACKAGE_LIBV4L=y
BR2_PACKAGE_LIBV4L_UTILS=y

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Action required

1. Camera images lack hardware testing 📘 Rule violation ☼ Reliability

ak3918ev200_lite_defconfig enables both V4L2 packages. The PR says no camera was available and
only QEMU was booted, so the affected images lack real-camera boot or streaming evidence.
Agent Prompt
## Issue description
The defconfig changes alter firmware images that can run on cameras, but the PR provides only QEMU evidence and explicitly states that no camera was tested.

## Fix Focus Areas
- br-ext-chip-anyka/configs/ak3918ev200_lite_defconfig[30-31]

## Recommended Fix
Boot an affected AK39 image on real camera hardware and provide before/after evidence for the relevant behavior, such as successful boot, V4L2 device discovery, format inspection, or streaming.

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

@dimerr
dimerr merged commit 57ae948 into master Oct 21, 2026
41 of 46 checks passed
@dimerr
dimerr deleted the anyka-v4l-utils branch October 21, 2026 15:17
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.

1 participant