Introduction
Vega's default SDK is built based on buildroot and is used to generate Vega's firmware. The SDK mainly contains the following parts:
- u-boot: 2020.07-rc2
- linux kernel: 5.8.0
- buildroot: 2020.05-rc1
- opensbi: 0.7
Source code: github
Build image
Prepare the Compilation Environment. Using a local Ubuntu system, the officially supported compilation environment is Ubuntu Jammy 22.04.x amd64
only!
If you are using other Linux distributions, we strongly recommend that you use the Docker environment to compile to reduce the probability of compilation errors.
The following describes the compilation methods in the two environments.
1. Compiled using Ubuntu 22.04
Packages to be installed
sudo apt install -y make git gcc g++ bison flex device-tree-compiler mtd-utils
Get SDK Source Code
git clone https://github.com/milkv-vega/vega-buildroot-sdk.git --depth=1
One-click Compilation
Execute one-click compilation script build.sh
:
cd vega-buildroot-sdk/
./build.sh
After successful compilation, you can see the three generated images in the out
directory:
out/
├── freeloader.bin
├── kernel.bin
└── ubifs.img
2. Compiled using Docker
Docker support is required on hosts running Linux systems. For how to use Docker, please refer to the official documentation or other tutorials.
We put the SDK source code on the Linux host system and call the Docker image environment provided by Milk-V to compile it.