Skip to content

hisilicon-cv300: build 9 sensor drivers from source#2055

Merged
widgetii merged 1 commit into
masterfrom
sensor/cv300-source-built-sensors
May 5, 2026
Merged

hisilicon-cv300: build 9 sensor drivers from source#2055
widgetii merged 1 commit into
masterfrom
sensor/cv300-source-built-sensors

Conversation

@widgetii

@widgetii widgetii commented May 5, 2026

Copy link
Copy Markdown
Member

Summary

Adds HISILICON_OPENSDK_SENSORS_hi3516cv300 with 9 sensors — every cv300 sensor that has source in openhisilicon at the current pin (680085e): ar0237, jxf22, ov2718, ov2718_2a, sc2235, imx290, imx307, imx323, imx385.

This is the first PR in the series that needs an install-block edit: the cv300 INSTALL_TARGET_CMDS block in `hisilicon-opensdk.mk` was previously kernel-modules-only — no sensor install at all. This commit adds the same three-line sensor foreach that v101, cv500, and the generic `else` branch already use.

Deletes 2 binary blobs from `hisilicon-osdrv-hi3516cv300/files/sensor/` — the source-built libnames that exact-match a binary blob: `libsns_imx385.so`, `libsns_ov2718.so`.

Nine binary blobs with bus/signal-suffix variants stay (their libnames don't byte-match our source-built names): `ar0237_i2c_dc, imx291_i2c_lvds, imx307_i2c_mipi, imx323_i2c_dc, imx323_spi_dc, jxf22_i2c_dc, ov2735, sc2235p_i2c_dc, sc2310`.

Tracks OpenIPC/openhisilicon#82. Same shape (install-block + foreach) will apply to av100 and cv100.

Test plan

  • CI: `hi3516cv300_lite` build green
  • CI: QEMU boot smoke-test passes
  • Manual: spot-check a real cv300 camera once merged

🤖 Generated with Claude Code

Adds HISILICON_OPENSDK_SENSORS_hi3516cv300 with 9 sensors — every
cv300 sensor that has source in the openhisilicon repo at the
current pin (680085e):

  aptina_ar0237        omnivision_ov2718_2a    sony_imx307
  jx_f22               smartsens_sc2235        sony_imx323
  omnivision_ov2718    sony_imx290             sony_imx385

Wires the cv300 INSTALL_TARGET_CMDS block to install them via the
standard sensor foreach. The block was previously kernel-modules-
only (no sensor install at all), so this adds the same three
foreach lines already present in the v101, cv500, and generic
else branches.

Deletes 2 binary blobs from
general/package/hisilicon-osdrv-hi3516cv300/files/sensor/ — the
two source-built libnames that exact-match a binary blob:
  libsns_imx385.so    libsns_ov2718.so

The cv300 osdrv .mk uses files/sensor/*.so glob, so blob deletion
is sufficient — no osdrv .mk edit needed. Nine binary blobs with
bus/signal-suffix variants stay (their libnames don't byte-match
our source-built names, so no conflict):
  libsns_ar0237_i2c_dc.so       libsns_imx323_i2c_dc.so
  libsns_imx291_i2c_lvds.so     libsns_imx323_spi_dc.so
  libsns_imx307_i2c_mipi.so     libsns_jxf22_i2c_dc.so
  libsns_ov2735.so              libsns_sc2235p_i2c_dc.so
  libsns_sc2310.so

Tracks OpenIPC/openhisilicon#82. First PR in the series that adds
the install foreach to the chiparch-specific INSTALL_TARGET_CMDS
block (cv200/v101/cv500/ev200 already had it). Same shape will
apply to av100 and cv100.
@widgetii widgetii force-pushed the sensor/cv300-source-built-sensors branch from 589f931 to 20bd010 Compare May 5, 2026 17:27
@widgetii widgetii merged commit 2ac854e into master May 5, 2026
93 checks passed
@widgetii widgetii deleted the sensor/cv300-source-built-sensors branch May 5, 2026 17:28
widgetii added a commit to OpenIPC/openhisilicon that referenced this pull request May 6, 2026
…ITS (#84)

sony_imx323/imx323_sensor_ctl.c uses SPI_IOC_MESSAGE which expands
through <linux/spi/spidev.h>'s SPI_MSGSIZE macro to reference
_IOC_SIZEBITS. Under glibc, <sys/ioctl.h> transparently pulls in
<asm-generic/ioctl.h> where _IOC_SIZEBITS is defined; under musl,
it doesn't, breaking imx323 with:

  imx323_sensor_ctl.c:99:23: error: '_IOC_SIZEBITS' undeclared

Mirror the pattern that hi3516cv200/hi_spi.h already uses
(#include <linux/ioctl.h> at the top), so the macro is always
available regardless of libc. No-op under glibc.

Surfaced when OpenIPC/firmware#2055 wired cv300 source-built
sensors via HISILICON_OPENSDK_SENSORS_hi3516cv300; the sysupgraded
camera was missing libsns_imx323.so because the libraries Makefile
suppresses per-sensor failures with "|| true".

Co-authored-by: Vasiliy Yakovlev <vixand@openipc.org>
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.

1 participant