SDK Compilation
Prepare the Build Environment
AIMORELOGY provides a preconfigured Docker image for building the Ovis SDK. Building inside the container keeps the toolchain and dependency versions consistent and reduces differences between host environments.
Install Docker
Install Docker for your development host:
- Windows: Install Docker Desktop for Windows. The WSL 2 backend is recommended.
- macOS: Install Docker Desktop for Mac.
- Linux: Install Docker Engine and follow the instructions for your distribution.
After installation, verify that Docker can start containers:
docker --version
docker run --rm hello-world
Pull the Build Image
Pull the latest Ovis SDK build image from Docker Hub:
docker pull aimorelogy/ovis-build-docker:latest
The initial download time depends on your network connection. Run the same command again whenever you need to update the local image to the latest version.
Start the Build Container
The following example uses Bash syntax and mounts the host ~/projects directory at /workspace inside the container. On Windows, run it from a WSL 2 terminal. Ensure that the Ovis SDK is located at ~/projects/aimorelogy-ovis-sdk, or adjust the -v argument to match its actual location:
docker run -it --rm --privileged -v /dev:/dev -v ~/projects:/workspace -w /workspace aimorelogy/ovis-build-docker:latest /bin/bash
After the container starts, change to the SDK root directory:
cd /workspace/aimorelogy-ovis-sdk
The --rm option removes the container when you exit, while the bind mount keeps the SDK source code and build artifacts on the host. The --privileged option and /dev mapping provide device access where supported; the available passthrough capabilities depend on the host operating system and Docker backend. Use this configuration only on a trusted development host. Unless otherwise stated, run subsequent build commands inside this container.
Build the SDK
Use the following workflow to perform a complete clean build of the Ovis SDK. Run all commands in the same Docker container terminal:
cd /workspace/aimorelogy-ovis-sdk
source build/envsetup_soc.sh
defconfig ovis_spinand
export TPU_REL=1
clean_all
build_all
Each command performs the following task:
-
cd /workspace/aimorelogy-ovis-sdkChanges to the SDK root directory. The build scripts use paths relative to the repository root, so run all subsequent commands from this directory.
-
source build/envsetup_soc.shInitializes the SDK build environment, sets the toolchain, source, and output path variables, and loads build functions such as
defconfig,clean_all, andbuild_allinto the current shell. Run this command again whenever you start a new container or terminal. -
defconfig ovis_spinandSelects the Ovis SPI NAND board configuration and generates the active build configuration and partition information.
ovis_spinandis the public build target for the Ovis board, and its firmware is written toinstall/soc_ovis_spinand.Caution:
defconfigrefreshes the activebuild/.configfrom the board defaults. If you have custom options frommenuconfigthat have not been saved to the board defconfig, back them up or verify them before continuing. -
export TPU_REL=1Enables the TPU-related components, including the TPU kernel, IVE, IVS, and TDL SDK. These components are required by the on-device AI features in the complete Ovis firmware.
-
clean_allRemoves existing build outputs for the kernel, bootloader, drivers, middleware, AI components, and Ovis applications so stale files do not affect the full build. Use this step for a first build, after changing the board configuration, or when regenerating a complete firmware set. A component-only change usually does not require a full clean.
-
build_allBuilds the kernel, U-Boot and boot firmware, drivers, third-party libraries, multimedia and RTSP components, TPU/AI components, ISP tools,
ipcamera, andovis-manager. It then creates the partition images and packages the flashable firmware. Run this command only afterclean_allcompletes successfully.
Locate the Build Outputs
After a successful full build, the firmware and intermediate artifacts are available under:
install/soc_ovis_spinand/
This directory contains partition images such as fip.bin, boot.spinand, rootfs.spinand, system.spinand, cfg.spinand, and data.spinand. For normal Ovis flashing, use the following package:
install/soc_ovis_spinand/aimorelogy_ovis_firmware.zip
The ZIP package contains the required partition images, partition description, update scripts, and supporting tools. Before flashing, confirm that the file was generated and check its modification time:
ls -lh install/soc_ovis_spinand/aimorelogy_ovis_firmware.zip
Do not mix the top-level .spinand files, raw images under rawimages/, and the complete ZIP package unless a debugging or manufacturing workflow explicitly requires a specific image format.