OpenIPC AI teamandGitHub 6fef62c0f3 ci: watch for drift from firmware instead of finding it by accident (#129)
* ci: watch for drift from firmware instead of finding it by accident

builder.sh copies devices/<item>/* over a fresh firmware clone, so a device
directory that ships its own copy of a firmware file replaces it outright. A
fleet-wide change in firmware reaches every device that only references a path
and none that ships its own copy, silently, because nothing in either repository
is looking. One comment on OpenIPC/firmware#2308 turned up three instances of
that in an afternoon: 13 board configs that missed the CONFIG_VT sweep (#126),
97 defconfigs that kept BR2_PACKAGE_JSONFILTER after firmware retired it and put
three devices over their rootfs cap (#128), and excludes lists naming files that
no longer exist (firmware#2313 reports those at build time).

The trigger is the design. Every one of those was caused by a commit in
firmware while this repository sat untouched, so a pull_request check would
never have fired for any of them -- nobody opens a builder PR when firmware
changes. firmware-drift.yml runs on a schedule and files an issue rather than
failing: drift someone else introduced is not a reason to redden a nightly that
is otherwise fine. Only the self-test gates a merge here, out of lint.yml.

Two checks, because the two kinds of drift are not the same shape.

Shadowed files: comparing content is useless, a builder copy is *supposed* to
differ. What matters is whether firmware's version moved since a human last
reconciled them, so each of the 13 entries pins the blob it was reconciled
against. Re-pinning is the act of looking again. The mapping is hand-authored --
nothing can infer that gk7205v200.generic-fpv derives from gk7205v200.generic.

Defconfig symbols: nothing here copies a firmware defconfig, so pinning does not
apply. Every BR2_PACKAGE_*=y is resolved against buildroot, firmware and this
tree and sorted into "resolves nowhere" (a dead line kconfig ignores) and
"resolves, but no firmware defconfig selects it" (needs an allowlist entry). An
allowlist entry can also fence a symbol to the devices that need it; without
that, writing JSONFILTER down as builder-only for devices/apfpv would equally
bless it creeping back onto 95 unrelated defconfigs, which is #128 verbatim.

Replayed against the three regressions, each reproduced by hand on a clean tree:

    firmware moves a shadowed config
      -> br-ext-chip-goke/board/gk7205v200/gk7205v200.generic.config moved in
         firmware since this copy was reconciled (2026-08-25).
         builder copy: devices/common/.../gk7205v200.generic-fpv.config
         pinned 7450c6803f6d, firmware now f97dce84c0f8
         firmware commits since:
           85233f0e kernel: drop CONFIG_VT and the busybox applets ... (#2308)

    jsonfilter creeps back onto a non-apfpv device
      -> BR2_PACKAGE_JSONFILTER is allowlisted only for apfpv/*/configs/*_defconfig,
         but 1 other defconfig(s) select it.

    firmware retires a symbol builder still selects
      -> BR2_PACKAGE_LIBUBOX is selected here but by no firmware defconfig.

Resolving against buildroot is not optional and getting it wrong is how a
checker lies. Buildroot is vendored by neither repository, so a first pass over
OpenIPC packages alone called HOSTAPD, IW, PHP, UHTTPD, LIBZIP and BWM_NG dead;
all six are upstream. Matching only "Config.in" then called PHP_EXT_ZIP dead,
because buildroot declares php's extensions in package/php/Config.ext. Without
--buildroot that half is skipped and says so rather than inventing findings.

Two symbols really do resolve nowhere today -- BR2_PACKAGE_APFPV_GREG on the
four greg-generic devices and BR2_PACKAGE_WIFIBROADCAST_EXT in devices/common.
Both are recorded as known-dead and reported as a notice on every run rather
than removed: whether those devices still want the packages is a maintainer's
call, not a side effect of adding a check.

The three new paths are classified in ci-matrix.py so this PR and every future
re-pin cost no device builds. Without that a blob update is a 107-device run.

* ci: discover shadowed files instead of listing them by hand

Qodo caught the shadow list omitting the device-local t21 and t31 kernel configs.
It was right, and the hole was much bigger than the five it named: a hand-written
list of 13 board configs against 93 same-path shadows covering 35 firmware paths.
The missing ones are not incidental -- load_goke, load_hisilicon, load_sigmastar
and four vendor .mk files are all shadowed by some device, and those are exactly
the shared files a fleet-wide fix lands in. firmware regression-tests
load_hisilicon's os_mem_size derivation; two devices here ship their own copy of
that script and would not have seen the fix.

Listing them by hand was the wrong shape. builder.sh copies devices/<item>/*
over the firmware clone, so any file at a path firmware also has replaces it --
which makes same-path shadows discoverable rather than something to remember.
discover_shadows() walks devices/ and reports anything sitting on a firmware
path with no entry in firmware-drift.json, so the list cannot silently rot and a
device added tomorrow cannot quietly introduce an unreconciled shadow.

The manifest goes from 13 entries to 101: the 88 discovered ones, plus the 13
hand-authored entries that discovery cannot find because the name differs from
the file they replace -- gk7205v200.generic-fpv shadows gk7205v200.generic, and
nothing can infer that.

Two self-test cases for the new path: a same-path shadow with no entry is
reported, and an entry silences it. Verified against the tree by dropping the
load_hisilicon entries, which surfaces both devices immediately.
2026-08-26 01:27:10 +03:00
2023-11-30 00:08:31 +03:00
2024-03-20 17:05:18 +03:00
2025-02-09 15:40:03 +03:00
2024-03-25 21:28:10 +01:00

OpenIPC logo

OpenIPC Builder

(based on Buildroot)

Telegram

Specialized features

  • Tweaker for automatically configuring devices according to profile (gpio, wifi, etc).
  • Specialized storage location for customized firmware for well-known devices.
  • QR code recognition to automatically connect to WiFi on your home network.

List of known and supported devices

Aoni EP01J05             T31L         ?         RTL8188FU_USB    NOR_16M   new
Azarton C1               T20X         JXF23     RTL8189FS_SDIO   NOR_16M   done
Azarton C1               T31X         GC2053    RTL8189FS_SDIO   NOR_16M   done
Babysense See HD IP206   SSC333       GC2053    RTL8188FU_USB    NOR_16M   done
Bathhouse                HI3518EV300  ?         RTL8188FU_USB    NOR_8M    research
Botslab C213             T23N         SC3332    ATBM6012B_USB    NOR_8M    **INIT** - frozen
CCDCAM IM50Q01           SSC377QE     IMX335    -                NOR_16M   done
ChinaTelecom DS-YTJ5301  SSC30KD      GC2053    RTL8188FU_USB    NOR_16M   video-ok, wifi-no, motors-no
ChinaTelecom Y4H-50      T31L         ?         ?                NOR_16M   new
CMCC HDC-51 A5-V12       T21N         SC2235    RTL8189FTV_SDIO  NOR_16M   done
CMCC HDC-51 A6-V10       T31L         JXF37     RTL8188FU_USB    NOR_16M   done
CMCC HDC-51 A6-V11       T31L         SC2332    RTL8188FU_USB    NOR_16M   done
Cootli CAMV0103          GK7202V300   SC223A    SSV6355_USB      NOR_8M    in progress
CP Plus CP-UNC-TA21L2C   GK7205V200   SC223A    -                NOR_16M   video-ok, ir-cut-no, audio-no
Emax Wyvern Link         SSC338Q      IMX415                     NOR_16M   done
Foscam X5                SSC337DE     GC4653    RTL8188FU_USB    NOR_16M   done
G.Craftsman GCA50        T31ZX        GC4653    -                NOR_16M   done
EC37-T11                 T20L         SC2232    RTL8188FU_USB    MOR_16M   in progress
H3C TC2101               SSC337       JXQ03     RTL8188FU_USB    NOR_16M   done
HB-WIFI-Z6 v1.2          T10          JXH62     RTL8188EU_USB    NOR_8M    in progress
iFlytek XFP301-M         T31ZX        JXQ03     RTL8188FU_USB    NOR_16    research
Imilab EC3 CMSXJ25A      SSC325       GC2053    MT7603UN_?       NOR_16M   in progress
Dahua IPC-HFW1230SP-V2   SSC335DE     GC2053                     NOR_16M   done
Imou IPC-C22E-S2-v2      SSC335DE     GC2053    RTL8188FU_USB    NOR_16M   done
Imou IPC-C22EP-S2        SSC325DE     SC2239    RTL8188FU_USB    NAND      testing stage 1
Imou IPC-C22EP-S2 ?      SSC325DE     SC2335    RTL8188FU_USB    NAND      wait sensor driver
Imou IPC-С22СP           SSC325       SC2239    RTL8188FU_USB    NOR_8M    in progress
Jooan A6M-U              T23N         SC1346    ATBM6012B_USB    NOR_8M    **INIT** - in progress
Jooan A6M-U vB           T23N         SC1A4T    ATBM6012B_USB    NOR_8M    **INIT** - in progress
Jooan Q3R-U              T23N         SC1346    ATBM6012B_USB    NOR_8M    **INIT** - in progress
JVS INGT10 GQS60EP       T10A         OV9750    -                NOR_8M    done
Lenovo Snowman 1080P     HI3518EV200  SC2035    RTL8188EUS_USB   NOR_16M   in progress, LightSensor-no
LSC 3215672              T23N         SC2331    ATBM6012B_USB    NOR_8M    **INIT** - progress
Meari Speed 6S           SSC333       JXF37     RTL8188FU_USB    NOR_16M   video-yes, wifi-yes, motors-no
OpenIPC AIO Mario        SSC338Q      IMX335    RTL8812AU_USB    NOR_16M   done
OpenIPC AIO Thinker      SSC338Q      IMX335                     NOR_16M   done
OpenIPC AIO UltraSight   SSC338Q      IMX415    RTL8812AU_USB    NOR_16M   done
OpenIPC URLLC            SSC338Q                                 NOR_16M   done
Qtech QVC-IPC-136W       HI3518EV200  OV9732    RTL8188EU_USB    NOR_16M   done
Rostelecom IPC8232SWC-WE HI3516EV300  SP2305    RTL8188FU_USB    NAND      done
RunCam WiFiLink          SSC338Q      IMX415                     NOR_16M   done
RVi-1NCMW2028 (2.8)      HI3516EV300  SC2330    RTL8188FU_USB    NAND      testing
Smartwares CIP-37210     HI3518EV200  OV9732    RTL8188FU_USB    NOR_16M   done
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
Tiandy TC-C321N          GK7205V200   OS02G10   -                NOR_8M    done
Tiandy TC-C321N v2       SSC337       SC2336P   -                NOR_8M    done
Tiandy TC-C32QN          GK7205V210   OS02G10   -                NOR_8M    done
TP-Link Kasa KC110       HI3518EV200  OV2735    RTL8188FU_USB    NOR_16M   ptz-yes, video-WIP (pending majestic MIPI fix)
TP-Link Tapo C110 v1     SSC335       SC3335    ATBM6032i_USB    NOR_8M    done
TP-Link Tapo C110 v1     SSC337       SC3335    SSW101B_USB      NOR_8M    done
TP-Link Tapo C110 v2     SSC333       SC3338    SSW101B_USB      NOR_8M    done
TP-Link Tapo C110 v26    SSC333       ?         ?                NOR_?     done
TP-Link Tapo C310 v1     SSC325       SC3335    RTL8192EU_USB    NOR_8M    in progress
TP-Link Tapo C310 v2.20  SSC335       SC3338    RTL8192EU_USB    NOR_8M    testing
TP-Link Tapo TC60 V5     T23N                   WQ9001_?         NOR_8M    **INIT** - frozen
TP-Link Tapo TC70 V3     T31L         SC2336    RTL8188FU_USB    NOR_8M    done
Trassir TR-D4121IR1 v2   HI3516CV200  AR0237    -                NOR_16M   done
Trassir TR-W2C1 v1       SSC325       GC2053    MT7601U_USB      NOR_16M   done
Trassir TR-W2C1 v2       SSC335       GC2053    MT7601U_USB      NOR_16M   done
Tuya GV7630-T31-PTZ      T31L         SC2336    ATBM6012B_USB    NOR_8M    in progress
Umea QC012               GK7102C_A    MIS2003   RDA5995_USB      MOR_8M    wip
Uniview C1L-2WN-G        SSC335DE     OS02G10   RTL8188FU_USB    NOR_16M   done
Vixand IPC-1             GK7205V200   none      EC200N_USB       NOR_8M    frozen
Vixand IPH-5-4G          GK7205V200   SC2239    EC200N_USB       NOR_8M    frozen
Vixand IVG-G3S           GK7205V210   IMX307    -                NOR_16M   in progress
Vixand IVG-G4F-A         GK7205V210   SC223A    -                NOR_16M   in progress
Vixand IVG-G4F-A-W       GK7205V210   SC223A    ATBM6032i_USB    NOR_16M   w/ext wifi board
Vixand IVG-G4H           GK7205V210   MIS2008   -                NOR_16M   done
Vixand IVG-G6S           GK7205V300   IMX335    -                NOR_16M   done
Vixand IVG-G6S-W         GK7205V300   IMX335    ATBM6032i_USB    NOR_16M   w/ext wifi board
VStarcam C43S(B)         SSC333       JXF37     MT7601U_USB      NOR_16M   in progress
VStarcam CS55            T31N         GC2053    RTL8188FU_USB    NOR_16M   in progress
VStarcam C8622           T23N         SC2336P   AIC8800DL_?      NOR_8M    **INIT** - in progress
VStarcam C8892WIP        HI3518EV200  AR0237    MT7601U_USB      NOR_16M   done
VStarcam C8896WIP        GK7102C_A    GC2033    RTL8189ES_SDIO   NOR_8M    wip
Wansview Q5 1080p        T21Z         OV2735B   RTL8188FU_USB    NOR_16M   in progress
Wansview Q5 2K           T31L         SC2336    ATBM6031_SDIO    NOR_8M    done
Wyze V3 (WYZEC3B)        T31X         GC2053    RTL8189FS_SDIO   NOR_16M   done
X-06S v2.2               T21          JXH62     RTL8188FU_USB    NOR_8M    in progress
Xiaomi MJSXJ02HL         HI3518EV300  JXF22     RTL8189FS_SDIO   NOR_16M   preparation
Xiaomi MJSXJ03HL         T31N         JXQ03     RTL8189FS_SDIO   NOR_16M   done
Xiaomi MJSXJ03HL         T31N         JXQ03P    RTL8189FS_SDIO   NOR_16M   done
Xiaomi MJSXJ05HL         T31L         GC2053    ATBM6031_SDIO    NOR_16M   preparation
ZTE K540                 T31X         SC4336    ATBM6012B_USB    NOR_16M   done
4G Camera XG521 V1.2     GK7202V300   GC1054    EC800E-CN_USB    NOR_8M    done
XM IPG-G3-WR             GK7202V300   JXH63     ATBM60321S_USB   NOR_8M    done

Compatibility and clones

Many devices sold in online stores are clones of original devices or, more often, devices adapted for the local national market.

Model names                            Our firmware

Dahua IPC-HFW1230SP-V3          =>     Dahua IPC-HFW1230SP-V2
Dahua IPC-C22C-LC               =>     Imou IPC-С22CP
Imou IPC-С22EP-A                =>     Imou IPC-С22CP
Imou IPC-F22AP                  =>     Imou IPC-С22CP
Switcam HS303 v3                =>     Qtech QVC-IPC-136W
Tiandy TC-C320N                 =>     Tiandy TC-C321N
Tiandy TC-C320N v2              =>     Tiandy TC-C321N v2
TP-Link Tapo C110 v2.20         =>     TP-Link Tapo C110 v2
TP-Link Tapo C200 v3.00         =>     TP-Link Tapo TC70 V3
Rostelecom IPC8232SWC-WE-B      =>     Uniview C1L-2WN-G
Rostelecom IPC C22E-S2 v2       =>     Imou IPC-C22E-S2-v2
Uniview C1L-2WN-G-RU            =>     Uniview C1L-2WN-G

Device setup

WiFi Settings

Run these commands and enjoy:

fw_setenv wlanssid 'OpenIPC'
fw_setenv wlanpass 'mypassword'
reboot

Requirements for registration of new devices

When adding new devices, please follow a few simple rules. The list of files to be added should be minimal, try not to store binary files, remember that all common files and configurations should be stored in the firmware repository. However, some list of files must be required.

processor_flavor_vendor-model-version/br-ext-chip-sigmastar/configs/processor_flavor_vendor-model-version_defconfig
processor_flavor_vendor-model-version/general/overlay/usr/share/openipc/customizer.sh
processor_flavor_vendor-model-version/general/scripts/excludes/processor_flavor.list

The file names contain variables with option names - flavor, model, processor, vendor, version

  • flavor - firmware direction in the openipc system, by default try to use "lite" as much as possible
  • model - official model name from the main device manufacturer
  • processor - official name of the processor in the OpenIPC structure
  • vendor - the name of the official equipment manufacturer; if there are several of them, a description is created
  • version - usually this is an addition to the model, version or revision of hardware differences

Preparing and using the project

sudo apt-get update -y
sudo apt-get install -y automake autotools-dev bc build-essential curl fzf git libtool rsync \
  unzip mc tree python-is-python3
git clone https://github.com/openipc/builder.git
cd builder
./builder.sh

Create firmware with built-in credentials

  • Usage: repack.sh [uboot] [firmware] [ssid] [pass]
sh repack.sh ssc337de ssc337de_ultimate_foscam-x5-nor router password

Existing problems

  • On some devices NOR flash 8M is small, and the WiFi driver is very large and the QR scanner currently does not fit into the firmware

Additional information

Technical support and donations

Please support our project with donations or orders for development or maintenance. Thank you!

Open Collective donate button

S
Description
No description provided
Readme MIT
7.2 MiB
2026-09-27 11:06:03 +02:00
Languages
Shell 57.9%
Python 31.4%
Makefile 6.1%
C 4.4%
Dockerfile 0.2%