Skip to content

Add hi3516ev200_lite_garus-gsl-5030x-30ap-nm device profile - #167

Open
ArthurKoba wants to merge 2 commits into
OpenIPC:masterfrom
ArthurKoba:port/garus-gsl-5030x-30ap-nm-final
Open

ArthurKoba wants to merge 2 commits into
OpenIPC:masterfrom
ArthurKoba:port/garus-gsl-5030x-30ap-nm-final

Conversation

@ArthurKoba

Copy link
Copy Markdown
Contributor

Adds a device profile for GARUS GSL-5030X-30AP-NM on PCB
BLK16EV2-4339P-38X38: HiSilicon Hi3516EV200, 8 MiB SPI NOR, wired
Ethernet and a fixed lens.

Hardware

  • Working sensor path: SC2315E-compatible MIPI, 1920x1080.
  • Hardware day/night input: GPIO15.
  • Bistable IR-cut filter: GPIO8 / GPIO9.
  • IR illumination is handled by the external light board, so no backlight GPIO
    is configured.
  • No Wi-Fi, SD/MMC, PTZ or autofocus hardware is used.
  • The populated three-pin audio header provides microphone input, speaker
    output and ground. Capture and playback were tested, so the HiSilicon audio
    stack is retained.

The 8 MiB profile removes unrelated sensor payloads and unused
wireless/USB/MMC/NAND paths while keeping the required video, Ethernet and
audio support.

Sensor resolution

The stock firmware exposes a 2304x1296 / "3M" output mode, but the recovered
SC2315E path and the working OpenIPC sensor driver both use a 1920x1080 sensor
mode. No native 3MP mode or matching native 3MP sensor path for this board was
confirmed, so the profile keeps the proven 1080p mode instead of adding an
unverified 3MP configuration. The stock 3MP mode appears to be an output
scaling path.

Day/night

GPIO15 needs its EV200 pinmux restored on every boot. The profile uses
muxes.sh for that and leaves the IR-cut pulses to Majestic.

A 150 ms nightMode.transitionDelayMs is used because an immediate transition
showed a brief purple cast while the filter was moving. With the delay,
day/night transitions are clean.

Tested

Built, flashed and booted on the physical camera. Verified:

  • 1920x1080 video and RTSP;
  • H.264 at 20 fps as the compatibility default;
  • H.265 operation;
  • Ethernet;
  • microphone capture and speaker output;
  • automatic day/night switching and IR-cut operation.

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

PR Summary by Qodo

Add GARUS GSL-5030X-30AP-NM Hi3516EV200 device profile

✨ Enhancement ⚙️ Configuration changes 📝 Documentation 🕐 20-40 Minutes

Grey Divider

AI Description

• Adds an 8 MiB Hi3516EV200 profile for the GARUS wired 1080p camera.
• Configures SC2315E video, GPIO day/night sensing, IR-cut control, and transition settling.
• Removes unused peripherals, storage paths, motors, VPN, and unrelated sensor payloads.
Diagram

graph TD
  D["Device defconfig"] --> K["Kernel fragment"] --> I["Firmware image"]
  X["Payload exclusions"] --> I --> C["Boot customizer"] --> M["Majestic runtime"] --> H(["GARUS hardware"])
  I --> U["GPIO pinmux"] --> H
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Use the generic Hi3516EV200 lite profile
  • ➕ Avoids maintaining a dedicated device definition and overlays.
  • ➕ Reuses the broadest existing Hi3516EV200 package set.
  • ➖ Retains unused sensors and peripheral support that may exceed the 8 MiB budget.
  • ➖ Cannot safely encode board-specific GPIO pinmux and IR-cut behavior.
  • ➖ Provides a less reproducible installation for this camera.
2. Create a multi-device auto-detecting profile
  • ➕ Could support several similar Hi3516EV200 boards from one image.
  • ➕ May reduce duplicated profile configuration over time.
  • ➖ Requires reliable board and sensor detection paths.
  • ➖ Retains additional drivers and sensor payloads in a flash-constrained image.
  • ➖ Increases boot-time complexity for one confirmed hardware target.

Recommendation: Keep the dedicated profile while continuing to inherit the generic kernel configuration through a small fragment. This provides deterministic hardware behavior and fits the 8 MiB NOR constraint without duplicating the shared platform baseline.

Files changed (7) +202 / -0

Enhancement (3) +104 / -0
hi3516ev200_lite_garus-gsl-5030x-30ap-nm_defconfigDefine the 8 MiB Hi3516EV200 lite firmware target +66/-0

Define the 8 MiB Hi3516EV200 lite firmware target

• Creates the Buildroot target for an ARM Cortex-A7 Hi3516EV200 with SquashFS, the board-specific kernel fragment, and core OpenIPC video, Ethernet, web, and audio packages. Autofocus, motor, VPN, and unnecessary curl features are disabled to constrain image size.

devices/hi3516ev200_lite_garus-gsl-5030x-30ap-nm/br-ext-chip-hisilicon/configs/hi3516ev200_lite_garus-gsl-5030x-30ap-nm_defconfig

