Skip to main content

Basic

SDK Introduction

ZHIHE COMPUTING Linux SDK (hereinafter referred to as "the SDK") is a Software Development Kit tailored for ZHIHE COMPUTING SoCs. The SDK provides developers with diverse pre-adapted drivers and toolchains, helping reduce evaluation time and allowing developers to focus on upper-layer application development.

Obtaining the Pre-built Images

Users can directly flash the provided pre-built images for rapid development and evaluation.

Downloading the Images

Development BoardOSDownload
a200-evbBuildrootbr2image-v2.8.1-a200_evb.tar.gz
Ubuntudiskimage_v2.8.1_a200-evb-release_desktop_ubuntu_public.tar.gz
a210-evbBuildrootbr2image-v2.8.1-a210_evb.tar.gz
Debiandiskimage_v2.8.1_a210-evb-release_desktop_debian_public.tar.gz

Note:

If adopting a pre-built image, users can proceed directly to Flashing the Image after downloading the image.

File Introduction

FileDescription
emmc-gpt_primary.imgsystem default partition table
emmc-uboot_env.imgU-Boot environment variables
emmc_boot-loader.imgeMMC physical bootloader image
emmc-boot_a.imgext4-formatted boot partition, including FIT packages with U-Boot, OpenSBI, Image, etc.
emmc-system_a.imgread-only Rootfs image
emmc-app_a.imgRootfs extended by Overlay, making the root filesystem writable (No initial data, only formatted)
emmc-home.imgreserved user data partition (No initial data, only formatted)
fastboot_images.batflashing script for Windows
fastboot_images.shflashing script for Linux
spl-with-fit-rvbl.binU-boot image for Fastboot boot
bootzero-rvbl.binCPU initialization file for Fastboot booting (Not included for A200)
output.ymlsystem information file

Compilation

Environment Preparation

Users can compile the image if the pre-built images do not meet customization or the compatibility requirements.

System Requirements

ComponentRequirements
Processor8-core processor, Intel Core i5 or equivalent
Disk Space≥ 16 GB
RAM≥ 4 GB
OSUbuntu 22.04 or later is recommended

Docker Preparation

A Docker image is provided to simplify environment setup for a more efficient workflow.

  1. Install Docker Engine using the official convenience script. For more details, please see Docker Documentation.

    # Docker official commands
    curl -fsSL https://get.docker.com -o get-docker.sh
    sudo sh get-docker.sh

    # Or use a mirror for China
    curl -fsSL https://get.docker.com | sudo bash -s docker --mirror Aliyun
  2. Add the user to the Docker group.

    # Create the docker group
    sudo groupadd docker

    # Add the user to the docker group
    sudo gpasswd -a $USER docker

    # Activate the group changes (or log out and back in)
    newgrp docker
  3. Start Docker.

    sudo systemctl start docker
  4. Install Python.

    sudo apt install python3-pip
    sudo apt install python$(python3 -V | cut -d' ' -f2 | cut -d'.' -f1-2)-venv
  5. Download the tools.

    cd <yourworkspace>
    wget http://developer.zhcomputing.com/downloads/release/zhihesdk/develop/build.sh -O build.sh && chmod +x ./build.sh
  6. Install the Docker environment. The example commands and the returned results are as follows.

    ./build.sh -i zdocker
    Successfully installed certifi-2025.8.3 charset-normalizer-3.4.3 docker-7.1.0 idna-3.10 psutil-7.0.0 pyserial-3.5 requests-2.32.4 six-1.17.0 tqdm-4.67.1 urllib3-2.2.3 zdocker-1.0.16
    >>> Create zdocker environment success.
    To enter the zdocker environment, execute the following command:
    source ~/zdocker_env/bin/activate
    zdocker
  7. Enter Docker.

    Note: A Docker Image needs to be downloaded when running zdocker for the first time. Please be patient as the download may take some time due to the image size.

    source ~/zdocker_env/bin/activate
    zdocker

Compiling

Caution:

Ensure all the following commands are executed in zdocker environment.

  1. Download the SDK.

    ./build.sh -s buildroot
  2. Start compiling.

    # Show available list
    ./build.sh -b buildroot

    # expected return results
    Defconfig list
    a200
    a210

    # Compile for a specific target
    ./build.sh -b buildroot a200
    ./build.sh -b buildroot a210
  3. Output similar to the following indicates compilation is complete.

    >>> Prepare Image package files: ..done
    >>> Create Image package: .done
    >>> Prepare OTA package files: ..done
    >>> Create OTA package: ..done
  4. The compiled images are located in the following directory.

    buildroot/output/images/Release/
    ├── emmc-app_a.img
    ├── emmc-boot_a.img
    ├── emmc_boot-loader.img
    ├── emmc-gpt_primary.img
    ├── emmc-home.img
    ├── emmc-system_a.img
    ├── emmc-uboot_env.img
    ├── fastboot_images.bat
    ├── fastboot_images.sh
    └── output.yml

Flashing the Image

For details on flashing images to the A210 board, please refer to A210 Flashing Guide.