Skip to main content

1. ArmSom-SDK Release

ArmSom-SDK is a customized version based on Rockchip's general Linux SDK project, providing complete embedded Linux BSP support for RK3588/RK3576 main control development boards.

2. SDK Development Environment Setup

Development environment description is as follows: ArmSom-SDK is developed and tested based on the Ubuntu system. During the development process, Ubuntu 22.04 is mainly used. It is recommended that users use Ubuntu 20.04 or Ubuntu 22.04. The PC system defaults to Windows 11, and when using RockChip's flashing tools, the Windows system is required. Recommended hardware configuration: 64-bit system, hard disk space larger than 80GB. If you perform multiple builds, larger hard disk space will be required.

2.1 Install SDK Dependent Software Packages​

Install the software packages required for SDK build. Copy the following content entirely into the terminal for installation:

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 python3-pip python2 u-boot-tools curl \
python3-pyelftools dpkg-dev

2.2 Install repo​

ArmSom-SDK uses repo to download and manage project software repositories.

mkdir ~/bin
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
echo PATH=~/bin:$PATH >> ~/.bashrc
source ~/.bashrc

After executing the above commands, verify that repo -v is installed successfully and runs normally.

2.3 Git Configuration​

Set your own git information to ensure normal code pulling in subsequent steps. If you don't need to submit code, you can set any username and email address.

git config --global user.name "your name"
git config --global user.email "your mail"

2.4 Switch to Python 3​

If the returned version number is Python3, no further Python version switching is needed. If it is Python2 version or no python is found, you can switch using the following method:

#Check which Python versions are installed in the current system
ls /usr/bin/python*

#Link python to python3
sudo ln -sf /usr/bin/python3 /usr/bin/python

#Re-check default Python version
python -V

3. SDK Source Code Acquisition

ArmSom-SDK code is divided into several git repositories for version management separately. The repo tool can be used for unified downloading, committing, branch switching, and other operations on these git repositories.

Run the following commands to create a directory named armsom-sdk in the current user's home directory, which will be used to store SDK source code.

mkdir ~/armsom-sdk
cd armsom-sdk
repo init -u https://github.com/as-jackson/manifests.git -b linux -m armsom_linux_generic.xml
.repo/repo/repo sync -c -j4

4. SDK Updates

We continuously update ArmSom-SDK and synchronize modified content to GitHub in real-time. We welcome all development enthusiasts to jointly manage and maintain the open-source code. If you need to synchronize updated content locally, you can use repo or git to achieve this.

4.1 Update Entire SDK Using repo​

First, update .repo/manifests, which contains repo configuration files and records repository version information.

# Enter .repo/manifests directory
cd .repo/manifests

# Switch branch to Linux
git checkout linux

# Pull latest manifests
git pull

#Enter SDK top-level folder
cd ~/armsom-sdk

# Synchronize remote repositories
.repo/repo/repo sync -c

4.2 Update Individual Source Code Repositories Using Git​

Sometimes you only want to update a specific repository rather than the entire SDK. Or if you have already modified some SDK repositories, using repo synchronization will fail. In such cases, you need to update individual repositories. Here taking the debian12 repository as an example:

# Enter debian12 directory
cd debain12

# Checkout to corresponding repository's default branch
git checkout lbc-develop-5.10

# Pull git repository
git pull

5. Automatic Firmware Build

In the SDK top-level folder, execute the following commands to select the target board's main chip model and SDK configuration file. Execute the following command to select configuration chip and configuration file: ./build.sh chip After selecting the configuration file, pink prompt text will indicate the kernel version used by the current configuration file. One-click compilation of U-Boot, kernel, Rootfs and packaging into update.img image: ./build.sh The built images are saved in the rockdev/ directory.

6. Step-by-Step Firmware Build

When compiling firmware for the first time, it's necessary to run the one-click firmware build. However, during firmware development, it's recommended to use partitioned building, utilizing the SDK's single module build functionality.

6.1 Select SDK Configuration File​

First, you still need to select the SDK configuration file. If you have already performed automatic compilation, this step can be skipped. Here taking the sige7 board's Debian system XFCE desktop image as an example: Select SDK configuration file:
./build.sh armsom-sige7_rk3588_debian_xfce_linux6.1_defconfig

6.2 U-Boot Build​

./build.sh uboot
The generated U-Boot image is u-boot/uboot.img.

6.3 Kernel Build​

Boot partition kernel image: first generate the kernel deb package, then compile the kernel and pack the generated deb package into the boot partition. Execute the following commands in order to automatically complete kernel building and packaging: ./build.sh kernel
The generated kernel image is kernel/extboot.img.

6.4 rootfs Build​

The SDK mainly supports Ubuntu, Debian, of course other systems are also supported but not explained here. Ubuntu, Debian support different desktop versions, which have been specified when selecting the SDK configuration file earlier. Build Debian:
./build.sh debian
Build Ubuntu: ./build.sh ubuntu
The system image name is renamed to linaro-(SOC model)-(desktop version)-rootfs.img, such as linaro-rk3576-gnome-rootfs.img.

6.5 Image Packaging​

When u-boot, kernel, and Rootfs are all built, you need to execute ./build.sh firmware for firmware packaging. This mainly checks whether the partition table file exists, whether each partition corresponds to the partition table configuration, and copies or links all files to rockdev/ according to the configuration file. Firmware packaging: ./build.sh firmware
Generate update.img: ./build.sh updateimg