Repository navigation
Closed
Description
ipctool master+e816803 (built 2026-11-04, release ipctool ARM static) on an Amcrest IP4M-1026E
(Dahua OEM, HWID IPC-HFW1430SN-Lexus) running its stock firmware, as root:
ipctool: SoC not recognised, no hardware report possible.
no UART0 entry in /proc/iomem
no vendor matches /proc/cpuinfo: Ambarella
Hardware:
- SoC: Ambarella S3L, chip marking
S3L-K-B0-RH; single Cortex-A9 r4p1 (NEON/VFPv3) - DRAM 256 MiB (Linux gets
mem=118M; IAV/DSP carve-out from 0x07800000) - Sensor OmniVision OV4689 (MIPI, I2C0 @0x36)
- 32 MiB SPI NOR (Winbond W25Q256JV), Ambarella
amba_spinorcontroller - Ethernet: Ambarella MAC, RMII PHY ID 0x001cc816 (RTL8201F)
- Stock: Linux 3.10.73, glibc 2.21 armhf, BusyBox 1.18.4, Dahua U-Boot 2010.06
Possible detection hints:
/proc/cpuinfoHardwareisAmbarella S3L (Flattened Device Tree)/proc/device-tree/compatiblecontainsambarella,s3l/proc/iomemlists only System RAM / kernel code / data, so the UART0 check has nothing to match.
The Ambarella UART0 is on APB at 0xe8005000 (APB base 0xe8000000), see theAmbarella: APB =boot line.- The
Ambarella: IAVMEM = ...lines are specific to Ambarella kernels.
Note for anyone else running ipctool on Dahua Ambarella firmware: this kernel refuses execve() of
files on writable filesystems (/tmp, jffs2). The shell reports /tmp/ipctool: Success with exit code 2.
I had to start the static binary through a small userland loader run by /lib/ld-linux-armhf.so.3.
(The init=/etc/rootsh.sh in the command line below is my own dev change; stock is init=/linuxrc.)
cat /proc/cpuinfo; cat /proc/iomem; dmesg | head -40:
processor : 0
model name : ARMv7 Processor rev 1 (v7l)
BogoMIPS : 812.64
Features : swp half thumb fastmult vfp edsp thumbee neon vfpv3 tls
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x4
CPU part : 0xc09
CPU revision : 1
Hardware : Ambarella S3L (Flattened Device Tree)
Revision : 0000
Serial : 0000000000000000
00200000-077fffff : System RAM
00208000-005afce7 : Kernel code
005ce000-0061c66f : Kernel data
Booting Linux on physical CPU 0x0
Initializing cgroup subsys cpu
Linux version 3.10.73 (jenkins@centos234) (gcc version 5.2.1 20151005 (Linaro GCC 5.2-2015.11-2) ) #2 PREEMPT Tue Nov 7 17:30:32 CST 2017
CPU: ARMv7 Processor [414fc091] revision 1 (ARMv7), cr=10c53c7d
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
Machine: Ambarella S3L (Flattened Device Tree), model: Ambarella S3L Olive Board
os ----- 200000 , 7600000
logmem start:777e000, size:80000.
network type:1.
debug: ignoring loglevel setting.
init gLogRamRes: start=0x777e000;size=0x80000
Memory policy: ECC disabled, Data cache writeback
Ambarella: AHB = 0xe0000000[0xe0000000],0x01000000 0
Ambarella: APB = 0xe8000000[0xe8000000],0x01000000 0
Ambarella: PPM = 0x00000000[0xdfe00000],0x00200000 9
Ambarella: AXI = 0xf0000000[0xf0000000],0x00030000 0
Ambarella: DRAMC = 0xdffe0000[0xef000000],0x00020000 0
Ambarella: DBGBUS = 0xec000000[0xec000000],0x00200000 0
Ambarella: DBGFMEM = 0xee000000[0xee000000],0x01000000 0
Ambarella: IAVMEM = 0x07800000[ ],0x18800000
Ambarella: FBMEM = 0x00000000[ ],0x00000000
On node 0 totalpages: 30208
free_area_init_node: node 0, pgdat 803f808c, node_mem_map 80421000
Normal zone: 236 pages used for memmap
Normal zone: 0 pages reserved
Normal zone: 30208 pages, LIFO batch:7
CPU: All CPU(s) started in SVC mode.
pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
pcpu-alloc: [0] 0
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 29972
Kernel command line: console=ttyS0,115200 mem=118M root=/dev/mtdblock5 rootfstype=squashfs init=/etc/rootsh.sh ignore_loglevel
PID hash table entries: 512 (order: -1, 2048 bytes)
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 118MB = 118MB total
Memory: 114940k/114940k available, 5892k reserved, 0K highmem
Virtual kernel memory layout:
vector : 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)
vmalloc : 0x87800000 - 0xff000000 (1912 MB)
Metadata
Metadata
Assignees
Labels
No labels
Activity
openipc-ai commentedon Nov 6, 2026
Thanks for the detailed report. The hints were right: these kernels list no UART in
/proc/iomem, and ipctool had no Ambarella entry. The PR that adds detection is linked above. It is untested on real hardware, so could you try it on your camera?Please run these with the stock application running. The sensor probably needs the vendor video stack to be up, so your
rootshinit may not show it:ipctool hexdump -C /proc/device-tree/iavmem/reg hexdump -C /proc/device-tree/memory/reg ls /dev/i2c-* /dev/iav /proc/ambarella cat /proc/ambarella/clockI also have one question about memory. You list 256 MiB of DRAM, but your boot log has
IAVMEM = 0x07800000,0x18800000, which ends at 512 MiB. Where does the 256 MiB come from? The marking on the DRAM chip would settle it. Amboot builds that value from a compile-time constant, so the log alone doesn't prove either figure. Until this is clear, ipctool will report only the memory the kernel sees.The report will say
S3Lrather than the exact part, because only the DSP firmware knows that. Thanks for the note aboutexecve()too; it's now in the project notes.ambarella: detect the SoC from the machine string (#267)
DeathCamel58 commentedon Nov 6, 2026
Thanks for the quick fix. I tested the
latestreleaseipctool(sha256 63c9be5) on the stock firmware, withsoniarunning (uptime about 80 s). It was started through the userland loader because of theexecve()restriction.ipctool(exit 0):Detection works. No sensor section appears; see the I2C note below.
hexdump -C /proc/device-tree/iavmem/regand.../memory/reg: not possible on this firmware. The Dahua 3.10.73 kernel exports no device tree: there is no/proc/device-tree(CONFIG_PROC_DEVICETREEis off) and/sys/firmwareis empty. Its busybox also has nohexdump/od. The flash DTB (at 0x8000 in the kernel partition) hasmemory { reg = <0x200000 0x7e00000>; }and noiavmemnode. TheIAVMEMrange comes from the bootloader's boot parameters, and Linux is then capped bymem=118Mon the command line.ls /dev/i2c-* /dev/iav /proc/ambarella:There are no i2c-dev nodes: Dahua's own
prc.ko/sensor.kodrive the sensor I2C. For reference, the sensor is an OmniVision OV4689 on SoC I2C0 at 7-bit address 0x36, chip ID0x4688at register0x300a, confirmed under an OpenIPC kernel that has i2c-dev.cat /proc/ambarella/clock:Memory: the board really has 512 MiB of DRAM. My "256 MiB" in the report was wrong. The DRAM is a single Samsung K4B4G1646E-BYMA (datasheet): 4 Gbit DDR3L-1866 organised 256M × 16, so one chip on the 16-bit bus = 512 MiB. The stock
IAVMEM = 0x07800000,0x18800000(ending at 0x20000000) is therefore correct:0x00200000–0x07800000: Linux, capped bymem=118Mon the command line0x07800000–0x20000000: IAV/DSP carve-out, 392 MiBChecked on the running board: physical memory above 256 MiB holds its own data and does not alias the low 256 MiB (e.g.
0x10208000≠0x00208000), and stock's DSP command queue sits near the top of the 512 MiB at0x1fad8000. Theram: total: 128Min the ipctool output below is only the kernel-visible part, as you described.openipc-ai commentedon Nov 6, 2026
Thanks, that settles it. Detection is confirmed on your camera, and the DRAM marking plus the aliasing check answers the memory question. I had treated the
IAVMEMvalue as unproven because of the 256 MiB figure, but it was right.Memory: #268 makes ipctool report the top of the DSP carve-out, so your camera should show
total: 512Mandmedia: 392M. Your stock kernel has no/proc/device-tree, so it reads theIAVMEMline from the kernel log. That line is printed once at boot, so a camera that has been up for a long time may fall back to128M.Sensor: I'll leave this as a known limit on stock firmware. There are no
/dev/i2c-*nodes, and using the I2C controller directly would race Dahua'ssensor.kowhilesoniais running.Two more checks, when you have time:
ram:section.OV4689. Please include thesensors:andram:sections. On that kernel the memory figure should come from/proc/device-tree/iavmem/reg, if the node exists there.A build from the PR's branch is the easiest way to test before it merges. The
latestrelease will have it once it's in.ambarella: report total RAM from the DSP carve-out (#268)
ram: keep a total that is already a power of two
DeathCamel58 commentedon Nov 6, 2026
Tested #268 on both firmwares. Detection and
mediaare right, buttotalcame out doubled, which #269 fixes.Merged #268 (
latest, 7c51a7e):IAVMEMread from the boot log):total: 1024M,media: 392M/proc/device-tree/iavmem/reg=07 80 00 00 18 80 00 00):total: 1024M,media: 392Mambarella_totalmem()returns the right 524288 KiB. The doubling is inrounded_num(), which turns an exact power of two into the next one (512 → 1024); a kernelMemTotalnever hit that.With #269, stock firmware (
soniarunning):No
sensors:section on stock, as expected (no/dev/i2c-*).With #269, OpenIPC kernel (3.10.104,
s3l.generic.config+CONFIG_LBDAF=y, i2c-dev, H.264 stream running; VCAP kept ticking during the run, 71 -> 163):OV4689 on I2C0 at 0x6c (7-bit 0x36), chip ID
0x4688. This was the first run of ipctool's own probe, and it found the right part.mediahere comes from/proc/device-tree/iavmem/reg.Both #269 builds are arm32 with the CI toolchain (
toolchain.hisilicon-hi3516cv100, musl) and packed with UPX 4.2.3, as inrelease.yml.openipc-ai commentedon Nov 6, 2026
Thanks for testing on both firmwares. The doubled
totalwas my miss: I said #268 should report512Mwithout checking the rounding inram.c, and your #269 fixes it. I've reviewed and approved that PR, and its CI is running.The OV4689 result is the one we were missing. It's the first run of ipctool's own sensor probe on Ambarella hardware, and it found the right part at the right address with the stream running.
On this camera that now confirms the following:
Ambarella/S3Lon both firmwares.total: 512Mandmedia: 392M, from the boot log on stock and from/proc/device-tree/iavmem/regon your OpenIPC kernel.sensors:section because it has no/dev/i2c-*, as expected.This issue can close once #269 is merged.
openipc-ai commentedon Nov 6, 2026
Closing this now that #269 is merged. On the Amcrest IP4M-1026E, the reporter confirmed
Ambarella/S3Ldetection on stock and OpenIPC firmware,total: 512Mandmedia: 392Mon both, and OV4689 on the OpenIPC kernel. Stock firmware reports no sensor because it has no/dev/i2c-*. The exact part (33M, 55M and so on) is not reported, because only the DSP firmware knows it. Thanks for all the testing.ram: keep a total that is already a power of two (#269)
ambarella: S3L machine, so ipctool and load_ambarella run without the…