How openipc/qemu-hisilicon works
This repository emulates HiSilicon IPC, DVR/NVR, and STB SoCs in QEMU so unmodified firmware can boot into Linux. The main workflow is selecting a machine, configuring its CPU, memory, and peripherals, then booting firmware; fastboot supports serial download when no kernel is supplied. Peripheral models cover the documented flash, networking, I2C, SPI, video, and accelerator capabilities. OMS tools form a separate model-format branch. The README and excerpts establish the architecture, but many peripheral instantiations and unsampled subsystems are not shown, so their specific links are omitted.
Main entry points: hisilicon.c Machine Setup · hisi-fastboot.h Fastboot Interface · hisi-i2c.c I2C Controller · hisi-fastboot.c Serial Fastboot
Components 17
Machine and Boot
- SoC Configuration
qemu/include/hw/arm/hisilicon.h - Machine Setup
qemu/hw/arm/hisilicon.c - Serial Fastboot
qemu/hw/misc/hisi-fastboot.c - Fastboot Interface
qemu/include/hw/misc/hisi-fastboot.h
SoC Peripherals
- Flash Controllers
qemu/hw/misc/hisi-fmc.c - I2C Controller
qemu/hw/i2c/hisi-i2c.c - I2C Sensors
qemu/hw/i2c/hisi-imx385.c - SPI Controller
qemu/hw/ssi/hisi-spi.c
IVE and Models
- IVE Accelerator
qemu/hw/misc/hisi-ive.c - NNIE Accelerator
qemu/hw/misc/hisi-nnie.c - OMS Builder
tools/oms_builder.py - OMS Parser
tools/oms_parser.py
Networking
- Fast Ethernet
qemu/hw/net/hisi-femac.c - Gigabit Ethernet
qemu/hw/net/hisi-gmac.c
Other components
- QEMU User
- Guest Firmware
- Guest Linux
Connections 16
- QEMU User → Machine Setup: selects machine
- SoC Configuration → Machine Setup: configures
qemu/hw/arm/hisilicon.c - Guest Firmware → Machine Setup: boots on
- Machine Setup → Guest Linux: boots guest
- Machine Setup → Fastboot Interface: uses interface
qemu/hw/arm/hisilicon.c - Fastboot Interface → Serial Fastboot: configures
qemu/hw/misc/hisi-fastboot.c - QEMU User → Serial Fastboot: uploads firmware
qemu/hw/misc/hisi-fastboot.c - Machine Setup → Flash Controllers: models flash
- Machine Setup → I2C Controller: models I2C
- I2C Controller → I2C Sensors: drives sensor
- Machine Setup → SPI Controller: models SPI
- Machine Setup → IVE Accelerator: models IVE
- Machine Setup → NNIE Accelerator: models NPU
- OMS Builder → OMS Parser: uses parser
tools/oms_builder.py - Machine Setup → Fast Ethernet: models Ethernet
- Machine Setup → Gigabit Ethernet: models Ethernet