customizer.shConfigure sensor and automatic day/night behavior +24/-0

Configure sensor and automatic day/night behavior

• Sets the device-specific upgrade image and SC2315E 1080p sensor configuration. It enables GPIO15 light monitoring, assigns GPIO8 and GPIO9 to the bistable IR-cut filter, and adds a 150 ms settling delay.

devices/hi3516ev200_lite_garus-gsl-5030x-30ap-nm/general/overlay/usr/share/openipc/customizer.sh

muxes.shRestore the GPIO15 day/night input pinmux +14/-0

Restore the GPIO15 day/night input pinmux

• Adds a boot script that preserves unrelated register bits while configuring GPIO1_7 as an input and switching its EV200 pad to GPIO mode.

devices/hi3516ev200_lite_garus-gsl-5030x-30ap-nm/general/overlay/usr/share/openipc/muxes.sh

Documentation (1) +1 / -0
README.mdList the GARUS camera as a completed port +1/-0

List the GARUS camera as a completed port

• Adds the GARUS GSL-5030X-30AP-NM to the supported-device table with its Hi3516EV200 SoC, probable SC2315E sensor, wired-only connectivity, and 8 MiB NOR storage.

README.md

Other (3) +97 / -0
garus-gsl-5030x-30ap-nm.fragmentDisable unsupported kernel peripherals and storage paths +28/-0

Disable unsupported kernel peripherals and storage paths

• Adds a kernel fragment that removes wireless, USB, MMC, FAT, NAND, UBI, YAFFS, and TUN support while retaining the common Hi3516EV200 configuration required for SPI NOR operation.

devices/hi3516ev200_lite_garus-gsl-5030x-30ap-nm/br-ext-chip-hisilicon/board/hi3516ev200/garus-gsl-5030x-30ap-nm.fragment

modulesSuppress removable-storage filesystem modules +2/-0

Suppress removable-storage filesystem modules

• Overrides the common module list with an empty device-specific list because the camera has no removable storage.

devices/hi3516ev200_lite_garus-gsl-5030x-30ap-nm/general/overlay/etc/modules

hi3516ev200_lite.listTrim unrelated sensor and motor payloads +67/-0

Trim unrelated sensor and motor payloads

• Removes unused sensor configurations, IQ profiles, sensor libraries, the camera motor module, and the standalone IR-cut demo. The required SC2315E 1080p path and shared default IQ target remain available.

devices/hi3516ev200_lite_garus-gsl-5030x-30ap-nm/general/scripts/excludes/hi3516ev200_lite.list

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

Tip of the day
💡 Did you know, you can add REVIEW.md to your repo root and Qodo follows it on every PR

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

The row was one space short in the model column, so the SoC field started
at column 25 where every other row starts it at 26, and the whole line sat
one character left of the grid.
@openipc-ai

Copy link
Copy Markdown
Contributor

Reviewed. The profile itself is in good shape, and the exclude list is the most
precise one in the repo right now — I cross-checked it against what the two
packages actually install (29 sensor drivers built from source by
hisilicon-opensdk plus 5 prebuilt from hisilicon-osdrv-hi3516ev200, 34 in
total): it prunes 33, leaves exactly libsns_sc2315e.so, and has no stale
entries. It also gets the IQ directory right, which most lists don't — keeping
iq/imx307.ini is what keeps the default.ini symlink pointing at something,
and dropping only f23.ini and imx335.ini is correct.

The muxes.sh split is right too. S30customizer runs that script on every
boot while customizer.sh runs once behind /etc/custom.ok, so a pinmux that
has to be reasserted belongs exactly where you put it, and the read-modify-write
leaves the unrelated direction and pad bits alone.

All 19 symbols in the kernel fragment are present and enabled in
hi3516ev200.generic.config, so none of them are silently doing nothing, and
CONFIG_TUN being off lines up with vtund and wireguard being off in the
defconfig.

Noted too that you measured the 150 ms on this camera rather than carrying the
number over from the SVI-252B. That is the right instinct — it is a property of
a particular filter swinging shut, so it does not transfer between boards.

I pushed one commit to your branch: the README row was a space short in the
model column, so the whole line sat one character left of the table grid.

Two things before this goes in:

  1. The README row reads SC2315E? but is marked done. Your description says
    "SC2315E-compatible", so I take the question mark to be deliberate about the
    physical part rather than about whether the board works — which is fair, and
    I left it alone rather than assert something you haven't confirmed. Is that
    the right reading? If the part marking is genuinely unread, I would rather
    the table said so plainly than carried a bare ?.

  2. The description lists "H.264 at 20 fps as the compatibility default" under
    what was tested, but customizer.sh sets neither .video0.codec nor
    .video0.fps, so the image will ship Majestic's defaults instead. The XVI
    ISI-2010C profile in t31: add XVI ISI-2010C device profile #166 sets cli -s .video0.codec h264 for the same
    stated reason. Were those two lines meant to be here?

Once that is settled I will merge.

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.

2 participants