gk7205v500: install the sc223a sensor driver, whose config already ships - #2436
Conversation
PR Summary by QodoInstall SC223A sensor driver in GK7205V500 images
AI Description
Diagram
High-Level Assessment
Files changed (1)
|
Code Review by Qodo
1. SC223A cameras lack real-device validation
|
ec49940 to
50c464b
Compare
A GK7202V500 whose sensor is an SC223A has no video on any image this tree builds. /etc/sensors gets sc223a_i2c_1080p.ini already -- the package installs files/sensor/config/*.ini wholesale -- but majestic on this family dlopens /usr/lib/sensors/libsns_<name>.so, and of the fifty drivers the package carries only sc2336 and sc401ai were uncommented. So the configuration half of the sensor shipped and the code half did not. Additive, and the sensor is in the list the package already builds, per CLAUDE.md's "Add a sensor to an SoC family". 39000 bytes uncompressed, 12KB compressed, and the board has 1316KB of headroom under its 8192KB cap. This does not make the four-lane 4l_sc223a_i2c_1080p.ini work: that config names libsns_sc223a_4l.so, which the V500 SDK does not contain in any flavour -- static or shared, log or nolog. It is one of six configs in this package naming a driver that is not here (jxf23, jxf23_dc, mis2008, sc200ai, sc2232h are the others), evidently inherited with the config set from a family whose SDK had them. Pruning those is a separate question from shipping this driver, so the comment records it rather than widening this change. Worth knowing for the next report: SC223A, SC2239P and SC233A are one die wearing three labels, and it is sold as SC5239S -- ipctool's sensors.c says the first, the wiki's guide-supported-sensors.md the second. A reporter quoting their seller will not say "sc223a". Reported on a GK7202V500 in #2428.
50c464b to
b9c4b3f
Compare
Problem
A GK7205V500 / GK7202V500 whose sensor is an SC223A has no video on any
image this tree builds, however it is configured.
The sensor's configuration already ships: the package installs
files/sensor/config/*.iniwholesale, so/etc/sensorsgetssc223a_i2c_1080p.ini. But majestic on this family loads its sensor driver bydlopening/usr/lib/sensors/libsns_<name>.so, and of the ~50 drivers thepackage carries, only
sc2336andsc401aihad their install linesuncommented. So the configuration half of this sensor shipped and the code half
did not.
What this does not fix, said plainly: the four-lane
4l_sc223a_i2c_1080p.inisitting beside it namesDllFile=libsns_sc223a_4l.so,and the V500 SDK has no such file in any flavour — shared or static,
lib_logor
lib_nolog. It is not alone: six of the fifteen configs this package shipsname a driver that is not in the package.
That set was evidently inherited with the config set from a family whose SDK
had those drivers (
goke-osdrv-gk7205v200does shiplibsns_sc223a_4l.so).Pruning them is a separate question from shipping the driver the two-lane
config asks for, so this PR records it rather than widening.
Additive — the sensor is already in the list the package builds, which is the
shape CLAUDE.md's "Add a sensor to an SoC family" asks for. No default is
repointed and no existing install changes.
Worth recording for the next report, because it cost a round trip here:
SC223A is sold as SC5239S, and SC223A / SC2239P / SC233A are one die
wearing three labels — ipctool's
src/sensors.csays the latter, the wiki'sguide-supported-sensors.mdthe former. A reporter quoting their seller willsay "SC5239S", not "sc223a".
Reported on a GK7202V500 in #2428, where the board's own prompt read
gk7205v500-unknownuntil the sensor was set by hand.Hardware tested on
No physical camera. I do not have a GK7205V500/GK7202V500 board, and say so
rather than leaving the section blank. The reporter of #2428 has one with this
exact sensor.
What can be checked without hardware, and was: that the driver is installed by
the build, that it is the file majestic looks for, that it loads, and that the
image still fits. What cannot: that the ISP brings this sensor up and streams.
QEMU models no sensor on this machine, so that half is the reporter's.
Evidence
Before —
openipc.gk7205v500-nor-ultimate.tgzbuilt from master:The config is there, the driver majestic would
dlopenis not.After — built from this branch:
It resolves completely against the image it ships on — 19 undefined symbols,
none unresolved, and
libc.soits onlyNEEDED— so thedlopenwill notfail the way the missing
libhi_*shims did in #2434:Size, +12KB compressed and 1316KB still free under the cap:
Scope
general/package/all-patches/linux/general/overlay/or in a sharedload_<vendor>script hardcodes a value specific to my board — noload_gokedefault is repointed; this only adds to the package's sensor listLD_PRELOAD, and no binaries that cannot be rebuilt from source —libsns_sc223a.sois already in this package'sfiles/sensor/, from the same vendor SDK drop as its siblings; this PR adds no file, only an install line