Environment Setup
To help developers quickly set up the development environment, we provide two methods: native development environment setup and cross-compiler Docker image environment setup. Developers can choose either one.
Tips
Note: We recommend that developers set up the Docker image environment to shorten the build time of the compilation environment.
1 Development Environment Setup
1.1 Preparing the Development Environment
We recommend using Ubuntu 22.04 or later for compilation. Other Linux distributions may require corresponding adjustments to software packages. In addition to system requirements, there are other hardware and software requirements.
- Hardware requirements: 64-bit system, at least 8GB RAM, 100GB disk space. If you perform multiple builds, larger disk space will be required.
- Software requirements: Ubuntu 22.04 or later.
1.2 Installing Libraries and Toolsets
When using the command line for device development, you can install the libraries and tools required for compiling the SDK through the following steps. Use the following apt-get command to install the libraries and tools required for subsequent operations:
sudo apt-get update && sudo apt-get install git ssh make gcc libssl-dev \
liblz4-tool expect expect-dev g++ patchelf chrpath gawk texinfo chrpath \
diffstat binfmt-support qemu-user-static live-build bison flex fakeroot \
cmake gcc-multilib g++-multilib unzip device-tree-compiler ncurses-dev \
libgucharmap-2-90-dev bzip2 expat gpgv2 cpp-aarch64-linux-gnu libgmp-dev \
libmpc-dev bc python-is-python3 python2Tips
Note: The installation command is applicable to Ubuntu 22.04. For other versions, please use the corresponding installation command according to the package names. If you encounter errors during compilation, you can install the corresponding software packages based on the error messages. Among them:
- python requires version 3.6 or above; here python 3.6 is used as an example.
- make requires version 4.0 or above; here make 4.2 is used as an example.
- lz4 requires version 1.7.3 or above.
- Compiling Yocto requires a VPN network.
i Checking and Upgrading the Host's python Version
The method to check and upgrade the host's python version is as follows:
- Check the host python version
$ python3 --version
Python 3.10.6If it does not meet the requirement of python>=3.6, you can upgrade it as follows:
- Upgrade to the new python 3.6.15 version
PYTHON3_VER=3.6.15
echo "wget
https://www.python.org/ftp/python/${PYTHON3_VER}/Python-${PYTHON3_VER}.tgz"
echo "tar xf Python-${PYTHON3_VER}.tgz"
echo "cd Python-${PYTHON3_VER}"
echo "sudo apt-get install libsqlite3-dev"
echo "./configure --enable-optimizations"
echo "sudo make install -j8"ii Checking and Upgrading The Host's make Version
The method to check and upgrade the host's make version is as follows:
- Check the host make version
$ make -v
GNU Make 4.2
Built for x86_64-pc-linux-gnu- Upgrade to the new make 4.2 version
$ sudo apt update && sudo apt install -y autoconf autopoint
git clone https://gitee.com/mirrors/make.git
cd make
git checkout 4.2
git am $BUILDROOT_DIR/package/make/*.patch
autoreconf -f -i
./configure
make make -j8
sudo install -m 0755 make /usr/bin/makeiii Checking and Upgrading The Host's lz4 Version
The method to check and upgrade the host's lz4 version is as follows:
- Check the host lz4 version
$ lz4 -v
*** LZ4 command line interface 64-bits v1.9.3, by Yann Collet ***- Upgrade to the new lz4 version
git clone https://gitee.com/mirrors/LZ4_old1.git
cd LZ4_old1
make
sudo make install
sudo install -m 0755 lz4 /usr/bin/lz42 VM Environment Setup
2.1 Download and Extract the Archive
Download and extract the archive from the cloud drive materials (the archive is about 117GB; pay attention to disk space).
Tips
The archive is located in the 01-开发资料 / 02-软件工具 / 07-VM-SDK编译环境 / 3568VM directory

2.2 Importing Files in VMware
Open VMware, click File in the upper-left corner, and click "Open" in the drop-down menu:

Navigate to the directory where the files are stored and select the SMT_3568_VM file:

2.3 SDK Automatic Compilation Command
After the import is complete (this takes some time, please be patient), start the Ubuntu environment, enter the password "123456" to enter the virtual machine, then find the source archive in the file manager, right-click and select "Extract Here" to extract it into the current directory:

After extraction is complete, the interface displays as follows:

Once the source code is extracted, press "Ctrl + Alt + T" simultaneously to open the virtual machine terminal, enter the command to navigate to the extracted directory, and start executing the "build.sh" script to compile the source code:

# 查看目录下的文件或目录
ls
# 进入指定目录下
cd
# 查询编译帮助
sudo ./build.sh -h
# 开启多线程(可选)
export MAKEFLAGS="-j4" #4:线程数
# 指定 Debain 开启自动编译
sudo RK_ROOTFS_SYSTEM=debian ./build.shWait for compilation to complete.
