Switcam B200 - #156
Conversation
PR Summary by QodoAdd Switcam B200 SSC337DE device profile
AI Description
Diagram
High-Level Assessment
Files changed (4)
|
Code Review by Qodo
1.
|
| # | ||
| # Set custom upgrade url | ||
| # | ||
| fw_setenv upgrade 'https://github.com/OpenIPC/builder/releases/download/latest/ssc337de_ultimate_switcam-b200-nand.tgz' |
There was a problem hiding this comment.
2. First boot requests a missing update 📘 Rule violation ☼ Reliability
3
customizer.sh stores an upgrade URL ending in ssc337de_ultimate_switcam-b200-nand.tgz instead of the required ssc337de_ultimate_switcam-b200-nor.tgz. When the camera invokes its seeded updater, it requests a filename outside the board artifact convention used by the release flow.
Agent Prompt
## Issue description
The first-boot upgrade URL names a NAND archive rather than the required board-specific NOR release artifact.
## Fix Focus Areas
- devices/ssc337de_ultimate_switcam-b200/general/overlay/usr/share/openipc/customizer.sh[8-8]
## Recommended Fix
Change the URL suffix from `ssc337de_ultimate_switcam-b200-nand.tgz` to `ssc337de_ultimate_switcam-b200-nor.tgz`.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
| @@ -0,0 +1,5 @@ | |||
| /lib/modules/4.9.84/kernel/fs/lockd/lockd.ko | |||
There was a problem hiding this comment.
3. Firmware keeps unwanted kernel modules 📘 Rule violation ➹ Performance
4
The new exclusion file is named ssc337de.list instead of the flavor-qualified lookup key ssc337de_ultimate.list, even though the device identity declares the ultimate flavor and the repository selects <soc>_<flavor>.list. Because the device payload is copied without renaming files, builds for this target do not consume its five module deletions, retaining the listed NFS modules and preventing those exclusions from contributing to image sizing.
Agent Prompt
## Issue description
The exclusion filename omits the target's `ultimate` flavor, so it does not match the SoC-and-flavor lookup used for this board and its exclusions are not applied.
## Fix Focus Areas
- devices/ssc337de_ultimate_switcam-b200/general/scripts/excludes/ssc337de.list[1-5]
## Recommended Fix
Rename `devices/ssc337de_ultimate_switcam-b200/general/scripts/excludes/ssc337de.list` to `devices/ssc337de_ultimate_switcam-b200/general/scripts/excludes/ssc337de_ultimate.list`, preserving all current exclusion entries unchanged.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
openipc-ai
left a comment
There was a problem hiding this comment.
Thanks for the profile — the runtime side (GPIO map, night-mode pins, audio) looks like real hardware work. But the device is not registered, so nothing here is reachable by a build yet.
Blocking: there is no defconfig
devices/ssc337de_ultimate_switcam-b200/ ships only general/. The file that registers a device is missing:
devices/ssc337de_ultimate_switcam-b200/br-ext-chip-sigmastar/configs/ssc337de_ultimate_switcam-b200_defconfig
Its name must match the directory name exactly — that is what make BOARD= looks up, and ./builder.sh ssc337de_ultimate_switcam-b200 fails without it.
The consequence is worse than "the board is not built", and it is visible on this PR right now:
$ python3 .github/scripts/ci-matrix.py --self-test # master: 114 devices
$ python3 .github/scripts/ci-matrix.py --self-test # this branch: 114 devices
$ gh pr view 156 --json files -q '.files[].path' | python3 .github/scripts/ci-matrix.py --stdin
ci-matrix: 114/114 devices (needs_build=True) --- devices/ssc337de_ultimate_switcam-b200/general/overlay/usr/share/openipc/customizer.sh is in no directory CI buildsTwo things fall out of that. The self-test passes, because a directory with no defconfig is not in the device set at all — there is nothing for it to disagree about, so CI cannot warn you. And because ci-matrix.py maps a changed file to "the devices whose defconfig shares its directory", an unrecognised path widens back to the full matrix instead of narrowing. Run 34712449145 on this branch is therefore building all 114 devices, none of which is the B200.
The closest template is devices/ssc337de_ultimate_foscam-x5/ — same SoC, same ultimate flavor. Copy its defconfig and change the SoC/flash/WiFi/sensor lines for this board. Note BR2_OPENIPC_FLASH_SIZE is the NOR/NAND size in MB and is still required.
Also
Three inline comments below: the excludes filename, the -nand.tgz artifact name, and the README row position.
Happy to help with the defconfig if you can post the board's flash size, WiFi module (if any) and NAND geometry — those are the parts only someone with the hardware can supply.
| @@ -0,0 +1,5 @@ | |||
| /lib/modules/4.9.84/kernel/fs/lockd/lockd.ko | |||
There was a problem hiding this comment.
This list will never be read — it needs the flavor in its name.
The filename is computed by the firmware, not taken from the device directory. general/scripts/rootfs_script.sh:25:
LIST="${BR2_EXTERNAL_GENERAL_PATH}/scripts/excludes/${OPENIPC_SOC_MODEL}_${OPENIPC_VARIANT}.list"For this board that resolves to ssc337de_ultimate.list, so ssc337de.list is never opened. And the whole block is wrapped in if [ -f "${LIST}" ] — the script reports, never fails — so a misnamed list prunes nothing and prints no diagnostic at all. Rename the file to ssc337de_ultimate.list (keep it named after soc+flavor, not the device).
While you are in here: this list carries only the five nfs/sunrpc entries, where the sibling devices/ssc337de_lite_zte-k543/general/scripts/excludes/ssc337de_lite.list also prunes 18 sensor_*_mipi.ko. Worth mirroring that block minus sensor_sc223a_mipi.ko, which is the sensor this board actually uses.
One thing not to rely on as a substitute: pinning BR2_OPENIPC_SNS_MODEL="sc223a" in the defconfig will not cover those modules. general/package/sigmastar-osdrv-infinity6b0/sigmastar-osdrv-infinity6b0.mk branches on OPENIPC_SNS_MODEL only for /etc/sensors/*.bin; the sensor_*_mipi.ko come from the kernel build and are unaffected. (This is the opposite of T31, where pinning the sensor does make the list redundant.)
Once the list is being read you can confirm it in the build log — rootfs_script.sh prints excludes: N of M entries in <name> matched no file for a list it opened, which is the cheap way to tell a working list from a decorative one.
| # | ||
| # Set custom upgrade url | ||
| # | ||
| fw_setenv upgrade 'https://github.com/OpenIPC/builder/releases/download/latest/ssc337de_ultimate_switcam-b200-nand.tgz' |
There was a problem hiding this comment.
-nand.tgz needs confirming — it is only produced under one condition.
A nand artifact exists only when the defconfig sets BR2_TARGET_ROOTFS_UBI=y; see the repack target in the firmware Makefile:
ifeq ($(BR2_TARGET_ROOTFS_UBI),y)
ifneq ($(filter $(BR2_OPENIPC_SOC_VENDOR),"rockchip" "sigmastar"),)
@$(call PREPARE_REPACK,,,rootfs.ubi,16384,nand)CI then renames it to <device>-nand.tgz, so the name here is right if the build emits one — which cannot be checked, because the defconfig is missing.
Worth a deliberate answer rather than a default: every NAND board currently in the tree points its upgrade URL at -nor.tgz, not -nand.tgz — hi3516ev300_ultimate_rostelecom-ipc8232swc-we, hi3516ev300_ultimate_rvi-1ncmw2028, and ssc325de_lite_imou-c22ep-s2 (the closest match: sigmastar, BR2_TARGET_ROOTFS_UBI=y). They all set BR2_TARGET_ROOTFS_SQUASHFS=y alongside UBI and so build both artifacts.
So either set BR2_TARGET_ROOTFS_UBI=y and keep -nand.tgz deliberately, or match the siblings. Please say which, so whoever hits a broken self-update later can find the reasoning.
(The Qodo bot above states -nor.tgz is mandatory — that is not true in general, the suffix follows the artifact the build actually produces.)
| Smartwares CIP-37210AT T21N JXF37 RTL8188FU_USB NOR_16M done | ||
| Switcam HS303 v1 HI3518EV200 JXF22 RTL8188FU_USB NOR_16M done | ||
| Switcam HS303 v2 HI3518EV200 OV9732 RTL8188EU_USB NOR_16M done | ||
| Switcam B200 SSC337DE SC223A NAND done |
There was a problem hiding this comment.
Small one: the table is sorted alphabetically, so Switcam B200 belongs above the two Switcam HS303 rows, not below them. Column alignment itself is correct.
Also worth confirming rather than leaving blank: the WiFi column is empty and the customizer sets no fw_setenv wlandev. Those two are at least consistent with each other, but an ethernet-only Switcam is unusual — if the board does have a WiFi module, both this row and the defconfig's BR2_PACKAGE_<chip>_OPENIPC=y line need it.
|
Thanks for the quick turnaround — two of the three are properly fixed:
The blocker is still open, though — and for a reason you cannot see anywhere in the GitHub UI. The defconfig filename ends in an invisible character
$ ls devices/ssc337de_ultimate_switcam-b200/br-ext-chip-sigmastar/configs/ | cat -A
ssc337de_ultimate_switcam-b200_defconfigM-bM-^@M-^N$
^^^^^^^^^^ e2 80 8e = U+200EIt renders as nothing — in the file tree, in the diff, in the commit, in your editor. But the filename no longer equals the directory name, which is the exact string $ python3 .github/scripts/ci-matrix.py --self-test
ci-matrix: self-test ok (114 devices, ...) # identical to master -- device not registered
$ gh pr view 156 --json files -q '.files[].path' | python3 .github/scripts/ci-matrix.py --stdin
ci-matrix: 114/114 devices (needs_build=True) --- devices/ssc337de_ultimate_switcam-b200/br-ext-chip-sigmastar/configs/ssc337de_ultimate_switcam-b200_defconfig<U+200E> is in no directory CI buildsMy guess is it rode along in a pasted filename — invisible marks like this are easy to pick up copying a name out of a rendered page or a chat client. The fixDeleting that one character is the whole fix. Verified locally on your branch: $ python3 .github/scripts/ci-matrix.py --self-test
ci-matrix: self-test ok (115 devices, ...)
$ gh pr view 156 --json files -q '.files[].path' | python3 .github/scripts/ci-matrix.py --stdin
ci-matrix: 1/115 devices (needs_build=True) --- narrowed to the affected devices
ssc337de_ultimate_switcam-b200114 -> 115 devices, and the PR stops building the entire matrix and builds just your board. Locally: cd devices/ssc337de_ultimate_switcam-b200/br-ext-chip-sigmastar/configs
git mv "$(ls)" ssc337de_ultimate_switcam-b200_defconfig
git commit -m "strip stray U+200E from defconfig filename"Or in the web UI: open the file, hit the pencil, clear the filename box completely and retype the name by hand rather than pasting it. Then confirm with Happy to push the rename to Still open from the earlier review, neither blocking:
|
No description provided.