Skip to content

LINUX_SDK COMPILATION

SDK Introduction

SDK (Software Development Kit) is a collection of development tools provided for a specific software framework, hardware platform, or operating system, designed to help developers create applications more efficiently.

Compilation Host Configuration

Install Ubuntu on a PC to perform SDK compilation.

  • Hardware: PC must meet RAM ≥ 32 GB, CPU cores ≥ 4, Hard Drive ≥ 500GB
  • Software: Ubuntu 22.04 64-bit, x86 architecture, allocate ≥ 200GB disk space for virtual machines.

Environment setup:

sudo apt-get update
sudo apt install autoconf bc binfmt-support bison build-essential bzip2
sudo apt install chrpath cmake cpp-aarch64-linux-gnu curl device-tree-compiler diffstat
sudo apt install expat expect expect-dev fakeroot flex
sudo apt install g++ g++-multilib gawk gcc gcc-multilib git gnupg gperf gpgv2 imagemagick
sudo apt install lib32ncurses5-dev lib32readline-dev lib32z1-dev libgmp-dev 
sudo apt install libgucharmap-2-90-dev liblz4-tool libmpc-dev
sudo apt install libncurses5-dev libsdl1.2-dev libssl-dev libwxgtk3.0-gtk3-dev 
sudo apt install libxml2 libxml2-utils live-build lzop
sudo apt install make module-assistant ncurses-dev openjdk-8-jdk 
sudo apt install patchelf pngcrush python2 python-is-python3 python-pip
sudo apt install qemu-user-static rsync schedtool squashfs-tools ssh sudo 
sudo apt install texinfo u-boot-tools unzip
sudo apt install xsltproc yasm zip zlib1g-dev pip
sudo apt-get install binfmt-support qemu-user-static --reinstall
sudo pip install pyelftools
sudo ln -s /usr/bin/python2 /usr/bin/python

Obtaining SDK Source Code

Note

1. The SDK cannot be compiled in a shared directory.
2. The compilation host cannot log in using the ROOT account.
3. The RK3576 Linux SDK source code is not publicly available; please contact KICKPI official to obtain it.

1. Download the Linux SDK source code. Download the release_sdk.sh script. Typically, download the file with the latest date suffix.

2. Place the tar.gz package, md5sum file, and release_sdk.sh file in the same directory on the compilation host. If the compilation host is a virtual machine, do not place them in a shared directory!

rk3576-linux-*.tar.gz
rk3576-linux-*.md5sum
release_sdk.sh

3. Run the script to restore the SDK source code.

chmod +x ./release_sdk.sh
./release_sdk.sh

Schematic diagram:

K7_RESET_SDK

Configure Debian Compilation Environment

Tip

Configuring the Debian compilation environment requires the SDK source code.

Navigate to the root directory of the source code on the compilation host and execute the following commands.

sudo dpkg -i debian/ubuntu-build-service/packages/*
sudo apt-get install -f

Full Compilation

1. Navigate to the code path on the compilation host and execute the following command to configure the compilation target.

./build.sh lunch

Select based on the corresponding system and configuration file.

Board System Configuration File
K7 Debian 12 rockchip_rk3576_kickpi_k7_debian_defconfig
K7 Ubuntu 24.04 rockchip_rk3576_kickpi_k7_ubuntu_defconfig
K7C Debian 12 rockchip_rk3576_kickpi_k7c_debian_defconfig
K7C Ubuntu 24.04 rockchip_rk3576_kickpi_k7c_ubuntu_defconfig

Example of configuring the Ubuntu compilation environment for K7:

./build.sh lunch
Log colors: message notice warning error fatal

Parsing supported commands...

Log saved at /mnt/data1/hcm/rk3576/rk3576-linux/output/sessions/2025-11-06_10-33-39
Pick a defconfig:

1. rockchip_defconfig
2. rockchip_rk3576_kickpi_k7_buildroot_defconfig
3. rockchip_rk3576_kickpi_k7_debian_defconfig
4. rockchip_rk3576_kickpi_k7_ubuntu_defconfig
5. rockchip_rk3576_kickpi_k7c_buildroot_defconfig
6. rockchip_rk3576_kickpi_k7c_debian_defconfig
7. rockchip_rk3576_kickpi_k7c_ubuntu_defconfig
Which would you like? [1]: 4
Switching to defconfig: /mnt/data1/hcm/rk3576/rk3576-linux/device/rockchip/.chip/rockchip_rk3576_kickpi_k7_ubuntu_defconfig
#
# configuration written to /mnt/data1/hcm/rk3576/rk3576-linux/output/.config
#
Using last kernel version(6.1)

2. Full compilation

./build.sh 

Other Commands

Multi-screen Recognition Image Compilation

./build.sh all_multi_dtb

U-Boot Compilation

$ ./build.sh uboot

Kernel defconfig Configuration

./build.sh kernel-config

Kernel Compilation

./build.sh kernel

Kernel Multi-screen Recognition Compilation

./build.sh kernel_multi_dtb

Debian Filesystem Compilation

./build.sh debian

Ubuntu Filesystem Compilation

./build.sh ubuntu

Q&A

  • WiFi malfunction after modifying kernel configuration?

Due to lazy compilation of rootfs, WiFi-related drivers are not updated. Clean and recompile.

./build.sh clean