Skip to content

Add Imou Cue 2 (IPC-C22EN) device profile - #160

Open
HeytalePazguato wants to merge 3 commits into
OpenIPC:masterfrom
HeytalePazguato:imou-cue2
Open

HeytalePazguato wants to merge 3 commits into
OpenIPC:masterfrom
HeytalePazguato:imou-cue2

Conversation

@HeytalePazguato

Copy link
Copy Markdown

Summary

Add device profile for the Imou Cue 2 (IPC-C22EN / IPC-C22EP), a sealed indoor camera built on Hi3516EV200 + SC2235 sensor over DVP parallel bus.

  • Board defconfig based on hi3516ev200_lite with RTL8188FU WiFi and WPA supplicant
  • Customizer sets U-Boot env vars: sensor, sensor_dvp, wlandev, gpio_button, upgrade URL
  • LED init scripts (S01leds: red during boot, S99leds: green when ready)
  • Exclude list strips unused sensor drivers/configs/IQ files to fit 8MB NOR flash
  • Ships wpa_passphrase binary for WiFi configuration

Companion firmware PR: OpenIPC/firmware#2446

Hardware notes

The Imou Cue 2 runs Dahua's signed U-Boot with RSA secure boot. The UART console is locked and loady/sf commands are disabled. Flashing requires a CH341A SPI programmer connected directly to the NOR flash chip.

Testing

Tested on 4 cameras (IPC-C22EN). All boot cleanly from cold power with working 1080p video, WiFi, two-way audio (RTSP backchannel), day/night switching, and ONVIF discovery. Verified stable across multiple power cycles with no manual intervention required.

Changes

  • devices/hi3516ev200_lite_imou-cue2-c22en/ — full device profile (defconfig, customizer, LED scripts, exclude list, wpa_passphrase)

Hi3516EV200 + SC2235 DVP, RTL8188FTV WiFi, 8MB NOR flash.
Defconfig, customizer, exclude list, WiFi init, and LED init scripts.
- Remove .image.flip/.image.mirror from customizer (breaks pipeline)
- Remove S40wifi (conflicts with S40network)
- Add fw_setenv wlandev/wlanmac/soc to customizer
Remove cli calls from customizer.sh — all majestic settings are now
baked into majestic.yaml via the firmware overlay. Add sensor_dvp env
var. Remove hardcoded wlanmac. Ship wpa_passphrase for WiFi setup.
@qodo-free-for-open-source-projects

Copy link
Copy Markdown

PR Summary by Qodo

Add Imou Cue 2 Hi3516EV200 device profile

✨ Enhancement ⚙️ Configuration changes 🕐 20-40 Minutes

Grey Divider

AI Description

• Adds an Imou Cue 2 profile for Hi3516EV200, SC2235 DVP, and RTL8188FU hardware.
• Configures boot environment, LED lifecycle, wireless setup, and device-specific firmware upgrades.
• Prunes unused camera assets to fit the device's 8 MB NOR flash.
Diagram

graph TD
  P["Cue 2 Profile"] --> B["Build Config"] --> I["8 MB Firmware"] --> H["Camera Hardware"]
  P --> O["Runtime Overlay"] --> I
  P --> X["Exclude List"] --> I
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Use Buildroot wpa_passphrase utility
  • ➕ Provides standard WPA passphrase hashing and command behavior.
  • ➕ Avoids exposing the passphrase in generated configuration output.
  • ➖ Consumes additional space in an image constrained to 8 MB NOR.
  • ➖ May require enabling another WPA Supplicant package option.

Recommendation: The dedicated profile, runtime overlay, and aggressive exclusions are appropriate for hardware-specific GPIOs and the 8 MB flash limit. Prefer the standard Buildroot wpa_passphrase utility if it fits; otherwise document that the bundled compatibility script emits a plaintext WPA key rather than a derived PSK.

Files changed (6) +190 / -0

Enhancement (3) +29 / -0
S01ledsShow a red LED during early boot +7/-0

Show a red LED during early boot

• Adds an early init script that drives the Cue 2 GPIOs into its red boot-status LED state.

devices/hi3516ev200_lite_imou-cue2-c22en/general/overlay/etc/init.d/S01leds

S99ledsManage the ready-state LED +14/-0

Manage the ready-state LED

• Adds late-boot and shutdown LED handling. The ready state is green unless the U-Boot environment disables the status LED.

