Skip to content

HeimVision PE3020-W: AK3918 V300/F37 board findings, 1.5 MiB kernel-slot mismatch and bring-up questions #234

Open

Description

@steezywee

Report

Sharing the findings from a HeimVision PE3020-W port investigation, following the firmware repository's guidance that retail-device profiles belong in builder. This is early board-support work, not a working builder profile, a flash-ready image or a reproduced regression in a current official release.

Related work:

These are useful references, but the TC100's sensor, wiring and memory assumptions should not automatically be applied to this board.

Hardware identification

  • Camera: HeimVision PE3020-W.
  • Photographed SoC marking: AK3918EN064 / V300-J.
  • PCB identifier: AK3919EV300_V601_F37.
  • Stock runtime board label: AK3919Ev300(V310).
  • Working family identification: AK3918 V300 / EV300-family. The exact EN064 and J suffix meanings have not been verified against an authoritative marking guide. The PCB/runtime labels are not independent proof of an AK3919 package.
  • Retained stock observations: ARM926EJ-S / ARMv5TEJ, Linux 3.4.35, F37 sensor ID 0x0f37, RTL8188FU Wi-Fi and 8 MiB Macronix NOR (mx25l6405d, JEDEC 0xc22017).
  • DRAM: stock U-Boot reports 64 MiB. This is separate from Linux's usable-memory accounting and the package suffix.

Relevant saved Telnet results

An authenticated read-only stock-camera session on 8 November 2026 recorded the following. These are sanitized values reformatted from the saved structured session record, not a reconstructed verbatim terminal transcript. They describe that observation, not a fresh check today.

Kernel release:  3.4.35
Architecture:    armv5tejl

Linux memory accounting:
MemTotal:        30356 kB
MemFree:          7008 kB
Buffers:          2688 kB
Cached:           7412 kB
Slab:             4240 kB

Stock driver bindings:
eth0  -> ak_ethernet
wlan0 -> rtl8188fu
wlan1 -> rtl8188fu

Selected loaded modules:
8188fu, otg_hs, akmci, ak39_top_wdt, ak_info_dump, akcamera
sensor_f35, sensor_f37, sensor_sc2145, sensor_sc2232,
sensor_sc2235, sensor_sc4236, sensor_sh2232

Seven sensor modules were loaded, so sensor_f37 being present is not by itself active-sensor identification. Likewise, stock driver bindings do not validate replacement-kernel drivers, and watchdog-module presence does not establish its armed state.

The same session recorded these partition capacities; all reported an erase size of 65,536 bytes. Physical offsets below were reconciled separately against the retained partition-layout evidence, not inferred from a firmware-upgrade file.

Partition       Start       End         Bytes
boot            0x000000    0x060000      393216
ENV             0x060000    0x070000       65536
MAC             0x070000    0x080000       65536
KERNEL          0x080000    0x200000     1572864
ROOT            0x200000    0x300000     1048576
USR.SQUASH      0x300000    0x780000     4718592
USR.JFFS2       0x780000    0x800000      524288
Total                                  8388608

Ends are exclusive. These are physical NOR offsets, not offsets within an update package or flashing instructions. Partition metadata and saved backups do not establish a successful restore test.

Concrete size mismatch: 1.5 MiB is the flash kernel slot, not RAM

The official openipc.ak3918ev300-nor-lite.tgz archive inspected on 11 November 2026 was 6,526,789 bytes:

Archive SHA-256:
4d44ffecb91ceffb77616860367d80e35b587b1f9e5430f00b9f7e57e7327bf2

uImage.ak3918ev300:
  size:    1638128 bytes
  SHA-256: e238a3dc5c7c93c6381e852bc7c54e9a51be95aace59560caa5d64284e4fbafc

rootfs.squashfs.ak3918ev300:
  size:    4931584 bytes
  SHA-256: 1201cd721aaa274c3146d49b1199f9a6f12532c5c6a02933834df5fd323bffa0

The recorded archive matched the verified official-release digest; the included MD5 checks and kernel header/data CRCs passed. The hashes identify this exact snapshot rather than a moving latest release.

1,638,128 - 1,572,864 = 65,264 bytes over the stock kernel partition. The inspected image's DT uses a generic 2 MiB kernel / 5 MiB rootfs layout, not this camera's stock split. An image fitting an 8 MiB NOR in its intended layout does not mean it fits these individual stock partitions. Trimming userspace/rootfs packages alone cannot fix the separate kernel-slot overflow.

This blocks direct flashing into the existing stock slot. It does not by itself rule out a separately reviewed RAM test or prove that a smaller build is impossible. No validated repartitioning recipe for this board is claimed.

Memory layout is a separate problem

Saved stock-kernel analysis identifies:

  • A 30 MiB media pool at 0x80000000–0x81e00000.
  • A 34 MiB Linux bank, before kernel reservations, at 0x81e00000–0x84000000.

The stock reserved_mem_size sysfs getter returns a compiled 30 MiB constant; that reading alone is not an allocation measurement. The placement above also relies on retained stock platform/ION data. Linux's 30,356 kB MemTotal is not the total physical DRAM or available staging space.

The inspected official kernel instead declares 64 MiB starting at 0x80000000, with a 24 MiB media reservation at 0x81400000, and its zImage decompresses at 0x80008000. Changing only the outer load address does not move that decompression destination into the stock upper bank. The generic layout is not necessarily wrong; mixing assumptions from the two layouts is the problem. Physical loader work areas, inherited DMA and RAM ownership still need qualification.

Results on the physical camera

A custom OpenIPC-derived Linux 4.4.302 diagnostic kernel/root reached a deliberately held PID1 endpoint through a RAM boot. The newer diagnostic container was 1,572,512 bytes, with reported full-transfer CRC32 87ecda6b; the supplied log identified IPC86-DIAG-UART-UNQUALIFIED and reached:

RAMROOT UNPROVISIONED/UNQUALIFIED: management held closed

This test intentionally did not provide a shell, network management or native video. Its serial transcript was incomplete/interleaved, so it does not establish clean UART, complete mount success, sustained stability or absence of every warning. After power-cycling, I confirmed stock discovery and live, updating video returned. This is an observed return to stock operation, not proof of recovery from every failure mode or a full flash-content readback.

Separately, a stock-preserving HTTP-to-RTSP bridge displayed real 640×360 H.264 video in VLC. That uses the vendor capture/encoder and is not evidence of native OpenIPC capture or encoding.

Static and emulator findings

  • The retained encoder path uses AKV_Encoder_* / AL_* and the 0x20020000 UIO register window, consistent with the Allegro distinction in firmware#2639.
  • The high-level VI/VENC functions are inside the retained anyka_ipc executable rather than matching exports in its shared media library. A generic SDK wrapper is not a drop-in replacement.
  • The stock capture interface reports YUYV while using 3/2-byte-per-pixel sizing and compound main/sub buffers. It cannot safely be treated as ordinary packed YUYV without validating the actual pixel layout.
  • Controlled tests using unchanged official EV300 kernel code and official BusyBox/musl reached a held userspace endpoint in QEMU only, with diagnostic DT/root changes. Normal startup and its overlay erase/format paths were excluded. These are not full official-firmware boots on the camera.
  • Anyka sensor/ISP/encoder operation, Wi-Fi and physical DMA/timing are not established by these emulator results. We have no independently decoded native replacement-encoder output.

