SoC vendor
Goke / XMedia
SoC model
GK7205V510 (built as gk7205v500_ultimate, NAND/UBI layout, 128 MB DDR)
Camera model
Zenointel SD-2N-4G
Output of cat /etc/os-release
NAME=Buildroot
VERSION=-gde9a4d123-dirty
OPENIPC_VERSION=2.6.10.04
GITHUB_VERSION="local+build, 2026-10-04"
BUILD_OPTION=ultimate
(a local build of the NAND branch that landed as #2526; bootargs are the image default)
mem=128M ... mmz_allocator=cma mmz=anonymous,0,0x42000000,96M
What happens
sysupgrade --archive=/root/fw.tgz -z (an 11 MB archive holding fitImage + rootfs.ubifs and their md5sums, kept on the overlay, with majestic stopped) is OOM-killed when it moves into RAM. Nothing is written, so the camera stays on the old image, but the update silently does not happen.
/root/su.log (stdout redirected there):
Moving the flash phase into RAM
Handing PID 1 over to the RAM root; ...
Killed
EXIT=137
dmesg:
(dump_header) from (oom_kill_process+0x59/0x2b0)
(oom_kill_process) from (out_of_memory+0x235/0x284)
Killed process 3065 (sysupgrade) total-vm:1444kB, anon-rss:264kB, file-rss:236kB, shmem-rss:0kB
Memory right after, with nothing running:
total used free shared buff/cache available
Mem: 123 8 97 0 18 96
MemAvailable: 98292 kB
CmaTotal: 98304 kB
CmaFree: 98124 kB
free reports 97 MB free, but 96 MB of it is the MMZ CMA area. The RAM root that sysupgrade pivots into, and the images unpacked into it, cannot be placed in CMA pages, which leaves about 27 MB of ordinary memory for the whole flash phase. An earlier flash on the same camera with the same layout succeeded, so this is a thin margin that sometimes fails, not a guaranteed failure.
Workaround that worked: boot once with mmz=anonymous,0,0x42000000,32M, run the same sysupgrade (it completed), then put the 96M bootargs back.
The same layout also makes the obvious alternative worse. Copying the full 22 MB openipc.gk7205v500-nand-ultimate.tgz into /tmp first OOM-killed most processes on the camera.
What you expected instead
Either sysupgrade fits in the memory left outside CMA on a 128 MB gk7205v500, or it refuses up front with a clear message before handing PID 1 over. For example, it could check MemAvailable - CmaFree against what the RAM phase needs.
A related question is whether 96 MB of CMA is the right default for 128 MB parts. The streaming pipeline on this camera (1080p H.265 main stream + JPEG) allocated about 15 MB of MMZ.
SoC vendor
Goke / XMedia
SoC model
GK7205V510 (built as
gk7205v500_ultimate, NAND/UBI layout, 128 MB DDR)Camera model
Zenointel SD-2N-4G
Output of
cat /etc/os-release(a local build of the NAND branch that landed as #2526; bootargs are the image default)
What happens
sysupgrade --archive=/root/fw.tgz -z(an 11 MB archive holdingfitImage+rootfs.ubifsand their md5sums, kept on the overlay, with majestic stopped) is OOM-killed when it moves into RAM. Nothing is written, so the camera stays on the old image, but the update silently does not happen./root/su.log(stdout redirected there):dmesg:Memory right after, with nothing running:
freereports 97 MB free, but 96 MB of it is the MMZ CMA area. The RAM root thatsysupgradepivots into, and the images unpacked into it, cannot be placed in CMA pages, which leaves about 27 MB of ordinary memory for the whole flash phase. An earlier flash on the same camera with the same layout succeeded, so this is a thin margin that sometimes fails, not a guaranteed failure.Workaround that worked: boot once with
mmz=anonymous,0,0x42000000,32M, run the samesysupgrade(it completed), then put the 96M bootargs back.The same layout also makes the obvious alternative worse. Copying the full 22 MB
openipc.gk7205v500-nand-ultimate.tgzinto/tmpfirst OOM-killed most processes on the camera.What you expected instead
Either
sysupgradefits in the memory left outside CMA on a 128 MB gk7205v500, or it refuses up front with a clear message before handing PID 1 over. For example, it could checkMemAvailable - CmaFreeagainst what the RAM phase needs.A related question is whether 96 MB of CMA is the right default for 128 MB parts. The streaming pipeline on this camera (1080p H.265 main stream + JPEG) allocated about 15 MB of MMZ.