Skip to content

Add ssc337de_lite_zte-k543 device profile (ZTE K543, SC401AI, MT7601U Wi-Fi) - #152

Merged
openipc-ai merged 1 commit into
OpenIPC:masterfrom
tagbug:device/ssc337de_lite_zte-k543
Sep 11, 2026
Merged

Add ssc337de_lite_zte-k543 device profile (ZTE K543, SC401AI, MT7601U Wi-Fi)#152
openipc-ai merged 1 commit into
OpenIPC:masterfrom
tagbug:device/ssc337de_lite_zte-k543

Conversation

@tagbug

@tagbug tagbug commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Adds a device profile for the ZTE K543 PTZ camera — SigmaStar SSC337DE (Infinity6B0), SC401AI sensor, 16 MiB NOR, and MT7601U USB Wi-Fi.

The board needs a few device-specific settings beyond the standard SSC337DE lite configuration:

  • MT7601U initialization requires a GPIO 14 toggle before loading mt7601sta; the device-specific wireless overlay implements this and is tracked in firmware-drift.json.
  • Pan/tilt motors use GPIO 0-7 via gpio-motors.
  • IR-cut uses GPIO 79/78, with the IR backlight on GPIO 52.
  • Speaker enable is GPIO 15, active low.
  • The profile selects SC401AI explicitly and excludes unused sensor/NFS kernel modules.

Tested on a physical ZTE K543: the firmware builds, flashes and boots successfully; SC401AI video, MT7601U Wi-Fi, IR-cut/night mode, speaker output, and both PTZ axes are working.

All repository checks pass (ci-matrix, check-firmware-drift --self-test, lint-cli-paths, lint-workflow-shell, and shell syntax validation).

Copilot AI lite review requested due to automatic review settings September 9, 2026 16:53
@qodo-free-for-open-source-projects

Copy link
Copy Markdown

PR Summary by Qodo

Add ZTE K543 SSC337DE Lite device profile

✨ Enhancement ⚙️ Configuration changes 🕐 20-40 Minutes

Grey Divider

AI Description

• Adds a complete SSC337DE Lite profile for the ZTE K543 camera.
• Configures SC401AI, MT7601U, PTZ, night mode, and active-low speaker hardware.
• Trims unused modules and documents tested 16 MiB NOR support.
Diagram

graph TD
  A["ZTE K543 Profile"] --> B["Build Config"] --> C["Firmware Image"]
  A --> D["Module Excludes"] --> C
  A --> E["Device Customizer"] --> C
  A --> F["Wi-Fi Overlay"] --> C
  C --> G["GPIO Peripherals"]
  C --> H["MT7601U Driver"]
Loading
High-Level Assessment

The device-local profile is the appropriate approach because the GPIO assignments and MT7601U reset sequence are specific to the ZTE K543. A shared wireless overlay was considered, but localizing the quirk avoids affecting other boards while firmware-drift tracking preserves synchronization with the shared firmware source.

Files changed (6) +165 / -0

Enhancement (1) +16 / -0
usbInitialize the K543 MT7601U adapter +16/-0

Initialize the K543 MT7601U adapter

• Adds a device-specific wireless handler that toggles GPIO 14 before loading the mt7601sta kernel module.

devices/ssc337de_lite_zte-k543/general/overlay/etc/wireless/usb

Documentation (1) +1 / -0
README.mdList ZTE K543 hardware support +1/-0

List ZTE K543 hardware support

• Adds the completed ZTE K543 profile to the device matrix with its SSC337DE SoC, SC401AI sensor, MT7601U adapter, and 16 MiB NOR flash.

README.md

Other (4) +148 / -0
firmware-drift.jsonTrack the K543 wireless overlay drift +7/-0

Track the K543 wireless overlay drift

• Registers the device-local wireless script against its shared firmware counterpart and records the reconciled blob revision.

.github/firmware-drift.json

ssc337de_lite_zte-k543_defconfigDefine the K543 Buildroot firmware profile +71/-0

Define the K543 Buildroot firmware profile

• Configures the SSC337DE Infinity6B0 platform, SC401AI sensor, 16 MiB Lite image, and required camera packages. Enables MT7601U wireless support and GPIO motor control.

devices/ssc337de_lite_zte-k543/br-ext-chip-sigmastar/configs/ssc337de_lite_zte-k543_defconfig

customizer.shConfigure K543 camera peripherals +46/-0

Configure K543 camera peripherals

• Sets the firmware upgrade target and Majestic video, night-mode, audio, and active-low speaker settings. Configures the custom wireless identifier and GPIO 0–7 PTZ motor mapping.

devices/ssc337de_lite_zte-k543/general/overlay/usr/share/openipc/customizer.sh

ssc337de_lite.listRemove unused K543 kernel modules +24/-0

Remove unused K543 kernel modules

• Excludes unused SigmaStar sensor drivers while retaining the selected SC401AI module. Also removes NFS, lock manager, and SunRPC modules from the constrained image.

devices/ssc337de_lite_zte-k543/general/scripts/excludes/ssc337de_lite.list

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

qodo-free-for-open-source-projects Bot commented Sep 9, 2026

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (1) 📘 Rule violations (0) 📎 Requirement gaps (0) 🎨 UX issues (0) 🔗 Cross-repo conflicts (0) 📜 Skill insights (0)

Grey Divider


Remediation recommended

