Skip to content

hisilicon-av100: build 14 sensor drivers from source#2056

Merged
widgetii merged 3 commits into
masterfrom
sensor/av100-source-built-sensors
May 7, 2026
Merged

hisilicon-av100: build 14 sensor drivers from source#2056
widgetii merged 3 commits into
masterfrom
sensor/av100-source-built-sensors

Conversation

@widgetii

@widgetii widgetii commented May 5, 2026

Copy link
Copy Markdown
Member

Summary

Adds `HISILICON_OPENSDK_SENSORS_hi3516av100` with 14 sensors — every av100 sensor that has source in openhisilicon: `ar0230, ar0237, ar0237_dc, ar0330, ov4689, ov5658, mn34220, mn34220_mipi, sc4236, imx117, imx123, imx178, imx178_37M, imx185`.

Wires the av100 `INSTALL_TARGET_CMDS` block to install them via the standard sensor `foreach` (block was previously kernel-modules-only).

Bumps openhisilicon pin `680085e → c895c26` to consume the av100 LIB_NAME rename (drops the `libsns_aptina_` / `libsns_sony_` / etc. vendor prefix that was unique to av100; the rename is in OpenIPC/openhisilicon#83). The pin bump also picks up two unrelated openhisilicon commits already on main:

  • `bad4243` openhisilicon#61 — hi3516cv500 kernel 5.0–7.0 compat
  • `3ccbffa` openhisilicon#81 — osal/cv500 default to "cma" allocator

This is the first firmware PR to consume those.

Deletes 9 binary blobs from `hisilicon-osdrv-hi3516av100/files/sensor/` — every source-built libname that exact-matches a binary blob (only possible after the openhisilicon rename): `libsns_ar0230.so, libsns_ar0237.so, libsns_ar0237_dc.so, libsns_ar0330.so, libsns_ov4689.so, libsns_ov5658.so, libsns_imx123.so, libsns_imx178.so, libsns_imx185.so`.

Twelve binary blobs without source counterparts stay (`ar0330_dc, imx122, imx224, imx225, imx290, imx291, imx291_dc, imx385, os05a10, ov2718, sc2310, sc5235`).

The av100 osdrv `.mk` uses `files/sensor/*.so` glob — blob deletion is sufficient. The `.ini` files in `files/sensor/config/` already reference unprefixed names (`DllFile=libsns_ar0237.so` etc.) so no `.ini` edits needed.

Tracks OpenIPC/openhisilicon#82.

⚠️ Draft until OpenIPC/openhisilicon#83 lands. The pin `c895c26` is the head of the unmerged openhisilicon branch. Once #83 merges, this PR will be force-pushed to bump the pin to the canonical main hash and marked ready for review.

Test plan

  • CI: `hi3516av100_lite` build green (after Change name of init script to S95{platform} #83 merges + pin bump)
  • CI: `hi3516cv500_lite`, `hi3516cv200_lite`, `hi3519v101_lite`, `hi3516cv300_lite`, `hi3516cv100_lite`, `hi3516ev200_lite`, `gk7205v200_lite` builds green (regression check on the pin bump)
  • Manual: spot-check a real av100 camera once merged

🤖 Generated with Claude Code

widgetii added a commit that referenced this pull request May 5, 2026
…fixes

CI on PR #2056 surfaced 4 build errors in 4 av100 sensor sources
that the libraries/Makefile's "|| true" had been hiding:

  sony_imx117  : Makefile missing -I kernel/pwm/hi3516av100
  sony_imx123  : hi_spi.h missing <sys/ioctl.h> (musl-only fail)
  sony_imx185  : same hi_spi.h issue
  smart_sc4236 : ported from V3 SDK, ISP_SNS_OBJ_S struct fields
                 (.pfnSetBusInfo/.pfnSetInit) and registration
                 callback signatures don't fit V2A ABI

Bump HISILICON_OPENSDK_VERSION c895c26 -> c897aee to consume the
fixes for the first three (OpenIPC/openhisilicon@c897aee, on
openhisilicon PR #83). They build clean under both glibc and musl.

Drop smart_sc4236 from HISILICON_OPENSDK_SENSORS_hi3516av100 — the
fix is non-trivial (re-port the source against V2A SDK conventions)
and shouldn't block the rest of the av100 wiring. Down from 14 to
13 source-built sensors. Will be re-added in a follow-up once the
source-side fix lands. The corresponding binary blob never existed
in hisilicon-osdrv-hi3516av100/files/sensor/, so this is purely a
SENSORS-list shrink — no install regressions.
@widgetii widgetii marked this pull request as ready for review May 5, 2026 17:24
widgetii added 2 commits May 7, 2026 17:15
Adds HISILICON_OPENSDK_SENSORS_hi3516av100 with 14 sensors — every
av100 sensor that has source in the openhisilicon repo:

  aptina_ar0230            panasonic_mn34220       sony_imx123
  aptina_ar0237            panasonic_mn34220_mipi  sony_imx178
  aptina_ar0237_dc         smart_sc4236            sony_imx178_37M
  aptina_ar0330            sony_imx117             sony_imx185
  omnivision_ov4689
  omnivision_ov5658

Wires the av100 INSTALL_TARGET_CMDS block to install them via the
standard sensor foreach. The block was previously kernel-modules-
only (no sensor install at all).

Bumps openhisilicon pin from 680085e to c895c26 to consume the
av100 LIB_NAME rename (drops the libsns_aptina_ / libsns_sony_ /
libsns_omnivision_ etc. vendor prefix that was unique to av100,
landed in OpenIPC/openhisilicon#83). The pin bump also picks up
two unrelated openhisilicon commits already on main:

  bad4243 hi3516cv500: kernel 5.0–7.0 compat for OSAL, init
          wrappers, and drivers (openhisilicon#61)
  3ccbffa osal/cv500: default to "cma" allocator and gracefully
          fall back (openhisilicon#81)

Both already merged on openhisilicon main; this is the first
firmware PR to consume them. Cv500 builds may pick up minor
behavioural changes from these.

Deletes 9 binary blobs from
general/package/hisilicon-osdrv-hi3516av100/files/sensor/ — every
source-built libname that exact-matches a binary blob (only
possible after the openhisilicon rename):
  libsns_ar0230.so       libsns_imx123.so
  libsns_ar0237.so       libsns_imx178.so
  libsns_ar0237_dc.so    libsns_imx185.so
  libsns_ar0330.so       libsns_ov4689.so
  libsns_ov5658.so

Twelve binary blobs without source counterparts remain (intentional):
  libsns_ar0330_dc.so    libsns_imx290.so       libsns_imx385.so
  libsns_imx122.so       libsns_imx291.so       libsns_os05a10.so
  libsns_imx224.so       libsns_imx291_dc.so    libsns_ov2718.so
  libsns_imx225.so                              libsns_sc2310.so
                                                libsns_sc5235.so

The av100 osdrv .mk uses files/sensor/*.so glob, so blob deletion
is sufficient. The .ini files in files/sensor/config/ already
reference unprefixed names (DllFile=libsns_ar0237.so etc.), so no
.ini edits needed.

Tracks OpenIPC/openhisilicon#82.

  Depends on: OpenIPC/openhisilicon#83 (must be merged + pin updated
              to canonical main hash before this PR can land)
…fixes

CI on PR #2056 surfaced 4 build errors in 4 av100 sensor sources
that the libraries/Makefile's "|| true" had been hiding:

  sony_imx117  : Makefile missing -I kernel/pwm/hi3516av100
  sony_imx123  : hi_spi.h missing <sys/ioctl.h> (musl-only fail)
  sony_imx185  : same hi_spi.h issue
  smart_sc4236 : ported from V3 SDK, ISP_SNS_OBJ_S struct fields
                 (.pfnSetBusInfo/.pfnSetInit) and registration
                 callback signatures don't fit V2A ABI

Bump HISILICON_OPENSDK_VERSION c895c26 -> c897aee to consume the
fixes for the first three (OpenIPC/openhisilicon@c897aee, on
openhisilicon PR #83). They build clean under both glibc and musl.

Drop smart_sc4236 from HISILICON_OPENSDK_SENSORS_hi3516av100 — the
fix is non-trivial (re-port the source against V2A SDK conventions)
and shouldn't block the rest of the av100 wiring. Down from 14 to
13 source-built sensors. Will be re-added in a follow-up once the
source-side fix lands. The corresponding binary blob never existed
in hisilicon-osdrv-hi3516av100/files/sensor/, so this is purely a
SENSORS-list shrink — no install regressions.
@widgetii widgetii force-pushed the sensor/av100-source-built-sensors branch from 9c91636 to cdcff08 Compare May 7, 2026 14:16
widgetii added a commit to OpenIPC/openhisilicon that referenced this pull request May 7, 2026
Take 2 of the musl fix from #83. The previous attempt added
<sys/ioctl.h>, which works under glibc (transitively pulls in
<asm-generic/ioctl.h> with _IOC_SIZEBITS) but not under musl on
arm — musl's <sys/ioctl.h> -> <bits/ioctl.h> chain doesn't
re-export the kernel UAPI _IOC_SIZEBITS macro.

Match the pattern that hi3516cv200/hi_spi.h and hi3516cv300/hi_spi.h
already use:

  #include <linux/ioctl.h>

This is the kernel UAPI header that defines _IOC_SIZEBITS directly
(both libcs forward to it). No-op under glibc, fixes the musl build
of imx117, imx123, imx185 (every av100 sensor whose *_sensor_ctl.c
issues SPI_IOC_MESSAGE).

Surfaced when OpenIPC/firmware#2056 wired the av100 source-built
sensors via HISILICON_OPENSDK_SENSORS_hi3516av100 — the install
foreach failed with "cannot stat libsns_imx117.so" / imx123 / imx185
because the libraries Makefile's "|| true" hid the per-sensor build
failures, so #83 looked green but the install step couldn't find
the missing .so files.

Co-authored-by: Vasiliy Yakovlev <vixand@openipc.org>
…S fix)

690e2be (the squash-merge of openhisilicon#83) shipped a hi_spi.h
fix that used <sys/ioctl.h> — works under glibc, fails under musl
because musl's <sys/ioctl.h> doesn't re-export the kernel UAPI
_IOC_SIZEBITS macro. Three sensors (imx117, imx123, imx185) failed
to build silently (libraries Makefile uses "|| true"), and the
install foreach surfaced the gap as "cannot stat libsns_*.so".

Bump to d3df3bb (openhisilicon#90) which switches the include to
<linux/ioctl.h>, matching the working pattern in cv200/cv300.
@widgetii widgetii merged commit a993c5a into master May 7, 2026
95 checks passed
@widgetii widgetii deleted the sensor/av100-source-built-sensors branch May 7, 2026 16:33
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