Repository navigation
hi3516cv500 family, hi3536dv100, hi3516av100 family: the split NOR image - #2669
Conversation
hi3516cv500 lite's rootfs is 7852K of its 8 MiB slot on 16 MB flash. hi3516cv500, hi3516dv300 and hi3516av300's kernel configs turn on MTD_SPLIT_FIRMWARE (named "firmware"), MTD_SPLIT_UIMAGE_FW, MTD_SPLIT_SQUASHFS_ROOT and MTD_ROOTFS_ROOT_DEV; their kernel finds the layout from its device tree since OpenIPC/linux#142, their U-Boot scans it since OpenIPC/u-boot#62. The three lite defconfigs use post-image-split.sh with BR2_OPENIPC_NOR_FIXED_PACKAGE=y: the fixed-slot package as before, plus -split. Tested in qemu-hisilicon (hi3516cv500, 16 MB) with hi3516cv500_lite (uImage 1943K, squashfs 7852K, firmware.bin 9856K): split boot under the new and the published U-Boot, root on 31:4, login, the overlay kept across a power cycle; the fixed-slot package on 31:3; U-Boot recovery over TFTP from fixed slots and from a damaged kernel, byte-identical on flash. Not run on hardware.
hi3536dv100's kernel config turns on MTD_SPLIT_FIRMWARE (named "firmware"), MTD_SPLIT_UIMAGE_FW, MTD_SPLIT_SQUASHFS_ROOT and MTD_ROOTFS_ROOT_DEV; its kernel finds the layout from its device tree since OpenIPC/linux#143, its U-Boot scans it since OpenIPC/u-boot#62. hi3536dv100_lite uses post-image-split.sh with BR2_OPENIPC_NOR_FIXED_PACKAGE=y. Tested in qemu-hisilicon (hi3536dv100, 8 MB) with hi3536dv100_lite (uImage 1710K, squashfs 4820K, firmware.bin 6592K): split boot under the new and the published U-Boot, root on 31:4, login, the overlay kept; the fixed-slot package on 31:3; recovery from fixed slots and from a damaged kernel, byte-identical on flash. Not run on hardware.
hi3516av100 and hi3516dv100's kernel configs turn on MTD_SPLIT_FIRMWARE (named "firmware"), MTD_SPLIT_UIMAGE_FW, MTD_SPLIT_SQUASHFS_ROOT and MTD_ROOTFS_ROOT_DEV; their kernel finds the layout from its device tree since OpenIPC/linux#144 (through the HiSFC350 driver), their U-Boot scans it since OpenIPC/u-boot#62, which also gives these boards the sf command their bootcmd needs. The lite and ultimate defconfigs use post-image-split.sh with BR2_OPENIPC_NOR_FIXED_PACKAGE=y. Tested in qemu-hisilicon (hi3516av100, 8 MB) with hi3516av100_lite (uImage 1833K, squashfs 4580K, firmware.bin 6464K): the split image is taken from the device tree (kernel 0x50000-0x220000, rootfs, rootfs_data from 0x6a0000, rootfs set as root); fixed slots keep the command line's partitions; U-Boot recovery from fixed slots and from a damaged kernel, byte-identical on flash. qemu-hisilicon's hi3516av100 model stops the boot after the MTD probe, before the root is mounted, on either layout and with today's released kernel, so the root mount is not shown. Not run on hardware.
PR Summary by QodoEnable split NOR images for three HiSilicon families
AI Description
Diagram
High-Level Assessment
Files changed (14)
|
Code Review by Qodo
1. Board behavior changes lack hardware evidence
|
…mily (#622) * nor-split: the Hi3516CV500 family, Hi3536DV100 and the Hi3516AV100 family They ship the split package beside the fixed-slot one since OpenIPC/firmware#2669, on OpenIPC/linux#142, #143 and #144 and OpenIPC/u-boot#62. The Hi3516AV100 family's u-boot-<soc>-nor.bin boots only from #62 on: earlier builds had no sf command, so their bootcmd could not read the kernel. sysupgrade -k -r takes the split package on them, and they go back to fixed slots the same way. Checked in qemu-hisilicon (hi3516cv500 16 MB, hi3536dv100 and hi3516av100 8 MB). Not run on hardware. * nor-split: the Hi3516AV100 family's universal U-Boot boots the split image From review: the older u-boot-<soc>-universal.bin (2010.06) that these cameras run loads the split image's kernel, which takes the device tree's layout over the fixed-slot mtdparts it is given (checked in qemu-hisilicon, hi3516av100). An -nor.bin from before OpenIPC/u-boot#62 boots nothing, so no camera runs it to upgrade from.
Three more families on the split NOR layout. Each ships its fixed-slot package as before, plus
-split(post-image-split.sh,BR2_OPENIPC_NOR_FIXED_PACKAGE=y). Each kernel config turns onMTD_SPLIT_FIRMWARE(namedfirmware),MTD_SPLIT_UIMAGE_FW,MTD_SPLIT_SQUASHFS_ROOTandMTD_ROOTFS_ROOT_DEV.hi3516cv500_lite,hi3516dv300_lite,hi3516av300_lite(16 MB)hi3536dv100_litehi3516av100_lite/_ultimate,hi3516dv100_lite/_ultimatesfcommand their bootcmd needsTested in qemu-hisilicon with each family's lite build:
root=/dev/mtdblock3 ignored, 31:4sf; see u-boot#62)script.txtwithfatload+fwwriteon a fresh env (u-boot#62)On hi3516av100, qemu-hisilicon's model stops the boot after the MTD probe, before root is mounted. It does that on either layout, and with today's released kernel too, so the av100 root mount isn't shown. Not run on hardware.