Repository navigation
install: the split NOR layout for hi3516cv300 and hi3516ev100 - #158
Conversation
Their firmware now ships the split NOR package (OpenIPC/firmware#2645, on OpenIPC/linux#127) and their OpenIPC/u-boot NOR build scans for it (OpenIPC/u-boot#42), so both join NOR_SPLIT_SOCS: one firmware.bin.<soc> at 0x50000, the rest of the chip erased. Their U-Boot comes from OpenIPC/u-boot as u-boot-<soc>-nor.bin (and -nand.bin for cv300), so they move from AVAILABLE_FIRMWARE to PER_FLASH_TYPE_UBOOT. The u-boot-*-universal.bin still on the release is the U-Boot 2010.06 build, which knows no split layout. hi3516ev100 publishes no NAND build; NOR_ONLY_UBOOT makes asking for one find none rather than a URL that 404s. Tests that used hi3516cv300 as their example of a universal image or of the legacy NAND layout use hi3516cv200 now. Verified end to end on a hi3516cv300 board (imx291, W25Q128, 128 MiB), after a full flash backup: defib install -c hi3516cv300 --firmware openipc.hi3516cv300-nor-lite-split.tgz \ --uboot u-boot-hi3516cv300-nor.bin -p /dev/ttyUSB0 --power-cycle \ --poe-port ether3 --nic enp12s0 --host-ip ... --device-ip ... U-Boot at 0 (flash CRC 9507112D), firmware.bin at 0x50000 with 0x50000+0xFB0000 erased (flash CRC BD92A6E5), default env with the factory ethaddr restored; the next boot: "Found Kernel at 0x00050000", "Found RootFS at 0x001f0000", "Verifying Checksum ... OK", "hi_sfc: split NOR layout, device tree partitions", root on 31:4, login prompt.
PR Summary by QodoInstall split NOR firmware on hi3516cv300 and hi3516ev100
AI Description
Diagram
High-Level Assessment
Files changed (5)
|
Code Review by Qodo
1.
|
From review: - download_firmware() fell back offline to a cached u-boot-*-universal.bin for per-flash-type SoCs. For hi3516cv300 and hi3516ev100 that is U-Boot 2010.06, which cannot boot the split layout install now writes; NO_UNIVERSAL_FALLBACK makes the download fail instead. - The Web UI's own list of -nor SoCs (XMEDIA_SOCS) gains both, so the browser loads the same OpenIPC/u-boot build as defib. That list also turns on SPL boundary detection, which this image needs: defib burn found its SPL at 0x5400 on the board, past the profile's 0x4F00.
From review: their bootloader was still the -universal U-Boot 2010.06, which does not scan the NOR layout, so the wizard never gave them the split install (scansLayout) and fell back to fixed slots. They take u-boot-<soc>-nor.bin (OpenIPC/u-boot 2022.10, scanning; cv300 also -nand.bin), as defib does since OpenIPC/defib#158. The test index lists those images, the boards reference names them, the golden is regenerated for the two SoCs, and the test that used hi3516cv300 as its -universal example uses hi3516cv200. go test ./... (uncached) passes.
…yout (#491) * Catalogue: hi3516ev300 on the split NOR layout, edition by edition hi3516ev300's lite and ultimate builds now ship only the split NOR package (OpenIPC/firmware split/hi3516ev300): its kernel fills the 2 MiB slot, so no fixed-slot package can ship beside a split one. neo keeps its own fixed-slot build. nor_split, without nor_split_only: SplitOnlyEdition then takes the split package for every edition that has one and no plain package, and keeps neo on fixed slots; nor_split_only would have dropped neo from the installer. That needs the stale plain openipc.hi3516ev300-nor- {lite,ultimate}.tgz gone from the release once the split packages publish; until then the site keeps offering them as fixed slots, as today. Tests: the fixture release index is moved to that state (the two -split packages in, the plain lite/ultimate out; neo kept), and the golden regenerated: hi3516ev300 still offers nor lite, ultimate, neo and nand ultimate, lite and ultimate as split images. The two firmware tests and the wizard test that used hi3516ev300 as a fixed-slot NOR SoC use hi3516ev200 (same bootloaders and NAND layout, fixed slots kept). go test ./... passes. * Catalogue: hi3516cv300, hi3516ev100, hi3516ev200, hi3518ev300, hi3516dv200 on the split NOR layout They ship -split packages since OpenIPC/firmware#2645, #2655 and #2656 (hi3518ev300 split-only, like hi3516ev300); nor_split lets each edition use its split package where no plain one is published, and keeps the fixed-slot one where it is. go test ./... (uncached) passes. * Catalogue: hi3516cv300 and hi3516ev100 install their -nor U-Boot From review: their bootloader was still the -universal U-Boot 2010.06, which does not scan the NOR layout, so the wizard never gave them the split install (scansLayout) and fell back to fixed slots. They take u-boot-<soc>-nor.bin (OpenIPC/u-boot 2022.10, scanning; cv300 also -nand.bin), as defib does since OpenIPC/defib#158. The test index lists those images, the boards reference names them, the golden is regenerated for the two SoCs, and the test that used hi3516cv300 as its -universal example uses hi3516cv200. go test ./... (uncached) passes.
…t layout (#164) `CHIP_TO_FIRMWARE` has mapped gk7201v200 to gk7205v200 since #4, when gk7201v200 had nothing published of its own. So `defib install -c gk7201v200` wrote **gk7205v200's U-Boot and firmware** onto it. OpenIPC now publishes gk7201v200's own builds: - `u-boot-gk7201v200-nor.bin` and `-nand.bin` (OpenIPC/u-boot, `xm72010200`); - `openipc.gk7201v200-nor-lite.tgz`, built on the gk7205v500 kernel tree with gk7201v200's own vendor modules (OpenIPC/firmware#2478). This PR: - **Drops the alias.** gk7201v200 takes its `-nor`/`-nand` U-Boot (`PER_FLASH_TYPE_UBOOT`) and its own firmware. - **Adds it to `NOR_SPLIT_SOCS`.** Its kernel finds the split layout since OpenIPC/linux#140, its U-Boot scans it since OpenIPC/u-boot#61, and its firmware ships `-split` beside the fixed-slot package since OpenIPC/firmware#2668. - **Leaves gk7201v300 alone.** It has its own U-Boot builds but no firmware package. Not in this PR: hi3516cv200 and hi3518ev200 also ship `-split` since OpenIPC/firmware#2668, but defib keeps installing them on fixed slots for now. - Today defib gives them the old `-universal` U-Boot. Its default environment describes the lite fixed slots, so installing the split layout with it would break the hi3518ev200 ultimate fixed-slot install. - Moving them to the scanning `-nor.bin` U-Boot, as #158 did for hi3516cv300, needs a NAND U-Boot build for hi3518ev200's NAND package and a decision on its DDR3 boards. Neither exists yet. Tests: `test_gk7201v200_installs_its_own_build` checks there's no alias, that gk7201v200 uses its own NOR/NAND U-Boot names, that it's split-capable, and that it has its own package board. The per-flash-type U-Boot list includes it too. pytest, ruff and mypy are clean. The firmware side was checked in qemu-hisilicon (gk7201v200, 8 MB; see OpenIPC/firmware#2668). Not run on hardware.
hi3516cv300 and hi3516ev100 now ship the split NOR package (OpenIPC/firmware#2645, on OpenIPC/linux#127), and their OpenIPC/u-boot NOR build scans for it (OpenIPC/u-boot#42). Both join
NOR_SPLIT_SOCS: onefirmware.bin.<soc>at 0x50000, the rest of the chip erased.u-boot-<soc>-nor.bin(plus-nand.binfor cv300), so they move fromAVAILABLE_FIRMWAREtoPER_FLASH_TYPE_UBOOT. Theu-boot-*-universal.binstill on the release is the U-Boot 2010.06 build, which knows no split layout.NOR_ONLY_UBOOTmakes asking for one find none, not a URL that 404s.Verified end to end on a hi3516cv300 board (imx291, W25Q128, 128 MiB), after a full flash backup:
U-Boot at 0 (flash CRC 9507112D), firmware.bin at 0x50000 with 0x50000+0xFB0000 erased (flash CRC BD92A6E5), default env with the factory ethaddr restored. The next boot showed
Found Kernel at 0x00050000,Found RootFS at 0x001f0000,Verifying Checksum ... OK,hi_sfc: split NOR layout, device tree partitions, root on 31:4, then the login prompt.The install used local artifacts. The
u-boot-hi3516{cv300,ev100}-nor.binon the release predate OpenIPC/u-boot#42 and the split packages come with the next nightly, so the download path works once both are published.pytest tests/ --ignore=tests/fuzz: 1082 passed. ruff and mypy are clean.