Repository navigation
nor: the split layout is a uImage + squashfs, and the kernel is told nothing - #20
Conversation
…nothing The split NOR layout was a FIT followed by the squashfs, which only a FIT-capable U-Boot boots, and the kernel learned its partitions and root from the mtdparts and root= this bootloader passed. Both move to the kernel (OpenIPC/linux): the gk7205v200 family's device tree carries the layout, mtdsplit divides a uImage followed by the squashfs, and the root the split finds is taken whatever root= says. So any U-Boot that can bootm a uImage at 0x50000 boots the layout -- the factory XM one included -- and this one only has to stop telling the kernel otherwise. - The split layout is recognised as a uImage at the kernel offset with the scan's squashfs at the next 64 KiB block after it; fixed slots put the squashfs at the slot boundary. - On it, mtdparts=, root= and openipc_nor_fit= are dropped from bootargs (RAM only), and verify is unset so bootm checks the uImage CRC. kernsize/rootaddr/rootsize keep naming the fixed slots for uk/ur. - CONFIG_OPENIPC_NOR_FIT_SPLIT becomes CONFIG_OPENIPC_NOR_SPLIT, with no FIT dependency; CONFIG_SHA1 leaves the four fragments. NOR images 210-211 KB (gk7205v200/v300), down from 222. FIT split images are no longer recognised: none were released outside the 2026-10-17 nightly. Tested in QEMU (qemu-hisilicon gk7205v200): the split image boots with "mem=32M console=ttyAMA0,115200 panic=20 rootfstype=squashfs init=/init" and "Verifying Checksum ... OK"; the fixed-slot package keeps its mtdparts and root=/dev/mtdblock3. On hardware: flashed on a GK7205V300 (16 MB NOR), it boots the split uImage with "Verifying Checksum ... OK" and the same clean command line; the kernel splits firmware from its device tree, overlay rw, majestic up.
PR Summary by QodoBoot split NOR firmware as uImage with kernel-managed partitions
AI Description
Diagram
High-Level Assessment
Files changed (6)
|
Code Review by Qodo
1.
|
…Image size A fixed-slot uImage ending in the 2 MiB slot's last 64 KiB block puts the squashfs at the slot boundary right after it, the split shape. The split branch then dropped mtdparts= and root=, which a kernel from before the split layout needs to find its root. A squashfs at kernel_off + 2 MiB or 3 MiB now keeps the fixed-slot path; a split image of that size boots all the same, as the kernel splits it from its device tree and ignores both. Tested in QEMU (qemu-hisilicon gk7205v200) with the uImage padded to 2000K: the 2026-10-17 nightly's fixed-slot package (pre-split kernel) gets mtdparts and root=/dev/mtdblock3 and mounts its root; the new kernel in the same shape splits from the DT; a normal split image still boots with the clean command line and "Verifying Checksum ... OK".
OpenIPC moves the split NOR layout's firmware.bin from a FIT to the legacy uImage followed by the squashfs at the next 64 KiB block, and the kernel now finds the layout's partitions and root in its own device tree, whatever the bootloader passes. Any U-Boot that bootm's a uImage at 0x50000 boots it, the factory XM U-Boot included, which has no FIT. - split_image_end() reads the uImage header (data size at bytes 12..15) instead of a FIT's totalsize; the shape checks are otherwise the same. - The warning on a plan without the uboot stage goes: the U-Boot already on the flash boots the image whichever it is. - README and the firmware table say uImage. Tests: the split fixture is a uImage; a FIT now fails the shape check. Matches OpenIPC/linux#97, OpenIPC/firmware#2623 and OpenIPC/u-boot#20 (all merged). The format was verified on hardware with sysupgrade and in QEMU; `defib install` of the uImage split image itself has not been run on a camera.
The split NOR layout was a FIT followed by the squashfs, which only a
FIT-capable U-Boot boots, and the kernel learned its partitions and root
from the mtdparts and root= this bootloader passed. Both move to the
kernel (OpenIPC/linux): the gk7205v200 family's device tree carries the
layout, mtdsplit divides a uImage followed by the squashfs, and the root
the split finds is taken whatever root= says. So any U-Boot that can
bootm a uImage at 0x50000 boots the layout -- the factory XM one
included -- and this one only has to stop telling the kernel otherwise.
the scan's squashfs at the next 64 KiB block after it; fixed slots put
the squashfs at the slot boundary.
(RAM only), and verify is unset so bootm checks the uImage CRC.
kernsize/rootaddr/rootsize keep naming the fixed slots for uk/ur.
FIT dependency; CONFIG_SHA1 leaves the four fragments. NOR images
210-211 KB (gk7205v200/v300), down from 222.
FIT split images are no longer recognised: none were released outside
the 2026-10-17 nightly.
Tested in QEMU (qemu-hisilicon gk7205v200): the split image boots with
"mem=32M console=ttyAMA0,115200 panic=20 rootfstype=squashfs init=/init"
and "Verifying Checksum ... OK"; the fixed-slot package keeps its
mtdparts and root=/dev/mtdblock3.
On hardware: flashed on a GK7205V300 (16 MB NOR), it boots the split
uImage with "Verifying Checksum ... OK" and the same clean command line;
the kernel splits firmware from its device tree, overlay rw, majestic up.
Kernel side: OpenIPC/linux#97 (merged). Firmware side: OpenIPC/firmware#2623 (merged).