Repository navigation
rostelecom-ipc8232swc-we: catch up with firmware, keep wired DHCP, find the SD card - #192
Conversation
…nd the SD card - Build rootfs.ubi from firmware's family ubinize-nand.cfg (#2537 layout) instead of a device copy of the old kernel-volume + squashfs layout; same for rvi-1ncmw2028, which carried the identical copy. - Drop the forked load_hisilicon, a Feb 2025 snapshot that forced the hisi allocator and lacks everything firmware fixed since. - Defconfig follows firmware's hi3516ev300_ultimate minus hardware this camera lacks; drops the dead LIBWEBSOCKETS_OPENIPC symbol. - customizer.sh: stop setting wlandev (it turns off DHCP on eth0), the -nor.tgz upgrade URL (wrong package on NAND), and totalmem, osmem and sensor (firmware derives all three now). - muxes.sh: rebind the SD host after powering the slot; the kernel scanned it unpowered and card detect never changes. - Excludes: drop the three WDR/ profiles firmware no longer ships.
PR Summary by QodoModernize IPC8232SWC-WE firmware profile and restore first-boot access
AI Description
Diagram
High-Level Assessment
Files changed (6)
|
Code Review by Qodo
1. The camera lacks an explicit update URL
|
…e pinned customizer.sh runs once, so cameras set up by an earlier version of this profile keep its -nor.tgz upgrade URL, which a NAND camera cannot install. muxes.sh runs every boot; it clears the URL only while it is exactly that one.
Problem
The Rostelecom IPC8232SWC-WE profile had drifted from firmware, and three of its first-boot settings break the camera:
muxes.shraises from S30customizer. The kernel scannedmmc0at init, while the slot was still unpowered. This board's card-detect bit never changes, so nothing scans again. The card was invisible to both the kernel and the vendor U-Boot ("Card did not respond to voltage select").customizer.shdidfw_setenv wlandev rtl8188fu-generic. Withwlandevset,S40networknever runsifup eth0; it gives the wired port the static fallback192.168.2.10. With no WiFi credentials, a camera on Ethernet was unreachable from its first boot.upgradewas pinned to…-nor.tgz, and sysupgrade reads it ahead of its own default (<BUILD_PLATFORM>-<nor|nand>.tgz), so this NAND camera would be sent to the NOR package.The rest is drift:
rootfs.ubiwas ubinized from a device copy of the old NAND layout: a separatekernelvolume and a squashfsrootfs. Firmware#2537 moved the family to one UBIFS rootfs with/boot/fitImageinside, so a fresh install from this image could not boot. Sysupgrade writesrootfs.ubifsand was not affected.rvi-1ncmw2028carries the identical copy, so it gets the same one-line fix.load_hisiliconwas a Feb 2025 snapshot that forcedmmz_allocator=hisi. Since then firmware has added the cipher engine, HWRNG, thesensor=unknownlatch fix (#2428), the device-tree DDR fallback and CMA zone handling.LIBWEBSOCKETS_OPENIPC, a package firmware removed in #2503.totalmem,osmemandsensorin the customizer are no longer needed. Firmware reads the DDR size from the device tree and defaults osmem to 32M, which gives the 96M CMA zone. The SP2305 is autodetected: it reads as ov2735, and firmware shipsov2735_i2c_1080p.ini -> sp2305_i2c_1080p.ini.Changes
hi3516ev300_ultimate_defconfig, minus divinus, motors, majestic-af and the MT7601U/8188EU WiFi packages, plus this camera's RTL8188FU. UBI config points at$(EXTERNAL_VENDOR)/board/$(OPENIPC_SOC_FAMILY)/ubinize-nand.cfg; the same change forrvi-1ncmw2028.ubinize_hisilicon.cfgcopies, this device'sload_hisiliconand itsfirmware-drift.jsonentry. The RVi's ownload_hisiliconfork is left alone, because I have no RVi to test it on.customizer.sh: nowlandev(the WiFi lines stay commented, for owners who want WiFi), noupgrade,totalmem,osmemorsensor.muxes.sh: aftergpio set 38, rebind10010000.sdhci, only whenmmc0has no card. A card the kernel already holds is never touched (cf. zenointel-sd-2n-4g: stop re-muxing the SD pad under a live card #188).WDR/IMX335 profiles firmware no longer ships.Hardware tested on
The device itself: lab IPC8232SWC-WE (Hi3516EV300 + SP2305, 128 MB NAND, 64 GB SDXC card). The image was built locally from this branch over firmware
3fbc75ecwithBUILD_PLATFORMset as CI sets it, and flashed withsysupgrade -k -r --force_soc --archive=. Before the flash,/etc/custom.okand the old customizer's env were cleared, so the customizer ran a real first boot. The overlay (password, EULA record) was kept.One caveat: the flashed image still had
fw_setenv totalmem 128Min its customizer. I checked dropping it by clearingtotalmemon the camera and rebooting. The commit's customizer differs from the flashed one only by that deleted line.rvi-1ncmw2028is not hardware-tested; its change is the UBI config path only.Evidence
Before, the first boot of an image with the old customizer (serial console; env afterwards held
wlandev=rtl8188fu-generic):Before, the SD slot: every command times out at every clock, as long as GPIO38 is low (kprobe on
mmc_request_done):After, first boot of this branch's image (UART, then ssh):
sensor=ov2735is the valueload_hisiliconstores after autodetect.RTSP
stream=0, 5 s over TCP:codecs ['H264/90000', 'opus/48000/2', 'vnd.onvif.metadata/90000'], 652 video and 498 audio RTP packets, about 1.1 Mbit/s./image.jpgis a 1920x1080 colour picture.The same results after a further reboot with
totalmemcleared: nototalmemin env, the same 96M zone, majestic streaming, card mounted.WiFi still works when asked for:
modprobe 8188fubrings upwlan0(USB0bda:f179), and a scan finds 13 networks.Image size: uImage 2005/2048 KB, rootfs.ubi 16384/24576 KB, squashfs 7152/8192 KB.
ci-matrix.py --self-testandcheck-firmware-drift.py --self-testpass. The selector narrows to the two ev300 devices.Not changed
set_gpio(28, 0) erroronce at start; the second call a second later succeeds. That is majestic's, not this profile's.--archiveneeds--force_socin current firmware, and an archive stored on the SD card cannot work at all. sysupgrade unmounts the card first. Both are firmware issues.