From 3c11293cd36d0047ca0f76e1fe39f2b15040bfbf Mon Sep 17 00:00:00 2001 From: Dmitry Ilyin <6576495+widgetii@users.noreply.github.com> Date: Tue, 27 Oct 2026 20:37:43 +0300 Subject: [PATCH 1/2] nor-split, sysupgrade, install pages: catch up with the split layout's last rounds - nor-split-layout: the 3.0 and 3.4 kernels without a device tree (the Hi3516CV100 family, Hi3520DV200, GK7102/GK7102S) find the layout from the images and log the offsets; the fixed-slot package note covers every SoC that ships both packages; the settings sysupgrade lost on split upgrades from 2026-10-21 to 10-24 (OpenIPC/firmware#2677) and the split upgrade on 3.x kernels without sysfs partition offsets (#2683); a "Recovery from U-Boot" section: fwupd takes firmware.bin., else the fixed-slot pair, and a split kernel that fails its CRC starts recovery by itself. - sysupgrade: points a camera that came back on defaults then to that note. - install-goke: the split layout does not need the OpenIPC U-Boot; any U-Boot that loads the kernel from 0x50000 boots it, as nor-split-layout already says. - install-novatek: OpenIPC U-Boot builds for NT98562 and NT98566 are published since 2026-10-27, QEMU only so far. --- en/install-goke.md | 6 +++-- en/install-novatek.md | 5 ++++ en/nor-split-layout.md | 52 ++++++++++++++++++++++++++++++++++++++---- en/sysupgrade.md | 4 ++++ 4 files changed, 60 insertions(+), 7 deletions(-) diff --git a/en/install-goke.md b/en/install-goke.md index 97ba71e5..d4cc1ee4 100644 --- a/en/install-goke.md +++ b/en/install-goke.md @@ -5,8 +5,10 @@ For XM boards with SoC GK7202V300, GK7205V200, GK7205V300 ONLY!!! ----------------------------------------------------------------- These SoCs can also run the [NOR split layout](nor-split-layout.md): kernel and -root filesystem in one partition, with no 2 MiB kernel slot to outgrow. It needs -the OpenIPC `u-boot--nor.bin` bootloader. +root filesystem in one partition, with no 2 MiB kernel slot to outgrow. Any +U-Boot that loads the kernel from `0x50000` boots it, the factory one with a +changed `bootcmd` included; the OpenIPC `u-boot--nor.bin` adds the layout +scan, `fwupd` and recovery for it. ### Supported sensors diff --git a/en/install-novatek.md b/en/install-novatek.md index 9ede35db..d42606e9 100644 --- a/en/install-novatek.md +++ b/en/install-novatek.md @@ -14,6 +14,11 @@ For XM vendor boards with NT98562 and NT98566 SoC ONLY!!! - Images: `openipc.nt98562-nor-lite.tgz` and `openipc.nt98566-nor-lite.tgz`. The NT98566 image has been checked on hardware; the NT98562 one is built from the same tree but has not been tested on a camera yet. Reports are welcome. +- OpenIPC U-Boot builds for these SoCs, `u-boot-nt98562-nor.bin` and + `u-boot-nt98566-nor.bin`, are in the + [firmware release](https://github.com/OpenIPC/firmware/releases/tag/latest) + since 2026-10-27, built from OpenIPC/u-boot. They have only run in QEMU so + far; these instructions keep the vendor U-Boot. ### Initial device firmware update diff --git a/en/nor-split-layout.md b/en/nor-split-layout.md index 77038508..29ca1bed 100644 --- a/en/nor-split-layout.md +++ b/en/nor-split-layout.md @@ -39,9 +39,10 @@ and only their sum has to fit the chip. These SoCs use it: boot image, with the board's memory setup) env env U-Boot environment firmware firmware rest one image, divided by the kernel at boot: - kernel a uImage: the kernel with its device tree (appended - on 32-bit parts; on Hi3519DV500 a multi-file uImage - carrying it), and a CRC32 in the header + kernel a uImage: the kernel, with its device tree where it + has one (appended on 32-bit parts; on Hi3519DV500 a + multi-file uImage carrying it), and a CRC32 in the + header rootfs the squashfs, from the next 64 KiB block rootfs_data your settings (the overlay), from the end of the squashfs to the end of the chip @@ -53,6 +54,11 @@ line: the device tree names `u-boot`, `env` and `firmware`, and the kernel's `kernel`, `rootfs` and `rootfs_data` partitions itself. A bigger or smaller image simply moves where `rootfs_data` starts. +The 3.0 and 3.4 kernels of the Hi3516CV100 family, Hi3520DV200 and +GK7102/GK7102S have no device tree. Their flash driver reads the same two +headers, the uImage at `0x50000` and the squashfs after it, and registers the +same partitions, with the boot partition called `boot`. + Because of that, the kernel ignores whatever `mtdparts=` and `root=` the bootloader passes when the flash holds a split image. Any U-Boot that can read a uImage from the start of the firmware partition boots it, the factory one @@ -100,8 +106,9 @@ itself; nothing about memory has to be set in the environment. `openipc.-nor--split.tgz`, holding `firmware.bin.`. One build serves Hi3516CV610 and Hi3516CV608 (`openipc.hi3516cv6xx-nor-lite-split.tgz`, `-ultimate-split.tgz`) and one Hi3519DV500 (`openipc.hi3519dv500-nor-ultimate-split.tgz`; -there is no Lite). On the GK7205V200 family the plain `openipc.-nor-.tgz` -beside it is the fixed-slot package: `uImage.` and `rootfs.squashfs.`. +there is no Lite). Where the table lists both packages, the plain +`openipc.-nor-.tgz` beside it is the fixed-slot package: +`uImage.` and `rootfs.squashfs.`. ### Which layout is my camera using? @@ -117,6 +124,12 @@ kernel added, and the kernel log says where they came from: sfc: split NOR layout, device tree partitions ``` +The kernels without a device tree name the offsets instead: + +``` +hi_sfc: split NOR layout, kernel 0x50000-0x220000, rootfs 0x220000-0x710000, rootfs_data from 0x710000 +``` + ``` dev: size erasesize name mtd0: 00040000 00010000 "u-boot" @@ -238,6 +251,19 @@ defaults: Clearing settings after an upgrade... ``` +From 2026-10-21 to 10-24, `sysupgrade` (1.0.76 from OpenIPC/firmware#2648 +on) staged an empty settings blob on a split upgrade, and those cameras came +back on defaults (fixed in #2677). 1.0.77 and later carry the settings; the +ones lost then cannot be recovered. + +The 3.x kernels (the Hi3516CV300 and Hi3519V101 families, Hi3536CV100, and the +3.0 and 3.4 kernels above) give no partition offsets in sysfs. From 1.0.78 +(OpenIPC/firmware#2683) `sysupgrade` works them out from the order of the +partitions, and takes them only when `kernel` starts with a uImage and `rootfs` +with a squashfs; before that it refused the split package on these cameras. +`sysupgrade` updates itself before an upgrade, so nothing has to be done on the +camera. + `sysupgrade` reads every write back from the flash before it reboots. It refuses the following before writing anything, and the camera keeps running: @@ -245,6 +271,22 @@ the following before writing anything, and the camera keeps running: - an image that leaves no room for the settings; - the plain package on a camera already on the split layout. +### Recovery from U-Boot + +With the OpenIPC U-Boot on any board in the table but GK7206V12A, whose +OpenIPC U-Boot is not published, `run fwupd` fetches `firmware.bin.` from +the TFTP server in `serverip` (after `run srcmmc`, from an SD card) and writes +it over the whole firmware area. Without that file it installs the fixed-slot pair, `rootfs.squashfs.` +and `uImage.`, as before. On GK7102 and GK7102S a `firmware.bin` too big +for the chip falls back to the pair too. + +The bootloader also checks the split kernel's CRC on every boot. A kernel that +fails it counts as missing firmware, and the camera runs `fwupd` by itself: + +``` +Firmware is absent/corrupt (kernel at 0x50000 fails its CRC) +``` + ### Writing the image from U-Boot This replaces everything after the environment and erases the settings. The diff --git a/en/sysupgrade.md b/en/sysupgrade.md index 76fa5641..83a7bbfa 100644 --- a/en/sysupgrade.md +++ b/en/sysupgrade.md @@ -38,6 +38,10 @@ and carries your settings across (Hi3516CV610 and Hi3516CV608 share one package, are for the fixed-slot layout. NAND cameras upgrade from the NAND package instead, as in [NAND flash layouts](nand-rootfs-layouts.md). +If a split upgrade between 2026-10-21 and 10-24 brought a camera back on +defaults, that was a `sysupgrade` bug of those days, fixed in 1.0.77; see +[Upgrades and your settings](nor-split-layout.md#upgrades-and-your-settings). + ### Using sysupgrade `sysupgrade -k -r` gives you the latest release for your camera, as described above; if you wish to revert to a previous image, or load your own updates, then use any of the options described below. From f6bb5edaad9758e0137c327b8a887059399c37f9 Mon Sep 17 00:00:00 2001 From: Dmitry Ilyin <6576495+widgetii@users.noreply.github.com> Date: Tue, 27 Oct 2026 20:40:20 +0300 Subject: [PATCH 2/2] nor-split: recovery needs a split-mode U-Boot, a pair to fall back on, and erases the settings Review of #631: the recovery section names the U-Boot builds that have it (from OpenIPC/u-boot#77 on the Hi3516CV100 family and Hi3520DV200, #87 on GK7102/GK7102S; earlier ones install only the fixed-slot pair), offers the fixed-slot fallback only where the SoC ships that package (the split-only ones need firmware.bin on the server), and warns that fwupd, by hand or after a failed kernel CRC, erases the settings. --- en/nor-split-layout.md | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/en/nor-split-layout.md b/en/nor-split-layout.md index 29ca1bed..97b90a63 100644 --- a/en/nor-split-layout.md +++ b/en/nor-split-layout.md @@ -273,15 +273,27 @@ the following before writing anything, and the camera keeps running: ### Recovery from U-Boot -With the OpenIPC U-Boot on any board in the table but GK7206V12A, whose -OpenIPC U-Boot is not published, `run fwupd` fetches `firmware.bin.` from -the TFTP server in `serverip` (after `run srcmmc`, from an SD card) and writes -it over the whole firmware area. Without that file it installs the fixed-slot pair, `rootfs.squashfs.` -and `uImage.`, as before. On GK7102 and GK7102S a `firmware.bin` too big -for the chip falls back to the pair too. +The OpenIPC U-Boot recovers a split camera from a TFTP server or an SD card, +given a build with the split scan: any `u-boot--nor.bin` or boot image the +table names, except that the Hi3516CV100 family and Hi3520DV200 need one from +OpenIPC/u-boot#77 on, and GK7102 and GK7102S one from #87 on. Earlier builds for +those boot the split image, but their `fwupd` installs only the fixed-slot pair +and they do not check the split kernel. GK7206V12A has no OpenIPC U-Boot +published. + +`run fwupd` fetches `firmware.bin.` from the TFTP server in `serverip` +(after `run srcmmc`, from an SD card) and writes it over the whole firmware +area. Where the SoC also ships the fixed-slot package, a missing file makes it +install that pair instead, `rootfs.squashfs.` and `uImage.`; on GK7102 +and GK7102S so does a file too big for the chip. The split-only SoCs +(Hi3516EV300, Hi3516CV6xx, Hi3519DV500) need `firmware.bin.` on the server. + +Either way the settings are gone: the overlay is part of the firmware area. On a +camera that still boots, upgrade with `sysupgrade` instead, which carries them. The bootloader also checks the split kernel's CRC on every boot. A kernel that -fails it counts as missing firmware, and the camera runs `fwupd` by itself: +fails it counts as missing firmware, and the camera runs `fwupd` by itself, with +the same result: ``` Firmware is absent/corrupt (kernel at 0x50000 fails its CRC)