Skip to content

hi3516av300_neo: add modern (Linux 7.0+) firmware variant#2023

Open
widgetii wants to merge 2 commits intomasterfrom
feat/hi3516av300-neo
Open

hi3516av300_neo: add modern (Linux 7.0+) firmware variant#2023
widgetii wants to merge 2 commits intomasterfrom
feat/hi3516av300-neo

Conversation

@widgetii
Copy link
Copy Markdown
Member

Summary

New `hi3516av300_neo` firmware variant — runs OpenIPC on Linux 7.0+ (upstream-patches branch) instead of vendor 4.9.37, following the `hi3516ev300_neo` pattern.

Per OpenIPC/openhisilicon#51, CV500 has zero direct kernel API calls in blobs — everything goes through OSAL — making it a top-priority candidate for kernel modernization.

New files:

  • `br-ext-chip-hisilicon/configs/hi3516av300_neo_defconfig` — glibc toolchain, 16MB flash, upstream-patches kernel
  • `br-ext-chip-hisilicon/board/hi3516cv500/hi3516av300.neo.config` — seed kernel config (~1940KB uImage)
  • `br-ext-chip-hisilicon/board/hi3516cv500/neo-post-image.sh` — zImage+DTB → uImage wrapper

Modified packages (dynamic kernel version):

Companion changes (required before merge)

  • openipc/linux upstream-patches — ARCH_HI3516DV300 DTS, CV500/DV300 clock drivers, machine descriptor (pushed)
  • OpenIPC/openhisilicon#61 — Linux 5.0–7.0 OSAL compat (open, this PR pins commit 81e0073)
  • widgetii/qemu-hisilicon#33 — CV500 SMP + flash boot QEMU support (open)

Test plan

  • QEMU full flash boot (`hi3516cv500` -smp 2 -m 1024M with 16MB `hisi-fmc.flash-file`) → reaches `openipc-hi3516av300 login:`
  • QEMU 32MB flash (Macronix MX25L256) → reaches login (with companion kernel `mx25l25635` 16MB cap fixup)
  • Real hardware boot (hi3516av300/MX25L256): kernel boots, dual-core SMP active, MTD partitions created, squashfs rootfs mounted
  • Real hardware ethernet — currently disabled in DTS (built-in `hisi-femac` hangs in `port_init`); follow-up to use vendor OSAL ethernet path

Known follow-ups

  • Built-in `hisi-femac` driver hangs at probe on real hardware — DTS node `status="disabled"` for now; ethernet should come up through vendor OSAL modules at runtime (same path as 4.9 firmware).
  • 32MB flash 4-byte address mode: kernel patch in `drivers/mtd/spi-nor/macronix.c` to cap MX25L25635 at 16MB. Will be sent upstream-patches separately.

🤖 Generated with Claude Code

widgetii and others added 2 commits April 19, 2026 10:53
Picks up openhisilicon#59: EXPORT_SYMBOL for ssp_drv_init/exit/get_ops
in CV300 sensor_spi, fixing split sensor module dependencies.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add a "neo" variant for the hi3516av300 board running OpenIPC on the
upstream-patches kernel branch (Linux 7.0+) instead of the vendor
4.9.37 kernel. Per OpenIPC/openhisilicon#51, the CV500 platform has
zero direct kernel API calls in blobs — everything goes through OSAL,
making it a top-priority candidate for kernel modernization.

New files:
- br-ext-chip-hisilicon/configs/hi3516av300_neo_defconfig
  Buildroot defconfig with glibc toolchain, 16MB flash, upstream-patches
  kernel, BR2_OPENIPC_VARIANT="neo".
- br-ext-chip-hisilicon/board/hi3516cv500/hi3516av300.neo.config
  Seed kernel config with ARCH_HI3516DV300, COMMON_CLK_HI3516DV300,
  earlycon at 0x120a0000, ZRELADDR=0x80008000, CMA, MTD/SPI-NOR.
  Aggressive size trimming (no IPv6, no NETFILTER, no input/sound/USB,
  no JFFS2/CRAMFS/loop/RAM block) keeps uImage under 2048KB limit.
- br-ext-chip-hisilicon/board/hi3516cv500/neo-post-image.sh
  Concatenates zImage + DTB and wraps as uImage (load 0x80008000).

Modified packages:
- hisilicon-opensdk.mk: Replace 6 hardcoded kernel versions
  (3.0.8/3.18.20/4.9.37) with dynamic `kernel.release` detection,
  bump to OpenIPC/openhisilicon#61 commit (Linux 5.0-7.0 compat).
- hisilicon-osdrv-hi3516cv500.mk: Same dynamic kernel version.
- load_hisilicon: `uname -r` instead of hardcoded 4.9.37.

Tested:
- QEMU: U-Boot → Linux 7.0 → squashfs rootfs from MTD → login
- Real hardware (hi3516av300/MX25L256 32MB flash): builds and flashes
  via sysupgrade

Companion changes:
- openipc/linux upstream-patches: ARCH_HI3516DV300 DTS, CV500/DV300
  clock drivers, mach machine descriptor
- OpenIPC/openhisilicon#61: Linux 5.0-7.0 OSAL compat
- widgetii/qemu-hisilicon#33: CV500 SMP + flash boot

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant