From 649b49917eb1c996a3416481633fda66479ae1d8 Mon Sep 17 00:00:00 2001 From: Dmitry Ermakov <7954832+dimerr@users.noreply.github.com> Date: Wed, 4 Nov 2026 05:28:03 +0000 Subject: [PATCH] ci, docs: build and smoke-test the Novatek SPI NAND images nt98560-nand, nt98562-nand, nt98566-nand, nt98525-nand: a build leg each (artifact u-boot--nand, the 2816 KiB boot area as its limit) and a smoke leg booting it from 128 MiB of SPI NAND. --- .github/workflows/build-novatek.yml | 24 ++++++++++++++++++------ README.md | 15 +++++++++++---- 2 files changed, 29 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build-novatek.yml b/.github/workflows/build-novatek.yml index ac38ee3fa47b..604c8bfdecd2 100644 --- a/.github/workflows/build-novatek.yml +++ b/.github/workflows/build-novatek.yml @@ -61,8 +61,10 @@ jobs: matrix: # image: the file released; limit_kb: the slot it is written to # (the camera dies' whole 256 KiB boot partition, loader and device - # tree included; on the NVRs U-Boot's slot in the board's own - # layout, behind the board's loader and BL31). + # tree included; on SPI NAND their 2816 KiB boot area before the + # environment; on the NVRs U-Boot's slot in the board's own + # layout, behind the board's loader and BL31). target: what + # build.sh is asked for, when not the SoC (-nand). include: - { soc: nt98560, image: nor, limit_kb: 256 } - { soc: nt98561, image: nor, limit_kb: 256 } @@ -80,6 +82,10 @@ jobs: - { soc: nt98323, image: nor, limit_kb: 256 } - { soc: nt98332, image: nor, limit_kb: 128 } - { soc: nt98633, image: nand, limit_kb: 896 } + - { soc: nt98560, target: nt98560-nand, image: nand, limit_kb: 2816 } + - { soc: nt98562, target: nt98562-nand, image: nand, limit_kb: 2816 } + - { soc: nt98566, target: nt98566-nand, image: nand, limit_kb: 2816 } + - { soc: nt98525, target: nt98525-nand, image: nand, limit_kb: 2816 } steps: - name: Checkout @@ -110,8 +116,8 @@ jobs: sleep $((i*10)) done - - name: Build ${{ matrix.soc }} - run: bash build.sh ${{ matrix.soc }} + - name: Build ${{ matrix.target || matrix.soc }} + run: bash build.sh ${{ matrix.target || matrix.soc }} - name: Check partition fit run: | @@ -131,7 +137,7 @@ jobs: - name: Upload artifact uses: actions/upload-artifact@v4 with: - name: u-boot-${{ matrix.soc }} + name: u-boot-${{ matrix.target || matrix.soc }} path: output/u-boot-${{ matrix.soc }}-${{ matrix.image }}.bin if-no-files-found: error @@ -140,7 +146,7 @@ jobs: # emulator's stand-in loader starts, for the smoke test only (never # released: its artifact name is outside the release's u-boot-*). - name: Upload the emulator image - if: ${{ hashFiles(format('output/u-boot-{0}-qemu.bin', matrix.soc)) != '' }} + if: ${{ !matrix.target && hashFiles(format('output/u-boot-{0}-qemu.bin', matrix.soc)) != '' }} uses: actions/upload-artifact@v4 with: name: qemu-image-${{ matrix.soc }} @@ -214,6 +220,12 @@ jobs: - { soc: nt98323, machine: nt98323, qemu: arm, artifact: u-boot-nt98323, file: u-boot-nt98323-nor.bin, mib: 8, args: "" } - { soc: nt98332, machine: nt98332, qemu: aarch64, artifact: qemu-image-nt98332, file: u-boot-nt98332-qemu.bin, mib: 16, args: "-smp 2" } - { soc: nt98633, machine: nt98633, qemu: aarch64, artifact: qemu-image-nt98633, file: u-boot-nt98633-qemu.bin, mib: 128, args: "-smp 4" } + # SPI NAND: a 128 MiB image is a W25N01 to the machine, and its + # mask ROM model runs the image's NandSpi loader from block 0 + - { soc: nt98560-nand, machine: nt98560, qemu: arm, artifact: u-boot-nt98560-nand, file: u-boot-nt98560-nand.bin, mib: 128, args: "" } + - { soc: nt98562-nand, machine: nt98562, qemu: arm, artifact: u-boot-nt98562-nand, file: u-boot-nt98562-nand.bin, mib: 128, args: "" } + - { soc: nt98566-nand, machine: nt98566, qemu: arm, artifact: u-boot-nt98566-nand, file: u-boot-nt98566-nand.bin, mib: 128, args: "" } + - { soc: nt98525-nand, machine: nt98525, qemu: arm, artifact: u-boot-nt98525-nand, file: u-boot-nt98525-nand.bin, mib: 128, args: "" } steps: - name: Download qemu uses: actions/download-artifact@v4 diff --git a/README.md b/README.md index 95f28772028f..6306c6e33b2c 100644 --- a/README.md +++ b/README.md @@ -145,14 +145,14 @@ swapped back. | SoC | CPU | RAM | Flash | Notes | | --- | --- | --- | --- | --- | -| `nt98560` | Cortex-A9 | 512 MiB DDR3, external | NOR | NA51089 | +| `nt98560` | Cortex-A9 | 512 MiB DDR3, external | NOR, SPI NAND | NA51089 | | `nt98561` | Cortex-A9 | 64 MiB | NOR | NA51089 | -| `nt98562` | Cortex-A9 | 64 MiB | NOR | NA51089 | -| `nt98566` | Cortex-A9 | 128 MiB | NOR | NA51089 | +| `nt98562` | Cortex-A9 | 64 MiB | NOR, SPI NAND | NA51089 | +| `nt98566` | Cortex-A9 | 128 MiB | NOR, SPI NAND | NA51089 | | `nt98520` | 2x Cortex-A9 | 512 MiB DDR3, external | NOR | NA51055 | | `nt98522` | 2x Cortex-A9 | 64 MiB | NOR | NA51055 | | `nt98523` | 2x Cortex-A9 | 128 MiB | NOR | NA51055 | -| `nt98525` | 2x Cortex-A9 | 2x 512 MiB DDR3, external | NOR | NA51055 | +| `nt98525` | 2x Cortex-A9 | 2x 512 MiB DDR3, external | NOR, SPI NAND | NA51055 | | `nt98528` | 2x Cortex-A9 | 2x 512 MiB DDR3, external | NOR | NA51084 | | `nt98529` | 2x Cortex-A9 | 2x 512 MiB DDR3, external | NOR | NA51084, 1.2 GHz | | `nt98532` | 2x Cortex-A32 | 256 MiB | NOR | NS02501 (532BD package) | @@ -165,6 +165,13 @@ swapped back. - **Cameras.** The image contains Novatek's loader, built from SDK source. It sits at offset 0, the device tree at `0x10000` and U-Boot (LZMA) at `0x20000`, in the 256 KiB boot partition. +- **Cameras on SPI NAND** (NT98560/562/566, NT98525: `u-boot--nand.bin`). + The SDKs' NAND layout in 128 KiB blocks: loader at 0, device tree at + `0x40000` and its copy at `0x80000`, U-Boot at `0xC0000`, the + environment at `0x2C0000`, UBI from `0x300000` + (`spi_nand.0:2816k(boot),256k(env),-(ubi)`). The NT98525's NAND loader + leaves out its own SD card update to fit 32 KiB; U-Boot's SD recovery + stays. - **External DDR.** Where the DDR is not in the package (NT98560, NT98520, NT98525, NT98528/529, NT98321/323), the loader is built for the SDK board's DDR: 4 Gbit DDR3 dies at 933 MHz (1066 MHz on NT98528/529