devices/hi3516ev200_lite_imou-cue2-c22en/general/overlay/etc/init.d/S99leds

wpa_passphraseProvide lightweight WPA configuration generation +8/-0

Provide lightweight WPA configuration generation

• Adds a shell-compatible wpa_passphrase helper that emits a WPA network block from the supplied SSID and passphrase. It preserves the passphrase as plaintext rather than deriving the standard hexadecimal PSK.

devices/hi3516ev200_lite_imou-cue2-c22en/general/overlay/usr/bin/wpa_passphrase

Other (3) +161 / -0
hi3516ev200_lite_imou-cue2-c22en_defconfigConfigure the Cue 2 firmware build +65/-0

Configure the Cue 2 firmware build

• Defines an 8 MB Hi3516EV200 lite image with the HiSilicon SDK, Majestic, RTL8188FU support, WPA Supplicant, and required media and administration packages. Disables unnecessary networking features to reduce the image footprint.

devices/hi3516ev200_lite_imou-cue2-c22en/br-ext-chip-hisilicon/configs/hi3516ev200_lite_imou-cue2-c22en_defconfig

customizer.shInitialize Cue 2 boot environment values +24/-0

Initialize Cue 2 boot environment values

• Sets the Hi3516EV200 SoC, SC2235 DVP sensor, RTL8188FU device identifier, reset-button GPIO, and profile-specific upgrade URL in the U-Boot environment.

devices/hi3516ev200_lite_imou-cue2-c22en/general/overlay/usr/share/openipc/customizer.sh

hi3516ev200_lite.listPrune unused camera assets from the image +72/-0

Prune unused camera assets from the image

• Excludes unrelated sensor libraries, sensor configurations, IQ profiles, high-frame-rate and WDR data, and the unused camera motor module. This keeps the device image within its 8 MB NOR flash budget.

devices/hi3516ev200_lite_imou-cue2-c22en/general/scripts/excludes/hi3516ev200_lite.list

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

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (1) 📘 Rule violations (2) 📜 Skill insights (0)

Grey Divider


Action required

1. Supported device list omits Cue 2 📘 Rule violation ⚙ Maintainability 7
Description
The new hi3516ev200_lite_imou-cue2-c22en_defconfig registers the device, but README.md contains
no corresponding Imou Cue 2 or IPC-C22EN row. Once this profile is merged, readers consulting the
supported-device inventory cannot discover the newly supported hardware.
Code

devices/hi3516ev200_lite_imou-cue2-c22en/br-ext-chip-hisilicon/configs/hi3516ev200_lite_imou-cue2-c22en_defconfig[R39-42]

+BR2_OPENIPC_SOC_MODEL="hi3516ev200"
+BR2_OPENIPC_SOC_FAMILY="hi3516ev200"
+BR2_OPENIPC_VARIANT="lite"
+BR2_OPENIPC_FLASH_SIZE="8"
Evidence
PR Compliance ID 8 requires every newly added device to have a README device-table row. The matching
defconfig registers the Imou Cue 2 profile, while the complete supported-device table has no Cue 2
or IPC-C22EN entry.

Rule 7: Device Additions Must Be Documented in the README Device Tables
devices/hi3516ev200_lite_imou-cue2-c22en/br-ext-chip-hisilicon/configs/hi3516ev200_lite_imou-cue2-c22en_defconfig[38-42]
README.md[14-105]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The new Imou Cue 2 device profile is registered by its matching defconfig, but the supported-device table in `README.md` has no corresponding entry.

## Fix Focus Areas
- README.md[14-105]

## Recommended Fix
Add an Imou Cue 2 IPC-C22EN row to the supported-device table with the HI3516EV200 SoC, SC2235 sensor, RTL8188FU WiFi, 8 MB NOR flash, and an appropriate support status.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


2. A device duplicates the WiFi helper 📘 Rule violation ⚙ Maintainability 5
Description
general/overlay/usr/bin/wpa_passphrase reimplements the standard Buildroot helper locally instead
of selecting BR2_PACKAGE_WPA_SUPPLICANT_PASSPHRASE. Every invocation on this board therefore uses
a device-only implementation, so standard passphrase derivation and future fixes to the packaged
helper do not reach it.
Code

devices/hi3516ev200_lite_imou-cue2-c22en/general/overlay/usr/bin/wpa_passphrase[R1-4]

+#!/bin/sh
+cat <<CONF
+network={
+	ssid="$1"
Evidence
PR Compliance ID 6 requires reusable functionality to remain upstream rather than being duplicated
as a device payload. The PR adds a device-local shell implementation while existing device
configurations demonstrate that the standard Buildroot WPA passphrase component is available.

Rule 5: Device-Specific Payloads Must Be Necessary and Minimal
devices/hi3516ev200_lite_imou-cue2-c22en/general/overlay/usr/bin/wpa_passphrase[1-8]
devices/hi3516ev200_lite_imou-cue2-c22en/br-ext-chip-hisilicon/configs/hi3516ev200_lite_imou-cue2-c22en_defconfig[62-65]
devices/common/br-ext-chip-hisilicon/configs/hi3518ev200_mini_defconfig[32-32]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The device overlay adds a local `wpa_passphrase` implementation even though Buildroot already provides the reusable helper through the WPA supplicant package.

## Fix Focus Areas
- devices/hi3516ev200_lite_imou-cue2-c22en/general/overlay/usr/bin/wpa_passphrase[1-8]
- devices/hi3516ev200_lite_imou-cue2-c22en/br-ext-chip-hisilicon/configs/hi3516ev200_lite_imou-cue2-c22en_defconfig[62-65]

## Recommended Fix
Remove the device-local `wpa_passphrase` overlay and enable `BR2_PACKAGE_WPA_SUPPLICANT_PASSPHRASE=y` in the device defconfig so the standard maintained implementation is installed.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


3. Quoted Wi-Fi credentials cannot connect 🐞 Bug ≡ Correctness
Description
The added wpa_passphrase script interpolates the SSID and passphrase directly into double-quoted
WPA configuration fields without escaping them. When either argument contains a quotation mark or
backslash, the generated value is terminated or reinterpreted before WPA authentication, affecting
otherwise valid network names and passwords.
Code

devices/hi3516ev200_lite_imou-cue2-c22en/general/overlay/usr/bin/wpa_passphrase[R4-6]

+	ssid="$1"
+	#psk="$2"
+	psk="$2"
Evidence
The script places both positional arguments directly inside WPA configuration quotes with no
escaping or key derivation, while the profile enables WPA Supplicant and sibling profiles enable its
standard passphrase utility instead of implementing this template themselves.

devices/hi3516ev200_lite_imou-cue2-c22en/general/overlay/usr/bin/wpa_passphrase[1-8]
devices/hi3516ev200_lite_imou-cue2-c22en/br-ext-chip-hisilicon/configs/hi3516ev200_lite_imou-cue2-c22en_defconfig[62-65]
devices/ssc325_lite_imou-c22cp/br-ext-chip-sigmastar/configs/ssc325_lite_imou-c22cp_defconfig[35-40]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The custom `wpa_passphrase` script directly interpolates credentials into WPA configuration syntax, so valid quotation marks and backslashes can alter or invalidate the generated configuration.

## Fix Focus Areas
- devices/hi3516ev200_lite_imou-cue2-c22en/general/overlay/usr/bin/wpa_passphrase[1-8]
- devices/hi3516ev200_lite_imou-cue2-c22en/br-ext-chip-hisilicon/configs/hi3516ev200_lite_imou-cue2-c22en_defconfig[62-65]

## Recommended Fix
Remove the custom shell replacement and enable `BR2_PACKAGE_WPA_SUPPLICANT_PASSPHRASE=y` so the standard utility validates credentials, safely handles special characters, and emits the derived hexadecimal key.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Context sources
Review mode: ⚖️ Balanced: This adds a new bootable device profile with firmware configuration, environment initialization, WiFi setup, GPIO LED behavior, and flash-size exclusions, creating meaningful runtime and hardware-specific risk across several files.

Grey Divider

Tip of the day
💡 Did you know, you can type 'qodo, fix this' on a finding and the fix lands right on your PR

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

Comment on lines +39 to +42
BR2_OPENIPC_SOC_MODEL="hi3516ev200"
BR2_OPENIPC_SOC_FAMILY="hi3516ev200"
BR2_OPENIPC_VARIANT="lite"
BR2_OPENIPC_FLASH_SIZE="8"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action required

1. Supported device list omits cue 2 📘 Rule violation ⚙ Maintainability

7

The new hi3516ev200_lite_imou-cue2-c22en_defconfig registers the device, but README.md contains
no corresponding Imou Cue 2 or IPC-C22EN row. Once this profile is merged, readers consulting the
supported-device inventory cannot discover the newly supported hardware.
Agent Prompt
## Issue description
The new Imou Cue 2 device profile is registered by its matching defconfig, but the supported-device table in `README.md` has no corresponding entry.

## Fix Focus Areas
- README.md[14-105]

## Recommended Fix
Add an Imou Cue 2 IPC-C22EN row to the supported-device table with the HI3516EV200 SoC, SC2235 sensor, RTL8188FU WiFi, 8 MB NOR flash, and an appropriate support status.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Comment on lines +1 to +4
#!/bin/sh
cat <<CONF
network={
ssid="$1"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action required

2. A device duplicates the wifi helper 📘 Rule violation ⚙ Maintainability

5

general/overlay/usr/bin/wpa_passphrase reimplements the standard Buildroot helper locally instead
of selecting BR2_PACKAGE_WPA_SUPPLICANT_PASSPHRASE. Every invocation on this board therefore uses
a device-only implementation, so standard passphrase derivation and future fixes to the packaged
helper do not reach it.
Agent Prompt
## Issue description
The device overlay adds a local `wpa_passphrase` implementation even though Buildroot already provides the reusable helper through the WPA supplicant package.

## Fix Focus Areas
- devices/hi3516ev200_lite_imou-cue2-c22en/general/overlay/usr/bin/wpa_passphrase[1-8]
- devices/hi3516ev200_lite_imou-cue2-c22en/br-ext-chip-hisilicon/configs/hi3516ev200_lite_imou-cue2-c22en_defconfig[62-65]

## Recommended Fix
Remove the device-local `wpa_passphrase` overlay and enable `BR2_PACKAGE_WPA_SUPPLICANT_PASSPHRASE=y` in the device defconfig so the standard maintained implementation is installed.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Comment on lines +4 to +6
ssid="$1"
#psk="$2"
psk="$2"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action required

3. Quoted wi-fi credentials cannot connect 🐞 Bug ≡ Correctness

The added wpa_passphrase script interpolates the SSID and passphrase directly into double-quoted
WPA configuration fields without escaping them. When either argument contains a quotation mark or
backslash, the generated value is terminated or reinterpreted before WPA authentication, affecting
otherwise valid network names and passwords.
Agent Prompt
## Issue description
The custom `wpa_passphrase` script directly interpolates credentials into WPA configuration syntax, so valid quotation marks and backslashes can alter or invalidate the generated configuration.

## Fix Focus Areas
- devices/hi3516ev200_lite_imou-cue2-c22en/general/overlay/usr/bin/wpa_passphrase[1-8]
- devices/hi3516ev200_lite_imou-cue2-c22en/br-ext-chip-hisilicon/configs/hi3516ev200_lite_imou-cue2-c22en_defconfig[62-65]

## Recommended Fix
Remove the custom shell replacement and enable `BR2_PACKAGE_WPA_SUPPLICANT_PASSPHRASE=y` so the standard utility validates credentials, safely handles special characters, and emits the derived hexadecimal key.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

@openipc-ai openipc-ai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this — the profile is well shaped and four tested cameras is a good basis. The problem is that it is only half of the change, and two of the three dependencies on the firmware side do not need to exist. Requesting changes; details inline, plus the cross-cutting parts here.

Blocking: nothing here works without firmware#2446, which is still open

That PR carries the SC2235 DVP register sequence, sensor_dvp support in load_hisilicon, the sc2235 sensor ini and IQ profile, and the rtl8188fu-hi3516ev200-imou-cue2 stanza in /etc/wireless/usb. I ran this exclude list against what the build actually installs on firmware master. The complete set of sensor-related files that survive into the image is:

/usr/lib/sensors/libsns_sc2235.so
/etc/sensors/high-fps/imx335_1280x720_120fps.ini
/etc/sensors/high-fps/imx335_1296x972_64fps.ini
/etc/sensors/high-fps/imx335_1920x1080_55fps.ini
/etc/sensors/high-fps/imx335_2592x1944_45fps.ini
/etc/sensors/high-fps/imx335_800x480_240fps.ini

No sensor config, no IQ profile at all, and no WiFi. So this cannot merge before its firmware half — but two of those dependencies are avoidable today, see the comments on customizer.sh and wpa_passphrase.

README row missing

Step 7 of CLAUDE.md: the device table in README.md needs a row. Worth clarifying the title's "IPC-C22EN / IPC-C22EP" too — Imou IPC-C22EP-S2 is already in the table as an SSC325DE board, so if the C22EP really is this board it needs a clones-table row rather than a second meaning for the same model number.

Worth reconsidering in firmware#2446

etc/init.d/S01leds, etc/init.d/S99leds, etc/majestic.yaml, etc/rc.local, etc/ir/* and general/scripts/excludes/hi3516ev200_lite.list all sit in firmware's shared overlay, so they would land on every OpenIPC board, not just this one — that is exactly the split builder exists to avoid, and all of them belong in this PR instead. What genuinely belongs in firmware is the opensdk SC2235 patch, the load_hisilicon change and the osdrv sensor config + IQ ini. Note also that replacing the SC2235 init table changes that driver for every board using the sensor, across hi3516cv200 and hi3516cv300 as well as this family, so it deserves its own testing note. etc/ir/nrxset is committed empty there. Finally, the two PRs disagree on the board name: hi3516ev200_lite_imou-cue2-c22en here versus hi3516ev200_lite_imou-cue2 there.

What already checks out

ci-matrix.py --self-test passes on the branch (116 devices, 15 smoke, 39 cases), so registration is automatic and nothing needs adding to the workflows. File modes and the device directory naming are right, and the exclude list correctly spares libsns_sc2235.so. I have not run a local build, so the 8 MB NOR fit is still unverified on my side.

# BR2_PACKAGE_LIBCURL_OPENIPC_PROXY_SUPPORT is not set
# BR2_PACKAGE_LIBCURL_OPENIPC_COOKIES_SUPPORT is not set
# BR2_PACKAGE_LIBCURL_OPENIPC_EXTRA_PROTOCOLS_FEATURES is not set
# BR2_PACKAGE_LIBEVENT_OPENIPC is not set

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

majestic.mk has a hard MAJESTIC_DEPENDENCIES += libevent-openipc, so Buildroot builds and installs libevent regardless of this symbol. The line saves no flash — it just makes the defconfig say something untrue. All 118 base defconfigs set BR2_PACKAGE_LIBEVENT_OPENIPC=y; please match them.

(The WIREGUARD_* and VTUND opt-outs above and the dropped MAJESTIC_AF / MOTORS are real savings and look right for this board.)

BR2_PACKAGE_OPUS_OPENIPC_FIXED_POINT=y
BR2_PACKAGE_RTL8188FU_OPENIPC=y
# BR2_PACKAGE_VTUND_OPENIPC is not set
BR2_PACKAGE_WPA_SUPPLICANT=y

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs the other two symbols:

BR2_PACKAGE_WPA_SUPPLICANT=y
BR2_PACKAGE_WPA_SUPPLICANT_CLI=y
BR2_PACKAGE_WPA_SUPPLICANT_PASSPHRASE=y

Every other device in the tree sets all three. _PASSPHRASE=y is what installs the real wpa_passphrase binary that /etc/network/interfaces.d/wlan0 calls — with it, the shim added in this PR can be deleted.

Comment on lines +1 to +8
#!/bin/sh
cat <<CONF
network={
ssid="$1"
#psk="$2"
psk="$2"
}
CONF

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please drop this file and set BR2_PACKAGE_WPA_SUPPLICANT_PASSPHRASE=y in the defconfig instead — it is a workaround for a missing config symbol, not a device delta.

It is also strictly worse than the binary it stands in for. The real wpa_passphrase emits the PBKDF2-derived PMK as hex and keeps the cleartext only on the #psk= comment line, which wlan0's sed 's/#psk.*/scan_ssid=1/g' then overwrites. This version emits psk="$2", so the plaintext WiFi password ends up in /tmp/wpa_supplicant.conf — and a password containing a " or a backslash breaks the file outright. On top of that, it sits at /usr/bin/wpa_passphrase, the same path the real tool installs to, so it would silently shadow it the moment the option is turned on.

#
fw_setenv soc hi3516ev200
fw_setenv sensor sc2235
fw_setenv sensor_dvp 1

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sensor_dvp is currently read only by general/package/goke-osdrv-gk7205v200/files/script/load_goke. Nothing on the HiSilicon side looks at it, so on firmware master this line is a no-op — it only starts working once firmware#2446's load_hisilicon change lands.

#
# Set reset button GPIO
#
fw_setenv gpio_button 56

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing in the firmware rootfs reads gpio_button, and no other builder device sets it — is this consumed by the u-boot you flash, or is it left over from the stock environment? If it is dead, please drop it; if it is live, a one-line comment saying who reads it would help the next person.

#
# Set wireless device and MAC address
#
fw_setenv wlandev rtl8188fu-hi3516ev200-imou-cue2

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This profile does not exist. /etc/wireless/usb is a chain of if [ "$1" = ... ] blocks ending in a bare exit 1, so an unknown name loads no module, prints nothing, and WiFi never appears — it looks like a driver fault rather than a missing stanza.

You do not need firmware#2446 for this. 23 builder devices ship their own general/overlay/etc/wireless/usb, which shadows the firmware copy for this board only. The sibling devices/ssc325_lite_imou-c22cp is the whole pattern:

#!/bin/sh

set_gpio() {
	[ "$2" -eq 1 ] && gpio set $1 || gpio clear $1
	sleep 1
}

if [ "$1" = "rtl8188fu-hi3516ev200-imou-cue2" ]; then
	set_gpio 52 1
	modprobe 8188fu
	exit 0
fi

exit 1

Adding that here (with whatever polarity GPIO 52 actually needs) drops one firmware dependency and keeps the board self-contained.

#
fw_setenv wlandev rtl8188fu-hi3516ev200-imou-cue2

exit 0

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The customizer seeds no majestic settings at all. Right now those live in firmware#2446's general/overlay/etc/majestic.yaml, which is the global default for every board — the per-device values belong here as cli -s lines, the way devices/ssc325_lite_imou-c22cp and devices/hi3516cv200_lite_spezvision-svi-252b-k202 do it. That covers the nightMode pins, codec/fps, the audio settings your PR description mentions, and .isp.sensorConfig if the SC2235 needs a non-default ini.

Comment on lines +54 to +60
/etc/sensors/iq/f23.ini
/etc/sensors/iq/gc2053.ini
/etc/sensors/iq/imx307.ini
/etc/sensors/iq/imx335.ini
/etc/sensors/iq/sc2232.ini
/etc/sensors/iq/sc2335.ini
/etc/sensors/iq/default.ini

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Three of these seven were never installed on this SoC, and the other four leave the image with no IQ profile whatsoever.

hisilicon-osdrv-hi3516ev200 installs exactly three IQ files — imx307.ini, imx335.ini, f23.ini — plus default.ini as a symlink to imx307.ini. So gc2053.ini, sc2232.ini and sc2335.ini (lines 55, 58, 59) match nothing and can go. More importantly, line 60 removes the fallback symlink the osdrv installs on purpose, and lines 54/56/57 remove every real profile, so /etc/sensors/iq/ ends up empty unless firmware#2446's sc2235.ini is present. Same story one block up: every /etc/sensors/*.ini is stripped, so there is no sc2235 sensor config either.

Worth keeping default.ini unless you have measured that you need those few kB.

Comment on lines +66 to +67
/etc/sensors/high-fps/imx335_1280x720_60fps.ini
/etc/sensors/high-fps/imx335_2592x1520_25fps.ini

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neither filename exists. The hi3516ev200 osdrv ships imx335_1280x720_120fps.ini, imx335_1296x972_64fps.ini, imx335_1920x1080_55fps.ini, imx335_2592x1944_45fps.ini and imx335_800x480_240fps.ini — so these two entries prune nothing and all five real files stay in the image, which is the opposite of what the block intends. Substituting the five correct names buys back flash and drops two stale entries.

Altogether the list has five entries that match no file; rootfs_script.sh will print them as excludes: <path> matched no file with a 5 of 67 summary in the build log.

Comment on lines +2 to +6
# Imou Cue 2: early boot — red LED on (GPIO 9 active low)
case "$1" in
start)
gpio set 0; gpio clear 9; gpio clear 4
;;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment documents GPIO 9 but the line drives three pins (0, 4 and 9) — worth naming what 0 and 4 are, since nobody with the case open can guess. Also consider a stop) branch for symmetry with S99leds.

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