Still unqualified

  • Native F37 capture with correct tuning, format, lane/reset configuration and repeatable stop/restart.
  • Native Allegro encoding, correlated completion and decoded output matching known input.
  • Capture/encoder buffer ownership, cache coherence and DMA stop behavior.
  • Replacement-kernel RTL8188FU operation.
  • Exact official-kernel handoff, memory ownership and repeatable recovery.
  • A complete builder profile and usable native OpenIPC firmware.

We have not reproduced firmware#2639's original long sf read corruption on this board and are not claiming it is fixed.

Questions for maintainers

  1. Is there an existing EV300/F37 profile or comparable board that should be the starting point for a PE3020-W profile?
  2. Is there a maintained EV300 configuration intended to fit a 1,572,864-byte stock kernel slot, or is a separately qualified layout migration the expected route? We have not found a verified current replacement fitting this exact slot.
  3. Has the shared F2x/F37 driver been validated with F37 tuning since linux#190? Which F37-specific parameters still need independent confirmation?
  4. Is there a documented transition from this stock lower-media/upper-Linux memory arrangement to the generic OpenIPC layout?
  5. Is there an active EV300 Allegro encoder effort or licensed low-level implementation to coordinate with?
  6. Which additional board evidence would be most useful before proposing a minimal device profile?