1. Wireless setup failures report success 🐞 Bug ☼ Reliability
Description
set_gpio loses each GPIO command's status after sleep, and the matching wireless branch follows
modprobe mt7601sta with an unconditional exit 0. If either GPIO 14 transition or module
insertion fails, the selected startup path still reports success even though the wireless driver was
not initialized correctly.
Code

devices/ssc337de_lite_zte-k543/general/overlay/etc/wireless/usb[R12-13]

+	modprobe mt7601sta
+	exit 0
Evidence
The customizer selects this exact wireless profile, whose handler performs two GPIO transitions and
loads mt7601sta; however, sleep replaces the GPIO command status and the explicit success exit
replaces the module-loading status. The defconfig confirms this path is intended to initialize the
selected MT7601U package.

devices/ssc337de_lite_zte-k543/general/overlay/etc/wireless/usb[3-14]
devices/ssc337de_lite_zte-k543/general/overlay/usr/share/openipc/customizer.sh[29-33]
devices/ssc337de_lite_zte-k543/br-ext-chip-sigmastar/configs/ssc337de_lite_zte-k543_defconfig[63-66]

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-specific wireless initializer discards failures from both GPIO operations and `modprobe`, ultimately returning success after an unsuccessful initialization.
## Issue Context
Preserve the required delays while capturing and propagating GPIO command failures. Return the actual `modprobe` status instead of unconditionally exiting zero; using an explicit conditional or `exec modprobe mt7601sta` is appropriate.
## Fix Focus Areas
- devices/ssc337de_lite_zte-k543/general/overlay/etc/wireless/usb[3-13]

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


Grey Divider

Tip of the day
💡 Did you know, you can switch off images and animations for a plain-text comment

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

Comment thread devices/ssc337de_lite_zte-k543/general/overlay/etc/wireless/usb Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

There are a couple of correctness/consistency issues to address (notably a future “reconciled” date and excludes-list convention/size-trimming alignment).

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Adds a new OpenIPC builder device overlay for the ZTE K543 PTZ camera (SigmaStar SSC337DE / SC401AI / MT7601U, 16 MiB NOR), providing per-device Buildroot defconfig, first-boot customizer settings, wireless init override, and a device-specific excludes list.

Changes:

  • Add ssc337de_lite_zte-k543 device directory with defconfig, customizer, wireless init script, and rootfs exclude list.
  • Register the device in the README device table.
  • Record the device’s etc/wireless/usb shadow in .github/firmware-drift.json.
File summaries
File Description
README.md Adds ZTE K543 to the supported devices table.
devices/ssc337de_lite_zte-k543/general/scripts/excludes/ssc337de_lite.list New device-specific rootfs trimming list (sensor/NFS modules).
devices/ssc337de_lite_zte-k543/general/overlay/usr/share/openipc/customizer.sh First-boot runtime configuration (Majestic, PTZ GPIOs, audio, upgrade URL).
devices/ssc337de_lite_zte-k543/general/overlay/etc/wireless/usb Device-specific MT7601U init (GPIO 14 toggle + modprobe).
devices/ssc337de_lite_zte-k543/br-ext-chip-sigmastar/configs/ssc337de_lite_zte-k543_defconfig Buildroot/OpenIPC configuration for SSC337DE lite + SC401AI + MT7601U + gpio-motors.
.github/firmware-drift.json Adds a shadow entry for the device-local wireless script.
Review details
  • Files reviewed: 6/6 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@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 — and sorry this sat unbuilt for two days: a PR from a first-time contributor needs a maintainer to release the workflow run. Reviewed against master e0a643f with firmware at 9e7cf5b; nothing here blocks, so I am releasing the build now.

This is unusually well put together for a first device PR. Three things I verified rather than took on trust:

  • The firmware-drift.json entry is exactly right. f9df96bc190e8f8a11794f9410568eac10f50320 is the current blob of firmware's general/overlay/etc/wireless/usb at HEAD — I resolved it independently and it matches. Most contributors do not know that file exists; registering the overlay there is the difference between a tracked divergence and a silent one.
  • The exclude list keeps the right sensor. OpenIPC/sensors builds 18 sensors for sigmastar/infinity6b0, your list prunes 17 of them and leaves sc401ai — the board's own — in place.
  • mt7601sta is the right module name: mt7601u-openipc builds the vendor STA driver (it installs /etc/mediatek/MT7601USTA.dat), and three existing upstream profiles modprobe that same name. The kernel config you point at, infinity6b0-ssc009b.config, is the one the other ssc337de device in the tree uses.

One nit: /lib/modules/4.9.84/sigmastar/sensor_jxq03_mipi.ko is not built for infinity6b0 — that sensor exists for other families but not this one — so the entry will never match anything, and rootfs_script.sh will count it in its excludes: N of M entries matched no file line. Harmless, just drop the line.

ci-matrix.py --stdin on your branch narrows to exactly one device, so this is a single build. Let's see what it says.

@openipc-ai
openipc-ai force-pushed the device/ssc337de_lite_zte-k543 branch from 3dbe169 to b4094c4 Compare September 11, 2026 17:28
@openipc-ai
openipc-ai merged commit b63df05 into OpenIPC:master Sep 11, 2026
@tagbug
tagbug deleted the device/ssc337de_lite_zte-k543 branch September 12, 2026 06:00
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.

3 participants