Skip to content

Sensor source compilation: umbrella tracker for all platforms #82

@widgetii

Description

@widgetii

Overview

Tracking sensor-driver (libsns_*.so) openness across all HiSilicon / Goke platforms supported by this repo. The goal is to compile every sensor we have source code for from source, instead of shipping the vendor binary blobs that currently live in OpenIPC/firmware under general/package/{hisilicon,goke}-osdrv-<chiparch>/files/sensor/. Companion to #58 (ISP).

The pattern was established in OpenIPC/firmware#2042 for hi3516cv200: source-built sensors are installed by the hisilicon-opensdk package from HISILICON_OPENSDK_SENSORS_<chiparch>; the matching binary blobs are deleted from the osdrv package; sensors without source stay as binary blobs (no regression). End-to-end verified on a real hi3518ev200 camera — RTSP stream up, /image.jpg returns valid 1920×1080 JPEG.

Per-platform state

Platform Gen Source dirs Wired in firmware Gap Notes
hi3516cv200 V2 18 18 ✅ DONE landed in firmware#2042
hi3519v101 V3A 9 1 +8 install foreach already wired
hi3516cv500 V3.5 20 3 +17 install foreach already wired
hi3516ev200 V4 30 3 +27 uses generic else install block
gk7205v200 V4-GK 30 (→ev200) 3 +27 shares ev200 source via symlink
hi3516cv300 V3 9 0 +9 install block needs foreach added
hi3516av100 V2A 14 0 +14 install block needs foreach added
hi3516cv100 V1 (T1+) 17 0 +17 install block needs foreach added; T1+ flavour landed in #77

Numbers correspond to: ls -d libraries/sensor/<chiparch>/*/ | wc -l (source dirs) vs. count of libsns_* entries in HISILICON_OPENSDK_SENSORS_<chiparch> in the firmware hisilicon-opensdk.mk (wired).

Per-platform binary deletion counts

These are the firmware-side binary blobs in osdrv-<chiparch>/files/sensor/ that each follow-up PR can delete once the source-built version takes over. Computed by intersecting the LIB_NAME := libsns_<x> from each source dir's Makefile with the binary .so filenames in the matching firmware tree.

Platform Source-built (LIB_NAME) Binary blobs in firmware Overlap (deletable) Source-only (new) Binary-only (keep)
hi3519v101 9 13 8 1 5
hi3516cv500 20 25 20 0 5
hi3516ev200 30 15 10 20 5
gk7205v200 30 33 25 5 8
hi3516cv300 9 11 2 7 9
hi3516av100 14 21 0 14 21
hi3516cv100 17 30 11 6 19

(av100's "overlap = 0" looks weird — the firmware ships variant suffixes like libsns_imx178_dc.so, libsns_imx178_lvds.so that don't byte-match our source-built libsns_imx178.so / libsns_imx178_37M.so. The PR for av100 will need a per-sensor audit to decide which binary variants to keep and whether any rename/symlink is needed.)

Recommended PR order

  1. hi3519v101 — smallest, foreach already wired. Just expand the list (+8) and delete the matching 8 binary blobs. Closest analog to firmware#2042; easiest review.
  2. hi3516cv500 — same pattern as v101 but with 17 sensors. All 20 of our source-built libnames have matching binary blobs (perfect overlap), so the binary-deletion count exactly matches the list expansion.
  3. hi3516ev200 + gk7205v200 — single PR can do both since gk7205v200 is a symlink to the hi3516ev200 source tree. Biggest absolute gap (+27 sensors per chiparch). Generic else install block already does the foreach.
  4. hi3516cv300 — first platform that needs the install-block edit (add the sensor foreach line). 9 sensors, mostly source-only with no binary overlap.
  5. hi3516av100 — install-block edit + 14 sensors. Naming audit needed before deleting blobs (variant suffixes).
  6. hi3516cv100 — install-block edit + 17 sensors. T1+ (mpp2) flavour landed in sensor: upgrade hi3516cv100 to mpp2 (T1+) + add JXH42, IMX327 #77; sensor source builds are validated.

Two categories of PR

  • Already-wired platforms (v101, cv500, ev200, gk7205v200): the per-chiparch INSTALL_TARGET_CMDS block in firmware/general/package/hisilicon-opensdk/hisilicon-opensdk.mk already contains \$(foreach s,\$(HISILICON_OPENSDK_SENSORS), \$(INSTALL) ...). The PR is just expanding HISILICON_OPENSDK_SENSORS_<chiparch> and deleting matching binary blobs. Same shape as firmware#2042.
  • Not-yet-wired platforms (cv300, av100, cv100): the install block is kernel-modules-only. The PR has to add the sensor foreach line to the install block, then expand the list. One extra line, but it's the same kind of edit firmware#2042 already precedented for cv200.

Sub-issue / sub-PR table

Platform Issue / PR Status
hi3516cv200 OpenIPC/firmware#2042 ✅ merged
hi3519v101 OpenIPC/firmware#2052 🟡 open
hi3516cv500 OpenIPC/firmware#2053 🟡 open
hi3516ev200 + gk7205v200 OpenIPC/firmware#2054 🟡 open
hi3516cv300 OpenIPC/firmware#2055 🟡 open
hi3516av100 openhisilicon#83 (rename) + firmware#2056 (wiring, draft) 🟡 open
hi3516cv100 OpenIPC/firmware#2057 🟡 open

Out of scope (intentionally)

  • Sensors we don't have source for (e.g. ar0237, gc1034, gc2023, imx122, imx291, imx323_*, jxh62, jxh65, ov2735, sc1145, sc1235 on cv200) stay as binary blobs. Adding source-builds for those is a separate "find more upstream sensor source" task.
  • The kernel-side ISP / VI / sensor_i2c work is tracked in ISP source compilation: umbrella tracker for all platforms #58 and stays there.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions