Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions en/install-goke.md
Original file line number Diff line number Diff line change
Expand Up @@ -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-<soc>-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-<soc>-nor.bin` adds the layout
scan, `fwupd` and recovery for it.

### Supported sensors

Expand Down
5 changes: 5 additions & 0 deletions en/install-novatek.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
64 changes: 59 additions & 5 deletions en/nor-split-layout.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -100,8 +106,9 @@ itself; nothing about memory has to be set in the environment.
`openipc.<soc>-nor-<variant>-split.tgz`, holding `firmware.bin.<soc>`. 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.<soc>-nor-<variant>.tgz`
beside it is the fixed-slot package: `uImage.<soc>` and `rootfs.squashfs.<soc>`.
there is no Lite). Where the table lists both packages, the plain
`openipc.<soc>-nor-<variant>.tgz` beside it is the fixed-slot package:
`uImage.<soc>` and `rootfs.squashfs.<soc>`.

### Which layout is my camera using?

Expand All @@ -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
```
Comment thread
widgetii marked this conversation as resolved.
Resolved

```
dev: size erasesize name
mtd0: 00040000 00010000 "u-boot"
Expand Down Expand Up @@ -238,13 +251,54 @@ 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:

- a `firmware.bin` for another SoC;
- an image that leaves no room for the settings;
- the plain package on a camera already on the split layout.

### Recovery from U-Boot

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-<soc>-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.<soc>` 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.<soc>` and `uImage.<soc>`; on GK7102
and GK7102S so does a file too big for the chip. The split-only SoCs
(Hi3516EV300, Hi3516CV6xx, Hi3519DV500) need `firmware.bin.<soc>` 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, with
the same result:

```
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
Expand Down
4 changes: 4 additions & 0 deletions en/sysupgrade.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down