Repository navigation
hi3516cv300: build the NAND image again, the uImage inside the UBIFS rootfs - #3006
Conversation
…rootfs #2537 stopped building hi3516cv300 NAND images because no bootloader could boot the kernel-in-UBIFS layout. OpenIPC/u-boot#28 has since added u-boot-hi3516cv300-nand.bin, which loads /boot/fitImage or else /boot/uImage from ubi0:rootfs, but nothing here was re-enabled, so the only cv300 NAND package in the latest release was the pre-#2537 one that U-Boot cannot boot (#3005). The NOR uImage carries its DTB (CONFIG_ARM_APPENDED_DTB), so no FIT is needed: ubinize-nand.cfg alone selects the uImage-in-UBIFS packaging nt98566 uses.
PR Summary by QodoRestore hi3516cv300 SPI NAND images with a UBIFS-embedded kernel
AI Description
Merge Risk
|
Code Review by Qodo
1. Untested NAND image re-enabled for release
|
Problem
#3005: no hi3516cv300 SPI NAND release can be booted with the U-Boot we publish for it.
u-boot-hi3516cv300-nand.bin. It boots exactly that layout (ubifsload /boot/fitImage || ubifsload /boot/uImagefromubi0:rootfs), but cv300 NAND was never re-enabled here.latestwas therefore the Oct 3 build from before nand: kernel inside the UBIFS rootfs, volumes sized by their images; retire the old NAND layouts #2537: a separateuImageplus arootfs.ubiwith no/boot. That is what the reporter paired with the new U-Boot. It, and the av100/av200/dv100/18ev200 orphans of the same date, have been deleted from the release.This puts the UBI symbols back in
hi3516cv300_ultimate_defconfigand addsboard/hi3516cv300/ubinize-nand.cfg. With aubinize-nand.cfgand nonand-fit.its, the existing packaging from #2970 (nt98566) applies:external.mkputs the uImage into the UBIFS as/boot/uImage;repackshipsuImage,rootfs.ubifsandrootfs.ubi;There is no FIT because the cv300 uImage already carries its DTB (
CONFIG_ARM_APPENDED_DTB=y), and it is the same kernel the NOR image boots. The kernel config already hasHIFMC100_SPI_NAND,MTD_UBI,UBIFS_FSandMTD_CMDLINE_PARTS.hi3516ev100 shares
board/hi3516cv300/but builds no UBI, so the/boothook and the NAND repack never run for it.Hardware tested on
Not on a camera. There is no hi3516cv300 board with SPI NAND in the lab, and the #3005 reporter's Dahua DH-IPC-HMW7230 (W25N01GV) would be the first real one.
What was run instead is a qemu-bench digital twin: the
hi3516cv300machine with a W25N01GV SPI NAND (nand-jedec=0xEFAA21, 64-byte OOB). Its flash is laid out the way an install writes it:0x000000u-boot-hi3516cv300-nand.binfromlatest0x0C00000x100000rootfs.ubiIt booted from flash through that U-Boot, with no
-kerneland no-initrd. The emulated SoC is only as good as the model, so this does not stand in for a camera: SPI NAND timing, real bad blocks and the sensor are not exercised.Evidence
rootfs.ubicomes from a localmake BOARD=hi3516cv300_ultimateof this branch (3700fb4). That build produced the same three files with the same size lines as the CI job:Before: the same U-Boot, given the
rootfs.ubifrom the Oct 3 pre-#2537openipc.hi3516cv300-nand-ultimate.tgz, the one #3005 paired it with. U-Boot finds no kernel and falls through to TFTP, as reported:After: this branch's
rootfs.ubi:Selector:
Not covered, on the twin or anywhere else:
sysupgradefrom this package on a running NAND camera;run ur/fwupdpath;Scope
general/package/all-patches/linux/(those go to OpenIPC/linux)general/overlay/or in a sharedload_<vendor>script hardcodes a value specific to my boardLD_PRELOAD, and no binaries that cannot be rebuilt from sourceRefs #3005