Add the vendor firmware: stock flash dump, update file, both unpacked
vendor/ holds the camera's 16 MB NOR dump (backup-ssc377d-nor16m.bin), the vendor update V3.6.1.3, and their unpacked trees, which the RE tools and notes read. verify.py now defaults to vendor/flash_dump_ssc377d, and the docs point at vendor/ instead of folders beside the checkout. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EfVNki7giKruPunvux6dDA
This commit is contained in:
1 parent
61168c0021
commit
07da135257
2231 files changed
+62468
-17
No files matched your search
@@ -250,8 +250,8 @@ item here is measured, not inferred from the binaries, unless it says otherwise.
|
||||
```sh
|
||||
cd af-board-re
|
||||
python3 -m pip install unicorn # in a venv
|
||||
python3 verify.py # defaults to ../../flash_dump_ssc377d
|
||||
python3 od.py ../../flash_dump_ssc377d/rootfs/opt/ch/comm_server 1bd64 1c1e0 # annotated disassembly
|
||||
python3 verify.py # defaults to ../vendor/flash_dump_ssc377d
|
||||
python3 od.py ../vendor/flash_dump_ssc377d/rootfs/opt/ch/comm_server 1bd64 1c1e0 # annotated disassembly
|
||||
```
|
||||
|
||||
Addresses for the flash-dump build:
|
||||
|
||||
+2
-2
@@ -17,7 +17,7 @@ Nothing is committed. The repositories and branches:
|
||||
|
||||
Paths in sections 1–5 are relative to `openipc/firmware` unless they name another repository. Section 6 paths are relative to `openipc/`.
|
||||
|
||||
The prose documents (`MCL18D-PORT.md`, `AF-BOARD-PROTOCOL.md`, `LEARNING-GUIDE.md`, `TECH-SPEC.md`, `../firmware_MCL18D_V3.6.1.3/gpio_map.md`) are not repeated here.
|
||||
The prose documents (`MCL18D-PORT.md`, `AF-BOARD-PROTOCOL.md`, `LEARNING-GUIDE.md`, `TECH-SPEC.md`, `vendor/firmware_MCL18D_V3.6.1.3/gpio_map.md`) are not repeated here.
|
||||
|
||||
## Contents
|
||||
|
||||
@@ -4956,7 +4956,7 @@ sys.path.insert(0, HERE)
|
||||
from emu import Emu # noqa: E402
|
||||
from plt import plt_map # noqa: E402
|
||||
|
||||
ROOT = os.path.abspath(sys.argv[1] if len(sys.argv) > 1 else os.path.join(HERE, '../../flash_dump_ssc377d'))
|
||||
ROOT = os.path.abspath(sys.argv[1] if len(sys.argv) > 1 else os.path.join(HERE, '../vendor/flash_dump_ssc377d'))
|
||||
CS = f'{ROOT}/rootfs/opt/ch/comm_server'
|
||||
PLT = plt_map(CS)
|
||||
FD = 5
|
||||
|
||||
+4
-3
@@ -220,7 +220,7 @@ So `irCutPin1=11` and `irCutPin2=80`.
|
||||
| D7 | TX/RX (ttyS2), SPKEN, red/blue IO |
|
||||
| D1 | pin 7 = reset, pin 8 = network LED |
|
||||
|
||||
The full map is in `../firmware_MCL18D_V3.6.1.3/gpio_map.md`.
|
||||
The full map is in `vendor/firmware_MCL18D_V3.6.1.3/gpio_map.md`.
|
||||
|
||||
---
|
||||
|
||||
@@ -701,14 +701,15 @@ The source of the onvif patch.
|
||||
| `gc5603-difftest/` | The differential sensor test |
|
||||
| `af-board-re/` | Lens-protocol emulator and checks |
|
||||
| `images/` | The built firmware |
|
||||
| `vendor/` | The stock flash dump and the vendor update file, as received |
|
||||
| `vendor/firmware_MCL18D_V3.6.1.3/` | The unpacked update file, plus `gpio_map.md` and `board.dts` |
|
||||
| `vendor/flash_dump_ssc377d/` | The unpacked flash dump |
|
||||
| `MCL18D-PORT.md`, `AF-BOARD-PROTOCOL.md`, this file | Notes |
|
||||
|
||||
### Outside `openipc/`
|
||||
|
||||
| Item | Contents |
|
||||
|---|---|
|
||||
| `firmware_MCL18D_V3.6.1.3/` | The unpacked update file, plus `gpio_map.md` and `board.dts` |
|
||||
| `flash_dump_ssc377d/` | The unpacked flash dump |
|
||||
| `~/.cache/openipc-mcl18d/` | Build tree, download cache, logs |
|
||||
|
||||
---
|
||||
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
# OpenIPC on the AnjoyVision MC-L18D (SSC377D + GC5603)
|
||||
|
||||
Sources analysed: `backup-ssc377d-nor16m.bin` (full 16 MB NOR dump, extracted to
|
||||
`../flash_dump_ssc377d/`) and the vendor update `r1885__firmware_MCL18D_...bin`
|
||||
(extracted to `../firmware_MCL18D_V3.6.1.3/`). Both carry the same kernel and the
|
||||
`vendor/flash_dump_ssc377d/`) and the vendor update `r1885__firmware_MCL18D_...bin`
|
||||
(extracted to `vendor/firmware_MCL18D_V3.6.1.3/`). Both carry the same kernel and the
|
||||
same GC5603 driver; the rootfs in the flash dump is an older app build.
|
||||
|
||||
## Layout of this folder
|
||||
|
||||
@@ -44,6 +44,7 @@ document that covers it in depth.
|
||||
| `ipctool/`, `majestic-af/` | submodules, reference only, no changes |
|
||||
| `patches/` | `<submodule>.patch` for each submodule with changes, and `export.sh`, which regenerates them |
|
||||
| `images/` | the built firmware: `openipc.ssc377d-nor-lite.tgz`, `uImage.ssc377d`, `rootfs.squashfs.ssc377d` |
|
||||
| `vendor/` | the stock firmware: the camera's 16 MB flash dump, the vendor's update file, and both unpacked |
|
||||
| `af-board-re/` | lens-board protocol tools: ARM emulator, PLT and literal-pool resolvers, `verify.py` |
|
||||
| `gc5603-difftest/` | differential test running the vendor's and the rebuilt sensor driver side by side |
|
||||
| `builder/Dockerfile` | the Ubuntu 24.04 build container |
|
||||
@@ -53,11 +54,19 @@ document that covers it in depth.
|
||||
| `AF-BOARD-PROTOCOL.md` | the lens-board serial protocol, byte by byte |
|
||||
| `CODE-CHANGES.md` | every changed file, in full |
|
||||
|
||||
**Not in this repository:** the vendor's firmware. The RE steps start from a 16 MB
|
||||
flash dump of the camera (`backup-ssc377d-nor16m.bin`) and the vendor's update file
|
||||
(`r1885__firmware_MCL18D_V0-A-H5_V3.6.1.3_*.bin`). Both are the vendor's binaries, and
|
||||
the dump also carries the unit's MAC address. The tools expect them unpacked next to
|
||||
this checkout, as `../flash_dump_ssc377d/` and `../firmware_MCL18D_V3.6.1.3/`.
|
||||
**The vendor firmware** is in `vendor/`. The RE steps start from these files:
|
||||
|
||||
| Path | What it is |
|
||||
|---|---|
|
||||
| `vendor/backup-ssc377d-nor16m.bin` | full 16 MB NOR dump of this camera before OpenIPC: boot, kernel, rootfs (app V3.4.5.2) and settings. The only way back to stock |
|
||||
| `vendor/r1885__firmware_MCL18D_V0-A-H5_V3.6.1.3_20260917092033.bin` | the vendor's update file: same kernel and sensor driver, newer app |
|
||||
| `vendor/flash_dump_ssc377d/` | the dump unpacked: `boot.bin`, kernel, `rootfs/`, and the settings partition in `data/` |
|
||||
| `vendor/firmware_MCL18D_V3.6.1.3/` | the update file unpacked, plus the RE outputs `board.dts` (the vendor device tree) and `gpio_map.md` |
|
||||
|
||||
The dump carries this unit's MAC address and settings. In
|
||||
`vendor/firmware_MCL18D_V3.6.1.3/`, two files did not come from the vendor:
|
||||
`passwd_sys.orig.bak` and `rootfs.new.squashfs`
|
||||
([guide §18](LEARNING-GUIDE.md#18-loose-ends-in-the-folder)).
|
||||
|
||||
---
|
||||
|
||||
@@ -98,6 +107,8 @@ You need this picture before any of the changes make sense
|
||||
|
||||
([guide §3](LEARNING-GUIDE.md#3-taking-the-vendor-firmware-apart))
|
||||
|
||||
Both inputs, and what they unpack to, are in `vendor/`.
|
||||
|
||||
**The update file.** `binwalk` and `xxd` show a 1556-byte vendor header (`ANJOY888`),
|
||||
a uImage kernel and an xz SquashFS. The uImage header says LZMA but the payload is xz:
|
||||
trust the magic bytes, not the header.
|
||||
@@ -232,7 +243,7 @@ and memory corruption in SetPreset. They are fixed in
|
||||
- `verify.py` re-derives every frame in the spec from the binaries: 40/40 checks pass.
|
||||
|
||||
```sh
|
||||
python3 af-board-re/verify.py ../flash_dump_ssc377d
|
||||
python3 af-board-re/verify.py # reads vendor/flash_dump_ssc377d; needs unicorn
|
||||
```
|
||||
|
||||
### 10. Build
|
||||
|
||||
+1
-1
@@ -781,4 +781,4 @@ BR2_PACKAGE_ONVIF_SIMPLE_SERVER=y
|
||||
| Sensor differential test | `openipc/gc5603-difftest/` |
|
||||
| Lens protocol emulation and checks | `openipc/af-board-re/` |
|
||||
| Built images | `openipc/images/` |
|
||||
| Vendor references | `flash_dump_ssc377d/` (authoritative), `firmware_MCL18D_V3.6.1.3/` (update file; see LEARNING-GUIDE §18 for two files of unknown origin there) |
|
||||
| Vendor references | `vendor/flash_dump_ssc377d/` (authoritative), `vendor/firmware_MCL18D_V3.6.1.3/` (update file; see LEARNING-GUIDE §18 for two files of unknown origin there) |
|
||||
@@ -18,7 +18,7 @@ sys.path.insert(0, HERE)
|
||||
from emu import Emu # noqa: E402
|
||||
from plt import plt_map # noqa: E402
|
||||
|
||||
ROOT = os.path.abspath(sys.argv[1] if len(sys.argv) > 1 else os.path.join(HERE, '../../flash_dump_ssc377d'))
|
||||
ROOT = os.path.abspath(sys.argv[1] if len(sys.argv) > 1 else os.path.join(HERE, '../vendor/flash_dump_ssc377d'))
|
||||
CS = f'{ROOT}/rootfs/opt/ch/comm_server'
|
||||
PLT = plt_map(CS)
|
||||
FD = 5
|
||||
|
||||
BIN
Binary file not shown.
BIN
Binary file not shown.
+1957
File diff suppressed because it is too large.
Load diff
+51
@@ -0,0 +1,51 @@
|
||||
# MC-L18D (firmware MCL18D_V0-A-H5_V3.6.1.3) GPIO map
|
||||
|
||||
SoC: SigmaStar Infinity6C (SSC337D class), DT model "INFINITY6C SSC027A-S01A".
|
||||
GPIO numbers below are Linux sysfs numbers (/sys/class/gpio/gpioN) == SigmaStar PAD index.
|
||||
|
||||
## Board table used by the app (libtools.so: g_io_mcl12d2, selected for device type 0x681 = MCL18D)
|
||||
| GPIO | Pad | Dir | Init | Function (type code) |
|
||||
|------|---------------|-----|------|---------------------------------|
|
||||
| 12 | PAD_SPI0_DO | out | - | audio amp / speaker enable (4) |
|
||||
| 60 | PAD_SR_IO00 | in | - | reset button (3) |
|
||||
| 10 | PAD_SPI0_CK | out | 1 | alarm output 1 (2) |
|
||||
| 44 | PAD_FUART_CTS | in | - | alarm input 1 (1) |
|
||||
| 61 | PAD_SR_IO01 | out | 1 | LED brightness / white LED (12) |
|
||||
|
||||
## Kernel IRLED driver (/dev/irled, built into kernel, drivers/char)
|
||||
| GPIO | Pad | Name |
|
||||
|------|---------------|----------|
|
||||
| 11 | PAD_SPI0_DI | IRCUT A |
|
||||
| 80 | PAD_SAR_GPIO1 | IRCUT B |
|
||||
| 23 | PAD_PM_IRIN | IRDET (IR / light detect input) |
|
||||
| 44 | PAD_FUART_CTS | wifi_pwr (generic driver default; same pad the app uses as alarm-in) |
|
||||
| 45 | PAD_FUART_RTS | SDEN (SD card power enable) |
|
||||
|
||||
## Device tree
|
||||
- SD card detect: pad 22 (PAD_PM_SD_CDZ), SD power: pad 45 (PAD_FUART_RTS), SD bus: pads 15-20
|
||||
- PWM0 / PWM1 muxed on pads 13 / 14; I2C1 on pads 58 / 59 (sensor), SPI0 CZ pad 9 (flash)
|
||||
- UART0 console on ttyS0
|
||||
|
||||
## Other app-side sysfs writes that apply to this SoC
|
||||
- media_server at start: export gpio30 (PAD_PM_GPIO4), direction out, value 0 (runs for 377D-type chips, i.e. this board)
|
||||
- record_server: gpio45 high/low = SD card power
|
||||
- mainctrl: exports gpio61 and gpio80 as outputs (LED / IR-cut B)
|
||||
- Numbers 108, 113, 140 in the binaries belong to other SoC variants (I6C only has pads 0-81)
|
||||
|
||||
## Pad index to name (from kernel gpio table)
|
||||
0 SD1_IO1 1 SD1_IO0 2 SD1_IO5 3 SD1_IO4 4 SD1_IO3 5 SD1_IO2 6 SD1_IO6 7 UART1_RX 8 UART1_TX
|
||||
9 SPI0_CZ 10 SPI0_CK 11 SPI0_DI 12 SPI0_DO 13 PWM0 14 PWM1 15 SD_CLK 16 SD_CMD 17 SD_D0 18 SD_D1
|
||||
19 SD_D2 20 SD_D3 21 USB_CID 22 PM_SD_CDZ 23 PM_IRIN 24 PM_UART_RX 25 PM_UART_TX 26 PM_GPIO0
|
||||
27 PM_GPIO1 28 PM_GPIO2 29 PM_GPIO3 30 PM_GPIO4 31 PM_GPIO7 32 PM_GPIO8 33 PM_GPIO9 34 PM_SPI_CZ
|
||||
35 PM_SPI_DI 36 PM_SPI_WPZ 37 PM_SPI_DO 38 PM_SPI_CK 39 PM_SPI_HLD 40 PM_LED0 41 PM_LED1
|
||||
42 FUART_RX 43 FUART_TX 44 FUART_CTS 45 FUART_RTS 46 GPIO0 47 GPIO1 48 GPIO2 49 GPIO3 50 GPIO4
|
||||
51 GPIO5 52 GPIO6 53 GPIO7 54 GPIO14 55 GPIO15 56 I2C0_SCL 57 I2C0_SDA 58 I2C1_SCL 59 I2C1_SDA
|
||||
60-77 SR_IO00..SR_IO17 78 SAR_GPIO3 79 SAR_GPIO2 80 SAR_GPIO1 81 SAR_GPIO0
|
||||
|
||||
## Resolved later (see ../openipc/MCL18D-PORT.md)
|
||||
- Lamps: white light = PWM0 on PAD_PWM0 (pad 13); IR light = PWM4 on PAD_SPI0_CZ (pad 9).
|
||||
The wiring sheet's "PWM1" label on D5-3 is the IR lamp, which is PWM4 in silicon.
|
||||
- PAD_PWM1 (pad 14) is the Ethernet activity LED; PAD_FUART_RX/TX are the zoom/PTZ UART.
|
||||
- IR-cut direction: the vendor pulses GPIO 80 for day (filter in) and GPIO 11 for night.
|
||||
- GPIO 30 (PAD_PM_GPIO4) is the core-voltage select line, not a peripheral.
|
||||
- Verified identical in the flashed build (backup-ssc377d-nor16m.bin).
|
||||
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
@@ -0,0 +1,18 @@
|
||||
root:$1$yFuJ6yns$33Bk0I91Ji0QMujkR/DPi1:0:0:root:/root:/bin/sh
|
||||
bin:*:1:1:bin:/bin:
|
||||
daemon:*:2:2:daemon:/usr/sbin:
|
||||
sys:*:3:3:sys:/dev:
|
||||
adm:*:4:4:adm:/var/adm:
|
||||
lp:*:5:7:lp:/var/spool/lpd:
|
||||
sync:*:6:8:sync:/bin:/bin/sync
|
||||
shutdown:*:7:9:shutdown:/sbin:/sbin/shutdown
|
||||
halt:*:8:10:halt:/sbin:/sbin/halt
|
||||
mail:*:9:11:mail:/var/spool/mail:
|
||||
news:*:10:12:news:/var/spool/news:
|
||||
uucp:*:11:13:uucp:/var/spool/uucp:
|
||||
operator:*:12:0:operator:/root:
|
||||
games:*:13:100:games:/usr/games:
|
||||
ftp:*:15:14:ftp:/var/ftp:
|
||||
man:*:16:100:man:/var/cache/man:
|
||||
telnetd:*:17:100:telnetd:/var/tmp:
|
||||
nobody:*:65534:65534:nobody:/home:/bin/sh
|
||||
Binary file not shown.
BIN
Binary file not shown.
+1
@@ -0,0 +1 @@
|
||||
busybox
|
||||
+1
@@ -0,0 +1 @@
|
||||
busybox
|
||||
+1
@@ -0,0 +1 @@
|
||||
busybox
|
||||
+1
@@ -0,0 +1 @@
|
||||
busybox
|
||||
+1
@@ -0,0 +1 @@
|
||||
busybox
|
||||
+1
@@ -0,0 +1 @@
|
||||
busybox
|
||||
+1
@@ -0,0 +1 @@
|
||||
busybox
|
||||
+1
@@ -0,0 +1 @@
|
||||
busybox
|
||||
+1
@@ -0,0 +1 @@
|
||||
busybox
|
||||
+1
@@ -0,0 +1 @@
|
||||
busybox
|
||||
+1
@@ -0,0 +1 @@
|
||||
busybox
|
||||
+1
@@ -0,0 +1 @@
|
||||
busybox
|
||||
+1
@@ -0,0 +1 @@
|
||||
busybox
|
||||
+1
@@ -0,0 +1 @@
|
||||
busybox
|
||||
+1
@@ -0,0 +1 @@
|
||||
busybox
|
||||
BIN
Binary file not shown.
+1
@@ -0,0 +1 @@
|
||||
busybox
|
||||
+1
@@ -0,0 +1 @@
|
||||
busybox
|
||||
+1
@@ -0,0 +1 @@
|
||||
busybox
|
||||
+1
@@ -0,0 +1 @@
|
||||
busybox
|
||||
+1
@@ -0,0 +1 @@
|
||||
busybox
|
||||
+1
@@ -0,0 +1 @@
|
||||
busybox
|
||||
+1
@@ -0,0 +1 @@
|
||||
busybox
|
||||
+1
@@ -0,0 +1 @@
|
||||
busybox
|
||||
+1
@@ -0,0 +1 @@
|
||||
busybox
|
||||
+1
@@ -0,0 +1 @@
|
||||
busybox
|
||||
+1
@@ -0,0 +1 @@
|
||||
busybox
|
||||
+1
@@ -0,0 +1 @@
|
||||
busybox
|
||||
+1
@@ -0,0 +1 @@
|
||||
busybox
|
||||
+1
@@ -0,0 +1 @@
|
||||
busybox
|
||||
+1
@@ -0,0 +1 @@
|
||||
busybox
|
||||
+1
@@ -0,0 +1 @@
|
||||
busybox
|
||||
+1
@@ -0,0 +1 @@
|
||||
busybox
|
||||
+1
@@ -0,0 +1 @@
|
||||
busybox
|
||||
+1
@@ -0,0 +1 @@
|
||||
busybox
|
||||
+1
@@ -0,0 +1 @@
|
||||
busybox
|
||||
+1
@@ -0,0 +1 @@
|
||||
busybox
|
||||
+1
@@ -0,0 +1 @@
|
||||
busybox
|
||||
+1
@@ -0,0 +1 @@
|
||||
busybox
|
||||
+1
@@ -0,0 +1 @@
|
||||
busybox
|
||||
+1
@@ -0,0 +1 @@
|
||||
busybox
|
||||
+1
@@ -0,0 +1 @@
|
||||
busybox
|
||||
+1
@@ -0,0 +1 @@
|
||||
busybox
|
||||
+1
@@ -0,0 +1 @@
|
||||
busybox
|
||||
+1
@@ -0,0 +1 @@
|
||||
busybox
|
||||
+1
@@ -0,0 +1 @@
|
||||
busybox
|
||||
+1
@@ -0,0 +1 @@
|
||||
busybox
|
||||
+1
@@ -0,0 +1 @@
|
||||
busybox
|
||||
+1
@@ -0,0 +1 @@
|
||||
busybox
|
||||
+1
@@ -0,0 +1 @@
|
||||
busybox
|
||||
+1
@@ -0,0 +1 @@
|
||||
busybox
|
||||
+1
@@ -0,0 +1 @@
|
||||
busybox
|
||||
+1
@@ -0,0 +1 @@
|
||||
busybox
|
||||
+1
@@ -0,0 +1 @@
|
||||
busybox
|
||||
+1
@@ -0,0 +1 @@
|
||||
busybox
|
||||
+1
@@ -0,0 +1 @@
|
||||
busybox
|
||||
+1
@@ -0,0 +1 @@
|
||||
busybox
|
||||
+1
@@ -0,0 +1 @@
|
||||
busybox
|
||||
+1
@@ -0,0 +1 @@
|
||||
busybox
|
||||
+1
@@ -0,0 +1 @@
|
||||
busybox
|
||||
+1
@@ -0,0 +1 @@
|
||||
busybox
|
||||
+1
@@ -0,0 +1 @@
|
||||
busybox
|
||||
+1
@@ -0,0 +1 @@
|
||||
busybox
|
||||
+1
@@ -0,0 +1 @@
|
||||
busybox
|
||||
+1
@@ -0,0 +1 @@
|
||||
busybox
|
||||
+1
@@ -0,0 +1 @@
|
||||
busybox
|
||||
+1
@@ -0,0 +1 @@
|
||||
busybox
|
||||
+1
@@ -0,0 +1 @@
|
||||
busybox
|
||||
+1
@@ -0,0 +1 @@
|
||||
busybox
|
||||
+1
@@ -0,0 +1 @@
|
||||
busybox
|
||||
+1
@@ -0,0 +1 @@
|
||||
busybox
|
||||
+1
@@ -0,0 +1 @@
|
||||
busybox
|
||||
+1
@@ -0,0 +1 @@
|
||||
busybox
|
||||
+1
@@ -0,0 +1 @@
|
||||
busybox
|
||||
+1
@@ -0,0 +1 @@
|
||||
busybox
|
||||
+1
@@ -0,0 +1 @@
|
||||
busybox
|
||||
+1
@@ -0,0 +1 @@
|
||||
busybox
|
||||
+1
@@ -0,0 +1 @@
|
||||
busybox
|
||||
+1
@@ -0,0 +1 @@
|
||||
busybox
|
||||
+1
@@ -0,0 +1 @@
|
||||
busybox
|
||||
+1
@@ -0,0 +1 @@
|
||||
busybox
|
||||
+1
@@ -0,0 +1 @@
|
||||
busybox
|
||||
Loaded 100 of 2231 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user