Skip to content

hisilicon-opensdk: build IMX385 sensor from source for hi3519v101#2013

Closed
widgetii wants to merge 1 commit intomasterfrom
opensdk-sensor-imx385-hi3519v101
Closed

hisilicon-opensdk: build IMX385 sensor from source for hi3519v101#2013
widgetii wants to merge 1 commit intomasterfrom
opensdk-sensor-imx385-hi3519v101

Conversation

@widgetii
Copy link
Copy Markdown
Member

Summary

Follow-up to #2011. After that PR merged, the `Sensor_type=stSnsImx385Obj` in the ini expects a driver that exports `stSnsImx385Obj`, but the prebuilt `libsns_imx385.so` blob in `hisilicon-osdrv-hi3519v101/files/sensor/` exports generic `stSnsObj` — sensor bring-up fails on real hardware with:

```
Cannot load symbol 'stSnsImx385Obj' from driver
```

Fix by enabling `hisilicon-opensdk` to build the sensor from source for hi3519v101 and installing it over the osdrv blob — same pattern hi3516ev200 / gk7205v200 / hi3516cv500 already use.

Changes

  • `general/package/hisilicon-opensdk/hisilicon-opensdk.mk`:
    • Add dependency on `hisilicon-osdrv-hi3519v101` so opensdk installs after osdrv and its source-built `libsns_imx385.so` overrides the blob at `files/sensor/`.
    • Add `SDK_CODE=0x3519101` for hi3519v101.
    • List `sony_imx385/libsns_imx385` in `HISILICON_OPENSDK_SENSORS_hi3519v101`.
  • `br-ext-chip-hisilicon/configs/hi3519v101_lite_defconfig`, `hi3516av200_lite_defconfig`, `hi3516av200_ultimate_defconfig`: turn on `BR2_PACKAGE_HISILICON_OPENSDK=y`.

No blobs added. No version bump needed — `HISILICON_OPENSDK_VERSION = 8889317` already contains `libraries/sensor/hi3519v101/sony_imx385/`.

Test

Verified on a Hi3516AV200 DEMO board (hi3519v101 SDK) with IMX385 + fixed lens (no iris), comparing the prebuilt blob against the source-built driver on the same scene:

Prebuilt blob (`stSnsObj`) Source-built (`stSnsImx385Obj`)
Stripped size 48 608 B 31 644 B
AE Iso 312 134
AE Again 3099 1381
Image magenta cast, blown highlights neutral WB, clean detail

Sensor init log: `Sony IMX385 Sensor 1080p30 Initial OK!`, MIPI 4-lane RAW12 streaming, JPEG snapshot returns valid 1080p frames.

🤖 Generated with Claude Code

Add hi3519v101 to the same opensdk-builds-sensor-from-source pattern
used by hi3516ev200/gk7205v200/hi3516cv500:

 - hisilicon-opensdk.mk: add dependency on hisilicon-osdrv-hi3519v101
   (so opensdk installs after osdrv and its libsns_imx385.so overrides
   the blob shipped in files/sensor/), declare SDK_CODE=0x3519101,
   and list sony_imx385/libsns_imx385 as the sensor to build.

 - hi3519v101_lite_defconfig, hi3516av200_{lite,ultimate}_defconfig:
   turn on BR2_PACKAGE_HISILICON_OPENSDK=y.

Effect: the libsns_imx385.so on the target is now compiled from
openhisilicon/libraries/sensor/hi3519v101/sony_imx385/ at build time,
not a prebuilt blob. Source is the openipc/openhisilicon commit
already tracked by HISILICON_OPENSDK_VERSION (8889317), which contains
libraries/sensor/hi3519v101/sony_imx385/.

Side-by-side test on Hi3516AV200 + IMX385 + fixed lens:
  prebuilt stock (stSnsObj):      Iso=312, Again=3099, visible cast
  source-built (stSnsImx385Obj):  Iso=134, Again=1381, neutral WB
    and cleaner detail. Sensor_type value in imx385_i2c_1080p.ini
    (companion commit in this PR) matches the source-built export.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@widgetii
Copy link
Copy Markdown
Member Author

Superseded by #2010 which now includes the IMX385 sensor install. The failure was rootfs size (5936KB > 5120KB) because #2013 added the full install block + sensor on master without the base wiring from #2010.

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