Activity

  1. openipc-ai commented on Nov 11, 2026

    @openipc-ai
    Contributor

    Thanks for the careful write-up. Answers against the current trees (firmware 9d78191, linux anyka-ak3918ev300 @ aa316c2):

    1. Starting point. No Anyka board has a builder profile yet. The base is firmware's br-ext-chip-anyka/configs/ak3918ev300_lite_defconfig. It already lists ak3919ev300 as an alias, ships RTL8188FU_OPENIPC, and its kernel config builds the shared SENSOR_F22_F23_F28_F35_F37 driver in. The nearest boards anyone has worked on are the TECKIN TC100 (EV300 + JX-F23, firmware#2639, which linux#190 came from) and the Victure PC420 (EV300 + JX-F37, dmesg only). A PE3020-W profile would be devices/ak3918ev300_lite_heimvision-pe3020w/ with br-ext-chip-anyka/, a customizer and an exclude list.

    2. The 1,572,864-byte slot. Nothing targets it, and we don't plan to. The kernel is the smaller part of the mismatch. The stock root is split into ROOT (1 MiB) and USR.SQUASH, but the OpenIPC rootfs is one 4.9 MB squashfs, so even a trimmed kernel would leave nowhere to put it. OpenIPC uses its own layout on every platform: 256k(boot),64k(env),2048k(kernel),5120k(rootfs),-(rootfs_data). That is set in the EV300 DT bootargs and matches the OpenIPC U-Boot for this SoC, u-boot-ak3918ev300-nor.bin (219,748 bytes, from the openipc-anyka branch of OpenIPC/u-boot, in the latest firmware release). So the route is to replace U-Boot and repartition, not to fit the stock slots. The vendor env sits at 0x60000 and the OpenIPC env at 0x40000, and the stock boot partition is 384 KiB against OpenIPC's 256 KiB. Take a programmer-level full dump before writing anything.

    3. F37 since linux#190. It has not been validated. linux#190 was checked against the TC100's F23 reports, and the lab has no EV300 hardware. On F37, nothing in it is specific to that sensor. Still open on the branch:

    • No sensor tuning is shipped. The F2x driver is multi-sensor, so it falls back to anyka/isp.conf.
    • 3A gives a green tint.
    • S_PARM returns EINVAL.

    For the F37 we would need the MIPI lane count and data rate, the I²C address, the reset GPIO and the stock tuning file (isp_f37*.conf or similar from the vendor rootfs).

    4. Memory layout. No transition is documented, and none is needed once the OpenIPC U-Boot owns the boot. The OpenIPC image assumes the kernel at the bottom (0x80008000) and the DT's 24 MiB media carve-out at 0x81400000. It does not try to coexist with the stock layout, where the media pool is at the bottom and Linux is at the top. As you say, mixing the two layouts is the trap. RAM-booting the OpenIPC kernel from stock U-Boot works only as far as stock U-Boot leaves that memory alone. EV200 has since moved its video memory to a mem=-based osmem split (linux#186, firmware#2796), but EV300 hasn't yet.

    5. Encoder. There is no Allegro encoder driver, and as far as I know nobody is working on one. EV300 also has no osdrv/streamer package in firmware yet (EV200 got anyka-osdrv-ak3918ev200 + ak-cam in firmware#2796). The EV300 lite image therefore boots to network/Wi-Fi/V4L2 capture but has no native video stream. A profile for this camera would be honest about that.

    6. Most useful evidence, in order:

    1. A full 8 MiB flash dump read with a programmer, kept as the recovery baseline.
    2. A boot log of the stock OpenIPC ak3918ev300 image under the OpenIPC U-Boot, RAM-booted first.
    3. The board GPIO map: IR-cut, IR LED, reset button, speaker enable, sensor reset, and the RTL8188FU power/enable if it has one. The stock DTB or board file is enough.
    4. The F37 I²C address and MIPI configuration from the stock driver, plus the stock tuning file.

    With 1 and 3 a minimal profile (Wi-Fi + GPIOs) is reasonable now. Video still waits on the EV300 osdrv/encoder work.

  2. steezywee commented on Nov 12, 2026

    @steezywee
    Author

    Update from the physical PE3020-W: we now have native F37 raw capture working in bounded RAM-only OpenIPC tests. Here is the evidence against your requested list, with the remaining gaps called out.

    1. Recovery dump and boot environment

    • A fresh complete 8,388,608-byte software dump was read from the seven read-only MTD devices. Camera-side and downloaded-file SHA-256 matched. This is the currently installed vendor-derived, Telnet-enabled firmware, not a programmer-read factory baseline or a tested restore. The full dump is retained privately because it includes device-specific data.
    • The camera has booted OpenIPC-derived Linux 4.4.302 with a RAM root and interactive shell, still using the vendor U-Boot 2013.10.0-AK_V3.0.06. SPI controller/flash initcalls were blacklisted and /proc/mtd was empty. Ethernet DHCP and file transfer worked.
    • We have not installed or qualified OpenIPC U-Boot, so these logs do not yet satisfy the exact OpenIPC-U-Boot boot-log request. We have not migrated the flash layout. We understand the 1.5 MiB stock kernel slot is a flash-layout constraint, not the amount of RAM.

    2. Board GPIO findings

    The saved vendor Linux 3.4.35 kernel has board/platform data rather than an exposed runtime device tree. Static decoding and the physical tests give:

    Function Finding Evidence/limit
    Sensor reset GPIO79, active low; PWDN absent (-1) in the V310/version-6 sensor descriptor Stock board data and F37 power callback; native sensor-ID recovery on the camera after the reset/audio correction
    IR-cut GPIO42 pulses on covered/night transition; GPIO41 pulses on uncovered/day transition; both return low Repeated read-only output-latch observations, with the physical click observed
    Reset key GPIO84, active low, key code 11 (boot0) Compiled stock configuration only; no physical reset button has been located
    Speaker enable GPIO34, active high Compiled stock codec configuration only; speaker/microphone not confirmed fitted
    Wi-Fi enable / IR LED Stock table has wifi_power=5, led=5, ir=1 These are software aliases, not yet a verified physical power/IR-LED mapping

    The camera is fixed, not PTZ. No motors or SD slot have been found. The IR circuitry is on a daughterboard; observed IR illumination should not be treated as proof of a separate GPIO-controlled IR-LED line.

    A relevant conflict: the generic OpenIPC DT used sensor reset GPIO49 and assigned GPIO79 to the audio/speaker path. Our board-specific RAM test uses sensor reset GPIO79 and disables the conflicting audio node. With that combined change, staged sensor IDs stayed 0x0f/0x37 through native initialization instead of becoming 0xff/0xff. This is a board-specific finding, not a proposed GPIO change for all EV300 cameras.

    3. F37 interface and tuning

    • I²C: 7-bit address 0x40, represented as 0x80 in the vendor callback; one-byte register addresses and values.
    • MIPI: one lane. The exact stock data-rate interpretation is still being reconciled; we are not substituting the generic driver's value for a verified stock measurement.
    • Stock tuning recovered: /usr/local/isp_f37_mipi_1lane.conf, 69,556 bytes, SHA-256:
      2ed7d02c3fe3dba3e96d31312a7b28d858a796ad0254e5fbc110228c2ae6be5c.
    • Stock sensor_f37.ko: 7,148 bytes, SHA-256:
      9664d2794421f2244a9ab2cc406a7c18341b8df462dcdfdc632ab6d55efd8340.
    • Direct stock-active reads through the existing ISP owner returned:
      0a=0f, 0b=37, 12=20, 0e=11, 0f=14, 10=3c, 11=80, 6a=28.

    The tuning file has been extracted and retained; it is not attached to this comment.

    4. Native capture and green-tint progress

    Our experimental changes are based on OpenIPC/linux aa316c2c9cc7f19d69a79e0fe3124112334cc1b4.

    After the reset correction, explicit full-frame crop and main-only output handling produced real 1920×1080 NV12 frames, 3,110,400 bytes each. The main-only path avoids enabling the secondary output without its buffers. Exposure required warm-up; a bounded capture discarding 125 frames before saving one produced a substantially brighter image.

    We also found a statistics-layout mismatch relevant to the reported green tint: at 1080p the ISP configures 24 motion-statistics rows, while the readers assumed 16. In that layout, AWB starts at byte 4640, not 4128; the old read lands inside the motion-statistics tail. The stock implementation selects the offsets by row mode. Updating AWB/AF offsets and motion-statistics readers together substantially reduced the green cast on this camera, without forcing Bayer order or white-balance gains. Residual cool/magenta tint and clipped ceiling-light highlights remain.

    These results are raw frame capture, not native Allegro encoding or an RTSP service. Sustained capture, reliable FPS/sequence accounting, stop/restart and DMA/cache lifetime, dual streams, replacement-kernel Wi-Fi, and flash/recovery qualification remain open.

    This gives us useful sensor/reset and capture evidence now, while the programmer backup, OpenIPC-U-Boot boot log, and remaining physical GPIO/rate qualification are still outstanding.

  3. openipc-ai commented on Nov 12, 2026

    @openipc-ai
    Contributor

    Thanks, this is a big step. The statistics finding is a real bug in the shared kernel, and I've confirmed it in the source: ak_isp_vi_set_crop picks 24 motion rows on EV300/EV330 whenever the height divides by 24, while _get_awb_stat_result, _get_af_stat and both motion readers were hard-wired to 16. Your 4128 → 4640 is exactly that difference, and with 24 rows the layout fills DMA_STAT_DATA_SIZE (4800 bytes) to the word.

    I've opened OpenIPC/linux#199. It keeps the row count set_crop programmed and derives the AF/AWB offsets and the motion loops from it. EV200 stays at 16. It builds for EV200/EV300/EV330, but we have no EV300 hardware to run it on. If you can boot it in place of your own offset change and confirm the cast behaves the same, that would let it merge with an on-camera result attached.

    On the rest:

    • Sensor reset on GPIO79. Agreed, this is board-specific. It belongs in a PE3020-W device tree (sensor reset on 79, the audio node that claims 79 disabled), not in the generic ak3918ev300-demb.dts, which other EV300 boards (TC100: reset on 49) depend on. When you're ready, a board DTS that includes ak3918ev300-demb.dts and overrides those two nodes is the right shape.
    • Tuning. isp_f37_mipi_1lane.conf at 69,556 bytes matches the "4.003" layout the loader accepts since zenointel-sd-2n-4g: run the pan/tilt head at 833 us per microstep #190 (the TC100's F23 file is 69,548). Attaching it to OpenIPC/linux or OpenIPC/firmware (an issue or a PR) would let us ship it as the F37 default, the way EV200's tunings ship in /etc/sensor. Vendor tuning blobs are already redistributed there.
    • MIPI rate. Please post the stock value once you've reconciled it. The generic F2x driver's rate came from the F23 on two lanes, so a single-lane F37 most likely needs its own.
    • GPIOs for the builder profile. The IR-cut pair (42 night / 41 day) is enough for the customizer. Reset key 84 and speaker 34 can wait until they're seen working on hardware.

    The OpenIPC U-Boot boot log and the programmer dump are still the gate for anything that writes flash. Everything up to that point can keep going RAM-only.

  4. openipc-ai commented on Nov 12, 2026

    @openipc-ai
    Contributor

    OpenIPC/linux#199 is merged into anyka-ak3918ev300, the branch the nightly EV300/EV330 kernels build from. Beyond your offsets, it also scales the 3D-NR motion count back to the tunings' 16-row basis, so md_th keeps its meaning with 24 rows. An on-camera check of a nightly kernel (or of the branch tip) against your own change is still very welcome. If anything differs, it'll be easy to follow up.

  5. steezywee commented on Nov 12, 2026

    @steezywee
    Author

    Original-firmware F37 evidence from a second camera

    I have now read another camera running its original firmware with a CH341A programmer. The original full dump is retained privately; this is a different unit from the camera used for the RAM-only development tests, and I am not claiming a tested restore or an OpenIPC-U-Boot qualification.

    Attached is an allowlisted engineering-evidence bundle containing only the original F37 tuning file and sensor module, plus a README and checksum manifest:

    anyka-f37-allowlisted-evidence.zip

    File Bytes SHA-256
    isp_f37_mipi_1lane.conf 69,556 2ed7d02c3fe3dba3e96d31312a7b28d858a796ad0254e5fbc110228c2ae6be5c
    sensor_f37.ko 7,148 9664d2794421f2244a9ab2cc406a7c18341b8df462dcdfdc632ab6d55efd8340

    Both hashes match the files previously extracted from our first camera. The original tuning is included unchanged, rather than the derived tuning used in some RAM tests.

    ZIP SHA-256: 693202da743d6ae3436c916060b678f70303744911036354546d05d6f5310c6c.

    This attachment is not the full dump, not a sanitized firmware image, and not suitable for flashing or recovery. ENV, MAC, writable configuration, credentials and device identifiers are excluded by selecting only these two engineering files. The unmodified programmer dump remains private.

    This makes the requested stock tuning and module available for review now. The OpenIPC-U-Boot boot log, independent stock MIPI-rate reconciliation and on-camera comparison against the merged OpenIPC/linux#199 changes remain separate outstanding checks.

  6. openipc-ai commented on Nov 12, 2026

    @openipc-ai
    Contributor

    Thanks, that's exactly what was needed.

    • Hashes: the zip, isp_f37_mipi_1lane.conf and sensor_f37.ko all match the SHA-256s you posted.
    • Tuning: the header is 4.003-mp1l-9.7 with sensor ID 0x0f37, so the loader in ak_isp_tuning.c accepts it unchanged.
    • MIPI rate: the stock f37_get_parameter answers GET_MIPI_MHZ = 768, GET_MIPI_LANE = 1, MIPI interface, 3.3 V I/O, and VSYNC_ACTIVE_MS 31. Our shared F2x driver has the F37 at 720 Mbps, also 1 lane, so the rate is the one difference. It feeds the THS-SETTLE calculation. Next I'm comparing the stock module's init register table with ours, to confirm the sensor's PLL actually runs at 768 before changing the driver.
    • Shipping the tuning: I'll put it into firmware as the F37 default for EV300.

    I'll link both PRs here.

  7. openipc-ai commented on Nov 12, 2026

    @openipc-ai
    Contributor

    Both PRs are up:

    • anyka: JX-F37 at its stock MIPI rate, and per-part tunings for the F2x sensors linux#200 (into anyka-ak3918ev300):
      • F37 at 768 Mbps, as your stock sensor_f37.ko reports. The F37's register list in the stock tuning sets the PLL to 0e=11 0f=14 10=3c 11=80, the values you read live. On EV300, 720 and 768 both give THS-SETTLE 0x89, so your capture shouldn't change.
      • Per-part sensor names. The F2x driver now registers jxf22 … jxf37 for the part it detects. Until now the kernel never looked in /etc/sensor for these sensors, and all of them fell back to anyka/isp.conf.
    • anyka-osdrv-ak3918ev300: the JX-F37's stock ISP tuning in /etc/sensor firmware#2830 (draft): a new anyka-osdrv-ak3918ev300 package installs your isp_f37_mipi_1lane.conf unchanged as /etc/sensor/jxf37.conf. I checked it against the kernel's validator: header 4.003-mp1l-9.7, ID 0x0f37, 2 styles, EV300 module sizes, and 108 sensor register writes.

    The firmware PR stays a draft until it has run on a camera. Could you RAM-boot a kernel with linux#200, with that file at /etc/sensor/jxf37.conf in your root? The boot log should then contain ISP tuning /etc/sensor/jxf37.conf, 2 styles (the device prefix may differ). That line, plus whether the picture matches your earlier capture with the stock tuning, is what lets both merge.

  8. steezywee commented on Nov 13, 2026

    @steezywee
    Author

    RAM-only hardware result for linux#200 and the original F37 tuning

    We have now run a kernel including OpenIPC/linux#200 on the PE3020-W-V310 camera, with the unchanged original 69,556-byte tuning at /etc/sensor/jxf37.conf. No fallback anyka/isp.conf was installed for this test.

    The requested loader line was observed:

    ak_camera 20000000.isp: ISP tuning /etc/sensor/jxf37.conf, 2 styles
    

    The tuning SHA-256 was:

    2ed7d02c3fe3dba3e96d31312a7b28d858a796ad0254e5fbc110228c2ae6be5c
    

    F37 identification remained valid (0x0f37). A bounded capture with 125 warm-up frames followed by one saved 1920×1080 NV12 frame completed with exit status 0. The saved frame was 3,110,400 bytes, SHA-256:

    6122a79fb11a8f1e011e9f16805d2858d312bdac2a309a91ac175fcd86613040
    

    Picture result: the final capture with the unchanged original tuning looked substantially neutral and good to the camera owner: the strong pink/red cast was largely gone, walls looked neutral and wood looked brown. The lamp highlights were still clipped. This is a visual result report; no image is attached to this comment.

    Important limits on the comparison: this was not a controlled, same-boot A/B against the earlier capture. Our RAM kernel also retained the board-specific sensor-reset-on-GPIO79/audio-disabled changes and the capture-path fixes discussed earlier. MMC1 was disabled after it claimed the IR-cut GPIOs 41/42. A bounded day-control pulse completed with both outputs low, but no click was heard and the physical filter position was not independently confirmed. Reboots, lighting/scene changes and that control attempt confound attribution. Earlier tests also included a derived stock-tail tuning; the final result reported above used the original hash shown here, not that derivative.

    So we can confirm named original-tuning loading and successful on-camera capture with linux#200, and report a good final picture, but cannot honestly claim isolated PR200-only visual equivalence or a confirmed IR-cut mechanism.

    All of this remained RAM-only, with SPI controller/flash initialization blacklisted and an empty MTD listing. This does not qualify the full firmware image, native encoding/RTSP, automatic day/night, flash recovery, or an OpenIPC-U-Boot boot. Those remain separate checks.

  9. steezywee commented on Nov 13, 2026

    @steezywee
    Author

    Follow-up: supervised IR-cut response on the PE3020-W

    We have now observed both directions in the same capture-capable RAM boot: a bounded NIGHT one-shot (GPIO42) and DAY one-shot (GPIO41) each returned status 0 and produced an audible click. Kernel completion logs and output-latch readback confirmed both GPIO41/42 outputs low afterward; cleanup was verified.

    A subsequent same-boot IR-remote comparison showed substantially stronger IR bloom in NIGHT than DAY, supporting an optical filtering change in the expected direction. Both NV12 captures were complete at 3,110,400 bytes. This is qualitative evidence only: remote/foreground position and exposure differed, so there is no calibrated attenuation ratio or absolute filter-position measurement.

    This extends the prior report beyond the earlier no-click observation. It uses the existing capture image/original tuning, not a new controlled kernel/tuning A/B, and does not establish PR200-only color equivalence. Automatic ADC-driven switching, thresholds/hysteresis, startup behavior and long-term reliability remain unqualified.

    Testing remained RAM-only; no flash write or persistent installation. Scene images remain private and are not attached.

  10. steezywee commented on Nov 13, 2026

    @steezywee
    Author

    Could you point us to the intended RAM-only chainload procedure for the stock u-boot-ak3918ev300-nor.bin from vendor U-Boot 2013.10 on this 64 MiB board? In particular, should the ROM-wrapped release be entered directly or does it require a RAM-entry build, and what load/entry addresses and vector mapping should we use? How should resets and the DRAM probe be handled without overwriting the running code or staged images, and how do we keep persistent writes disabled?

    We haven’t installed OpenIPC U-Boot or repartitioned flash. We have a private CH341A dump from a second original-firmware camera and a verified software dump from the development camera, but not a same-unit programmer recovery qualification.

    Would a stock kernel with an explicitly RAM-only diagnostic init be acceptable as an initial log, followed separately by audited stock userspace? We would label it as such.

  11. openipc-ai commented on Nov 13, 2026

    @openipc-ai
    Contributor

    Thanks, that settles both:

    Chainloading the OpenIPC U-Boot from the vendor U-Boot

    This comes from the openipc-anyka source (CLAUDE.md, build.sh, openipc/ak39-image.py) and the released file. Nobody has documented doing it on silicon, so treat it as a procedure to try, not a qualified one.

    The file. u-boot-ak3918ev300-nor.bin from the latest release (219,748 bytes, sha256 86bee049…15cc18) is a 512-byte boot-ROM header followed by U-Boot:

    • header: magic ANYKA_H3, payload length 0x35864, load address 0x80E00000;
    • the first word is b to offset 0x200, so the header also works when entered directly;
    • the rest of the header is the ROM's PLL/DDR register script and an SPI-flash descriptor, used only when booting from flash.

    There is no separate RAM-entry build. The payload is linked at 0x80E00000 (SYS_TEXT_BASE) and assumes DDR is already up: no SPL, and lowlevel_init only ungates clocks and releases resets. That's the state the vendor U-Boot leaves, so the same file works:

    • payload only: load file[0x200:] at 0x80E00000 and go 0x80E00000, or
    • whole file: load it at 0x80DFFE00 and go 0x80DFFE00.

    Memory to keep clear (64 MiB part, PHYS_SDRAM_1_SIZE = 64 MiB; dram_init() probes only within that):

    • 0x80700000-0x80800000: early stack and global data (SYS_INIT_RAM_ADDR);
    • 0x80E00000 + ~215 KiB: the payload;
    • the top few MiB of DDR, where U-Boot relocates itself and its malloc area.

    Run bdinfo in the vendor U-Boot first and check that its relocaddr is high in DDR, not at 0x80E00000, or the load overwrites the running loader. Stage anything you want to keep at OpenIPC's baseaddr, 0x82000000.

    Keeping it from writing flash. This is the important part on a stock layout:

    • Interrupt autoboot. bootdelay is 1 s and the key is Ctrl-C only. The default bootcmd is run bootflash. At misc_init_r, firmware_scan() looks for an OpenIPC kernel at flash 0x50000, which on your layout is the vendor boot area, so it will set bootfail. bootflash then runs fwrecovery → fwupd, which tries to fetch images over TFTP and sf erase/sf write them. With no TFTP server it fails and resets, but don't rely on that: stop at the prompt.
    • Never saveenv. OpenIPC's environment is at flash 0x40000 (64 KiB), which is inside your stock boot partition (0x000000-0x060000). It will report a bad CRC and use the defaults, which is fine, but a saveenv would overwrite the vendor U-Boot.
    • No SD/USB stick with recovery files, and no run fwupd/uk/ur, sf erase or sf write. firmware_recovery() writes flash on its own if it finds uImage.ak3918ev300.img, rootfs.squashfs.ak3918ev300.img or script.txt on a FAT card or stick. You said there's no SD slot, so this is just for completeness.
    • sf probe 0 and sf read are read-only and fine.

    The log that's useful is U-Boot's own output up to the prompt (DRAM size, flash ID, the env CRC warning, Ethernet), then bdinfo, sf probe 0 and printenv. No kernel is needed for it. A stock kernel with a RAM-only diagnostic init doesn't test anything we're unsure of, so I'd skip it. Booting your RAM kernel with bootm from 0x82000000 under this U-Boot is a useful second step.

    One thing to check before ever writing this U-Boot to flash: the released header's SPI descriptor was taken from a GigaDevice part (JEDEC c84017), and your flash is a Macronix MX25L6405D (c22017). Chainloading doesn't use it, but the boot ROM does. We'd want to confirm that the ROM reads your flash with that descriptor, or build an image with a matching one, before anything is flashed.

  12. openipc-ai commented on Nov 13, 2026

    @openipc-ai
    Contributor

    OpenIPC/firmware#2830 is merged. From the next nightly, ak3918ev300_lite and ak3916ev300_lite ship your tuning as /etc/sensor/jxf37.conf, with a kernel that includes linux#199 and #200. The EV300 image builds at 4828/5120 KB rootfs. The open items are on the bootloader side: the OpenIPC U-Boot chainload log, and the boot ROM's flash descriptor versus your MX25L6405D.

  13. 4 remaining items

  14. openipc-ai commented on Nov 13, 2026

    @openipc-ai
    Contributor

    Board support for your camera:

    Two caveats, so expectations are right:

    • IR-cut: the pins are recorded, but nothing on the image switches day/night yet. There's no native streamer on EV300.
    • Flashing: this image needs the OpenIPC layout, so it goes on only after the OpenIPC U-Boot is written and the flash repartitioned. That's your call, with the CH341A dump as recovery.

    Before flashing, the most useful check is a RAM boot of this image's kernel: uImage.ak3918ev300 from the #238 CI artifact, or from the release once it's merged. Look for model "HeimVision PE3020-W (AK3918EV300)" and the jxf37.conf loader line with the stock device tree replaced. That's the one combination nobody has booted yet.

  15. openipc-ai commented on Nov 13, 2026

    @openipc-ai
    Contributor

    #238 is merged. The next nightly build publishes ak3918ev300_lite_heimvision-pe3020w-nor.tgz (with uImage.ak3918ev300 and rootfs.squashfs.ak3918ev300 inside) to the latest and nightly releases. That build runs at 03:00 UTC.

    The check before flashing is the same as before: RAM-boot that uImage.ak3918ev300 and look for HeimVision PE3020-W (AK3918EV300) as the model, plus the jxf37.conf tuning line.

  16. steezywee commented on Nov 16, 2026

    @steezywee
    Author

    RAM-boot result from the physical PE3020-W on 2026-11-16: the board-specific official kernel now prints both requested model and tuning-loader lines.

    The kernel is the unchanged uImage.ak3918ev300 from the board-profile release archive downloaded on November 16 (kernel build timestamp November 15, 20:42:51 UTC). It was booted with a separate minimal diagnostic RAM root, containing the original F37 tuning file, not the release's normal root filesystem. The diagnostic verifies the model and opens the video device once, retains that descriptor and waits for physical recovery. No STREAMON, capture, encoding or userspace network service was exercised; the tuning-loader message is not proof of image quality or complete tuning application.

    The actual diagnostic boot arguments are included below. SPI/MMC/watchdog initcalls were blacklisted, and a direct initrd= argument supplied the RAM root because the vendor loader's prepared tags omitted INITRD2. No flash erase/program or saveenv commands were issued; this is not a claim that every pre-diagnostic hardware side effect was ruled out.

    Below is the complete kernel-boot UART output, including the later USB message, plus the initial and recovery bootloader banners. Only line endings are normalized. Pre-boot transfer/checksum commands and RAM/register inspection output are outside this kernel-boot section and are not included. No kernel-boot lines or sensitive fields were redacted. After physical power-cycle, the fresh stock bootloader prompt was observed again.

    Initial bootloader banner:

    U-Boot 2013.10.0-AK_V3.0.06 (May 28 2020 - 02:31:32)
    
    DRAM:  64 MiB
    anyka spi flash. bus_width:1
    8 MiB
    ANYKA SDHC/MMC4.0: 0
    anyka spi flash. bus_width:1
    *** Warning - bad CRC, using default environment
    In:    serial
    Out:   serial
    Err:   serial
    Net:   AKEthernet-0
    

    Complete kernel boot and diagnostic output:

    Starting kernel ...
    
    Uncompressing Linux... done, booting the kernel.
    Booting Linux on physical CPU 0x0
    Linux version 4.4.302 (runner@runnervmccnms) (buildroot-gcc-13.3.0) #1 Sun Nov 15 20:42:51 UTC 2026
    CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=0005317f
    CPU: VIVT data cache, VIVT instruction cache
    Machine model: HeimVision PE3020-W (AK3918EV300)
    rmem: no DRAM above mem=, no video memory
    Reserved memory: created DMA memory pool at 0x81400000, size 24 MiB
    Reserved memory: initialized node dma_reserved@0x81400000, compatible id shared-dma-pool
    Memory policy: Data cache writeback
    ANYKA CPU AK39XXEV300 (ID 0x20160100)
    Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 10112
    Kernel command line: console=ttySAK0,115200n8 root=/dev/ram0 rdinit=/init init=/init ro panic=0 mem=64M@0x80000000 initcall_blacklist=ak_spi_init,ak_spiflash_init,ak_spinand_init,akmci_of_init,ak_wdt_init,ak_rtc_wdt_driver_init initrd=0x83600040,91648
    PID hash table entries: 256 (order: -2, 1024 bytes)
    Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
    Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
    Memory: 35500K/40960K available (3182K kernel code, 136K rwdata, 1020K rodata, 148K init, 188K bss, 5460K reserved, 0K cma-reserved)
    Virtual kernel memory layout:
        vector  : 0xffff0000 - 0xffff1000   (   4 kB)
        fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
        vmalloc : 0xc4800000 - 0xff800000   ( 944 MB)
        lowmem  : 0xc0000000 - 0xc4000000   (  64 MB)
        modules : 0xbf000000 - 0xc0000000   (  16 MB)
          .text : 0xc0008000 - 0xc0422c74   (4204 kB)
          .init : 0xc0423000 - 0xc0448000   ( 148 kB)
          .data : 0xc0448000 - 0xc046a028   ( 137 kB)
           .bss : 0xc046a028 - 0xc0499158   ( 189 kB)
    SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
    NR_IRQS:126
    ak39ev330_clk: CPU(JCLK): 400(Mhz) 
    ak39ev330_clk: MEMDDR2(DPHY): 200(Mhz) 
    ak39ev330_clk: VCLK: 320(Mhz)
    clocksource: ak_cs_timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 159271703898 ns
    sched_clock: 32 bits at 12MHz, resolution 83ns, wraps every 178956970966ns
    Calibrating delay loop... 199.06 BogoMIPS (lpj=995328)
    pid_max: default: 32768 minimum: 301
    Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
    Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
    CPU: Testing write buffer coherency: ok
    Setting up static identity map for 0x80008400 - 0x8000843c
    devtmpfs: initialized
    clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
    futex hash table entries: 256 (order: -1, 3072 bytes)
    pinctrl core: initialized pinctrl subsystem
    NET: Registered protocol family 16
    DMA: preallocated 256 KiB pool for atomic coherent allocations
    On-chip L2 memory initialized
    ak-pinctrl 20170000.gpio: ak_pinctrl_probe 2057
    ak_ev330_pinctrl: ak_pinctrl_probe irq: 15
    usbcore: registered new interface driver usbfs
    usbcore: registered new interface driver hub
    usbcore: registered new device driver usb
    i2c-ak39 20150000.i2c0: i2c-0: AK39 I2C adapter
    Linux video capture interface: v2.00
    Advanced Linux Sound Architecture Driver Initialized.
    clocksource: Switched to clocksource ak_cs_timer
    NET: Registered protocol family 2
    IP idents hash table entries: 2048 (order: 2, 16384 bytes)
    TCP established hash table entries: 1024 (order: 0, 4096 bytes)
    TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
    TCP: Hash tables configured (established 1024 bind 1024)
    UDP hash table entries: 256 (order: 0, 4096 bytes)
    UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
    NET: Registered protocol family 1
    Unpacking initramfs...
    Freeing initrd memory: 92K
    squashfs: version 4.0 (2009/01/31) Phillip Lougher
    jffs2: version 2.2. © 2001-2006 Red Hat, Inc.
    io scheduler noop registered (default)
    AKxx uart driver init, (c) 2013 ANYKA
    20130000.uart0: ttySAK0 at MMIO 0x20130000 (irq = 10, base_baud = 10000000) is a AK
    ak_serial_console_setup: baud 115200, line 0
    console [ttySAK0] enabled
    loop: module loaded
    AK39E_MAC Ethernet Driver, V1.1
    Configed MAC RMII interface!
    ak_gmac 20300000.ethernet: no valid MAC address, using random MAC address be:58:af:6e:1b:69
    eth0: ak39 GMAC at c484c000 IRQ 16 MAC: be:58:af:6e:1b:69
    usb-host 20200000.usb: Anyka usb host controller
    usb-host 20200000.usb: new USB bus registered, assigned bus number 1
    usb-host 20200000.usb: irq 18, io mem 0x20200000
    hub 1-0:1.0: USB hub found
    hub 1-0:1.0: 1 port detected
    Usb otg-hs controller driver initialized
    usbcore: registered new interface driver cdc_wdm
    rtc rtc0: invalid alarm value: 2107-1-31 31:63:63
    ak-rtc rtc: rtc core: registered ak-rtc as rtc0
    i2c /dev entries driver
    ak_camera 20000000.isp: assigned reserved memory node dma_reserved@0x81400000
    ak_camera 20000000.isp: capture pool at 0x81400000, 24576 KiB
    soc-camera-pdrv soc-camera-pdrv.0: Probing soc-camera-pdrv.0
    gc1084: chip id 0xffff, expected 0x1084
    bf3703_probe_id id:0xffff
    f22_set_power_on
    aksensor 0-0030: probe_sensors Probing Sensor ID: 0xf37
    f22_set_power_on
    ak_camera 20000000.isp: AK Camera driver attached to camera 0
    ak_camera 20000000.isp: AK Camera driver detached from camera 0
    ak_camera 20000000.isp: AK Camera driver loaded
    NET: Registered protocol family 10
    sit: IPv6 over IPv4 tunneling driver
    NET: Registered protocol family 17
    bridge: automatic filtering via arp/ip/ip6tables has been deprecated. Update your scripts to load br_netfilter if you need this.
    ALSA device list:
      #0: Ak ADC DAC pcm input & output module 1
    
    Freeing unused kernel memory: 148K
    MODEL_VERIFIED HeimVision PE3020-W (AK3918EV300)
    VIDEO_OPEN_ATTEMPT hardware_initialization; no STREAMON/ioctls
    f22_set_power_on
    ak_camera 20000000.isp: AK Camera driver attached to camera 0
    isp_module_init: ak_isp_drv_lib V3.1.7
    ak_camera 20000000.isp: ISP tuning /etc/sensor/jxf37.conf, 2 styles
    VIDEO_OPEN_RETURNED descriptor retained; tuning application NOT attested
    RETAIN_HOLD physical recovery required
    usb 1-1: new high-speed USB device number 2 using usb-host
    

    Physical recovery bootloader output:

    U-Boot 2013.10.0-AK_V3.0.06 (May 28 2020 - 02:31:32)
    
    DRAM:  64 MiB
    anyka spi flash. bus_width:1
    8 MiB
    ANYKA SDHC/MMC4.0: 0
    anyka spi flash. bus_width:1
    *** Warning - bad CRC, using default environment
    In:    serial
    Out:   serial
    Err:   serial
    Net:   AKEthernet-0
    
    
    anyka$
    
  17. openipc-ai commented on Nov 16, 2026

    @openipc-ai
    Contributor

    Thanks, this is the result we needed. The released uImage.ak3918ev300 boots on your board with its own device tree (Machine model: HeimVision PE3020-W (AK3918EV300)). The F37 answers on I²C with the GPIO 79 reset (Probing Sensor ID: 0xf37), and the ISP loads /etc/sensor/jxf37.conf. Agreed on the limits you stated: this proves the probe and the tuning load, not image quality.

    One line that looks like a contradiction but isn't: #0: Ak ADC DAC pcm input & output module 1 still appears with adc_dac disabled. That card comes from sound/arm/ak_pcm.c, which registers its own platform device and doesn't use the device tree. The codec driver that would request speak-gpios (GPIO 79) is the disabled adc_dac node, and it didn't probe. The F37 probing and powering on again when the video device opens confirms nothing else holds 79.

    What this boot left untested, because those initcalls were blacklisted:

    • SPI flash driver (ak_spiflash_init): first exercised when the kernel mounts its rootfs from flash.
    • MCI1 disable (akmci_of_init didn't run, so this boot couldn't show MMC1 leaving the IR-cut pins alone). Your earlier linux#200 RAM-boot is still the only check of that.
    • Watchdog.

    So the remaining step is the one that needs your decision: write the OpenIPC U-Boot and the 8 MB layout, then flash this image. Your CH341A dump is the way back.

  18. steezywee commented on Nov 16, 2026

    @steezywee
    Author

    Thanks for clarifying the remaining released-image checks and the separate ALSA platform-card registration.

    A separate milestone is now verified on this camera: a minimal downstream OpenIPC-derived Buildroot RAM root, isolated compatibility runtime and custom RAM kernel completed one bounded real 1920×1080 capture → H.264 → wired RTSP/TCP test. Independent strict decoding verified 396 pictures (16 I / 380 P) over 28.172 seconds of RTP timing, about 14.02 fps. The producer completed 421 frames; the RTSP drop counter reported 18. Physical recovery to the stock loader was observed.

    This is NOT a video result from the unchanged released kernel/rootfs or proof of normal full OpenIPC startup. The earlier released-kernel + diagnostic-root boot still proves only the board/sensor probe and tuning-file load. A v4l_querycap capability-metadata warning was nonfatal in this separate RAM run. Protective buffer quarantine remains intentional; physical DMA drain, reusable restart, peak runtime memory and indefinite service remain unqualified.

    Your remaining SPI flash/rootfs, MCI1-disable and watchdog checks are still open; this custom RAM test does not close them. No U-Boot, partition-layout or flash changes were made. No private recordings, binary payloads or logs are included here.

  19. openipc-ai commented on Nov 16, 2026

    @openipc-ai
    Contributor

    Good milestone, and noted that it is a separate custom stack, not the release.

    The v4l_querycap warning is a bug on our side, fixed in OpenIPC/linux#237. Both Anyka camera hosts filled capabilities but left device_caps empty, and 4.4's v4l_querycap() WARNs on that every time it is called. The capability bits your application sees don't change.

    Two questions, since anything you had to change in the kernel to get there is probably something the release kernel needs too:

    1. Kernel changes: what does your custom RAM kernel change compared with anyka-ak3918ev300? A patch or a branch link would be enough.
    2. Buffer quarantine: what did you observe on stream stop that made you keep the buffers out of reuse? A DMA write landing after STREAMOFF, or something else? If the ISP keeps writing after STREAMOFF, that's a driver bug we'd want to fix rather than work around.
  20. steezywee commented on Nov 16, 2026

    @steezywee
    Author

    Update from the physical PE3020-W: the official ak3918ev300_lite_heimvision-pe3020w-nor.tgz downloaded November 16 (kernel built November 15 at 20:42:51 UTC) now cold-boots from NOR under the installed OpenIPC U-Boot, rather than the earlier diagnostic RAM root.

    Verified: Linux 4.4.302 reaches the normal OpenIPC shell; the flash-backed squashfs root and writable JFFS2 mount; F37 probes as sensor ID 0x0f37; watchdog registers and MMC0 appears without MMC1; wired DHCP and Dropbear SSH work. Watchdog registration is not a timeout/recovery test, and this does not establish IR-cut operation or image quality.

    U-Boot read issue: all programmed regions passed byte-for-byte readback under the stock loader. Under the installed OpenIPC U-Boot, a normal 2 MiB kernel-slot read produced CRC32 d6b98bef instead of expected 32646e99, with iminfo reporting bad data CRC. Reassembling the same slot using 512 reads of 4 KiB produced the expected full-slot CRC and passed the image checksum, twice. A saved small-read boot recipe then succeeded on physical cold boot. This resembles the long-read problem in OpenIPC/firmware#2639; it is a board-tested workaround, not a driver fix. U-Boot reset also stopped after printing "resetting ..."; physical power cycling was needed.

    Current userspace: only TCP 22 listens; HTTP/HTTPS/RTSP are not listening. The image does contain BusyBox httpd, Haserl and WebUI assets in /var/www, but no active HTTP service. Inspection suggests the WebUI expects Majestic's authentication/backend path, so we have not exposed its privileged CGI through bare httpd. No Majestic or RTSP backend was found. /dev/video0 advertises raw NV12/YUYV, not an encoded stream. No video stream has been verified from this release.

    The practical goal is RTSP plus a browser management interface, eventually ONVIF. What is the recommended next step now that normal flash boot works?

    1. Is there a supported, authenticated management-only WebUI configuration for EV300 independently of Majestic/video?
    2. Is the previously demonstrated downstream compatibility pipeline the practical interim video direction, or is there a newer EV300-specific userspace/encoder effort to coordinate with? We understand EV200 ak-cam is not automatically suitable.
    3. Would you prefer the small-read workaround and cold-boot results in a separate U-Boot report?

    We are investigating userspace in parallel without another reflash. Your questions about the earlier custom RAM-kernel delta and buffer quarantine remain separate and unanswered here; this release boot does not establish late DMA after STREAMOFF or explain the earlier precaution.

  21. openipc-ai commented on Nov 17, 2026

    @openipc-ai
    Contributor

    Great result: a cold boot from NOR to a normal OpenIPC shell, with the flash root, JFFS2 overlay, F37 probe, watchdog, MMC0 without MMC1, DHCP and SSH all working.

    3. U-Boot first, because the read problem may already be fixed. Which banner does your installed U-Boot print?

    The reset hang (stops after resetting ...) is separate: please note which build showed it. It belongs in a new issue on OpenIPC/firmware if it survives the current build.

    1. Web management: no, not on EV300 today. The WebUI in /var/www logs in by POSTing to /login, and Majestic serves that. Majestic has no Anyka build, so nothing on this image answers it. You were right not to serve the CGIs through bare BusyBox httpd: they would run as root with no authentication in front of them. For now SSH is the supported management path. The WebUI files on this image are dead weight until there's a backend.

    2. Video: there is no OpenIPC EV300 streamer or encoder effort to coordinate with. The EV300 kernel work happens in OpenIPC/linux anyka-ak3918ev300 (capture, ISP, tunings). There is no hardware encoder driver or RTSP/ONVIF userspace for it in OpenIPC. Your compatibility pipeline is the practical interim route. For anything to ship in the OpenIPC image, two things would be needed:

    • Kernel changes your pipeline needs, as patches against anyka-ak3918ev300, which is why I asked about your RAM kernel's delta;
    • Userspace with buildable source: the firmware tree doesn't accept binary-only components.

    ONVIF comes after a working streamer, not before.

  22. openipc-ai commented on Nov 17, 2026

    @openipc-ai
    Contributor

    The PE3020-W image now has a streamer. Majestic runs on Anyka EV300 and encodes H.264/H.265 and JPEG on the SoC's hardware encoder. Three pieces landed:

    The first image with all of it is tonight's nightly (03:00 UTC): ak3918ev300_lite_heimvision-pe3020w-nor.tgz in latest. Nobody has run it on hardware yet, so your camera is the first. Whatever goes wrong, the log is what we need.

    Before flashing: your installed U-Boot may be the 19 October build with the long-read bug. Either use your 4 KiB-read boot recipe, or update U-Boot first (see my previous comment).

    What to check

    1. Kernel, after boot:

      dmesg | grep -iE 'uio_vcodec|ion|ak_camera'
      

      It should print one uio_vcodec line with Allegro encoder at [mem 0x20020000-0x2002ffff], and the ISP pool should be 7 MB.

    2. Majestic, in the foreground:

      killall majestic; sleep 1; majestic
      

      Keep the first ~40 lines. They say how much encoder memory it took, which streams opened at what size and bitrate, and whether the first frame arrived. If it stops there, the last lines are the answer.

    3. Video:

      • main stream: rtsp://root:<password>@<camera>/stream=0 (1080p);
      • substream: rtsp://root:<password>@<camera>/stream=1;
      • snapshot: http://<camera>/image.jpg.

      A few minutes of the main stream in VLC or ffprobe tells us whether the frame rate holds.

    4. IR-cut:

      curl http://root:<password>@<camera>/night/on
      curl http://root:<password>@<camera>/night/off
      

      I set nightMode.irCutPin1 41 and irCutPin2 42 from your measurement (41 → day, 42 → night). Which of the two Majestic drives for "night" isn't confirmed on this board. If the filter moves the wrong way, swap them with cli -s .nightMode.irCutPin1 42; cli -s .nightMode.irCutPin2 41 and restart Majestic.

    5. Stop/restart: run killall majestic while streaming, then start it again. This is where your earlier buffer-quarantine concern would show up. Majestic now releases the encoder on stop, so a second start should work without a reboot.

  23. steezywee commented on Nov 18, 2026

    @steezywee
    Author

    Hardware update on the PE3020-W: the upstream Majestic image now boots from NOR, but video startup is blocked.

    Build and installation

    • Builder nightly-20261117-5fec4d8, merge 5fec4d85ca21a5839f2a34a381667a4b67c809d0 (the ak3918ev300_lite_heimvision-pe3020w: Majestic, with the IR-cut pins #253 CI artifact, run 44098440117).
    • Pinned Linux b0956f093b3f928e77181245f4c3de419a15b8ce; Majestic master+bf7058e, built 2026-11-17 13:39.
    • Kernel and rootfs were flashed and their complete padded slots verified byte-for-byte before boot. Bootloader, environment and existing overlay were preserved.
    • To answer the U-Boot question: the installed loader is still 2022.10-ge60b740b. We retained the working 4 KiB-read boot recipe; this does not test the newer loader's long-read fix.

    Observed on first boot
    Linux reaches the flash-backed root/userspace; SSH and HTTP work. F37 probes as 0xf37; Majestic identifies JXF37 and 1920×1080 at 25 fps, then reports:

    /proc/self/pagemap reports no frame numbers (majestic is not running as root?), so the heap block’s physical address cannot be checked
    Cannot start SDK
    

    Majestic is actually UID/GID 0, with CapEff: 0000003fffffffff. TCP 554 is not listening; no RTSP stream or encoded frame has been verified. Majestic owns the 300-second watchdog, so we have not stopped it for the proposed restart test.

    Working hypothesis, not yet a traced runtime root cause
    In the pinned source, ION's ion_heap_map_user() uses remap_pfn_range() (VM_PFNMAP). mm/pagewalk.c:walk_page_test() skips those mappings through the hole callback, and pagemap_read() has no test_walk override. That appears capable of producing zero PFNs even for this privileged process. We have not directly traced the failing allocation to that path.

    We have kept mem=64M: the DT separately reserves 7 MiB for ISP and 25 MiB for ION. The legacy rmem: no DRAM above mem= warning alone does not demonstrate a missing video pool.

    Separately, on the previous November 15 kernel, ordinary reboot hit a NULL dereference at 00000004 in akpcm_reboot_notify+0x58/0xdc; sync followed by SysRq b successfully reset it. We have not tested Linux reboot on this new image, so this is not a regression claim against #253.

    Could you help with these next steps?

    1. Is this ION/VM_PFNMAP versus pagemap behavior a known incompatibility with this Majestic build? Is there a supported fix or newer matched kernel/Majestic build to test?
    2. Our preserved overlay contains /etc/custom.ok, while /etc/majestic.yaml is absent. What is the recommended upgrade procedure to apply ak3918ev300_lite_heimvision-pe3020w: Majestic, with the IR-cut pins #253's codec/IR-cut defaults without resetting unrelated configuration?
    3. Which additional bounded diagnostic would best distinguish the pagemap hypothesis from another allocation failure?

    Image quality, streaming, IR-cut operation under Majestic and stop/restart remain untested. The earlier custom RAM-kernel delta and buffer-quarantine questions remain separate; we still have no evidence establishing a late DMA write after STREAMOFF.

  24. steezywee commented on Nov 18, 2026

    @steezywee
    Author

    Follow-up hardware results: we now have working upstream Majestic video with a RAM-booted patched kernel, not with the unchanged flashed kernel.

    What changed and what passed
    The test kernel carries four downstream changes: pagemap handling for the ION mapping, NV12 planar-layout handling, three-buffer-backed references, and explicit full-frame input crop. The four-patch uImage is 1,641,824 bytes, SHA-256 8d3cc997adc50bb2e5824d2eeda933c5e6ef038b6a035b80ec56bc740409dee4. A later FLOW build adds diagnostic instrumentation. The pagemap diagnostic now returns native ION PFN 0x81b00, versus zero in the baseline. Majestic gets through SDK initialization and serves RTSP/video.

    A bounded 1920×1080, 25 fps main-stream test independently decoded 751 frames over 30 seconds with zero decode errors. A separate approximately 69.5-second observation saw no new buffer holds or invalid buffer IDs. The 30-second flow diagnostic also saw no new holds (the existing count stayed at 12); completed frames advanced 4882 → 6620 during the longer observation. There were 59 low-buffer warnings during the first three minutes of the earlier run, so this is not a claim that startup is warning-free or that sustained service is qualified. These results do not establish repeatable stop/restart.

    Your earlier kernel-delta and buffer-quarantine questions
    The older custom RAM/compatibility stack and this newer Majestic test are different builds. The older BOARD2 path explicitly set the crop and used four buffers; our earlier tests also carried the board-specific GPIO79 sensor reset/audio conflict correction, MMC1 disable, main-only capture handling and statistics-layout corrections discussed above. That is a description of verified changes, not yet a complete audited patch series against the current branch. The current RAM test's four changes are listed separately above so they are not mistaken for the older kernel's exact delta.

    We have not observed a demonstrated DMA write landing after STREAMOFF. Buffer quarantine was protective while DMA drain/reuse remained unqualified. The current no-new-holds observation does not prove DMA quiescence, and we are not presenting it as evidence that stop/restart is fixed.

    Remaining hardware observations and questions

    • RTL8188FU Wi-Fi is working in the current setup. This does not yet establish long-term radio stability.
    • Daylight ADC readings were historically zero. We have not taken a fresh ADC reading during this capture run because of device ownership; automatic day/night switching is not qualified.
    • A settings-triggered restart failure has been reported on the camera; its cause has not been confirmed.
    • An approximately one-second visible flicker aligns with GOP 25/I-frame timing at 25 fps, but concurrent 1 Hz JPEG activity is a confound. We have not isolated either as the cause.

    Could you advise:

    1. What is the intended ISP crop initialization and NV12 stride contract for this EV300 path, and which of these changes should be scoped to the PE3020-W versus the shared ISP host?
    2. Is the three-buffer startup/reference-memory behavior expected with the 7 MiB ISP / 25 MiB ION split, and which diagnostic best explains the transient low-buffer warnings?
    3. What is the recommended safe stop/restart sequence with Majestic owning the watchdog, particularly for a configuration-triggered restart?
    4. Which ADC channel/mapping is intended for this board's light sensor, and is additional board-specific support required?

    The patched kernel remains RAM-only; these results do not validate the unchanged installed kernel or justify another flash yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions