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.
1. Download the Linux SDK source code compressed package and 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!
3. Run the script to restore the SDK source code.
Full Compilation¶
1. Navigate to the code path on the compilation host and execute the following command to configure the compilation target.
K12S_C compilation environment example:
hjt@hjt:~/share/rv1126b-k12c/rv1126b-linux$ ./build.sh lunch
Log colors: message notice warning error fatal
Log saved at /home/hjt/share/rv1126b-k12c/rv1126b-linux/output/sessions/2026-11-23_14-36-28
Pick a defconfig:
1. rockchip_defconfig
2. rockchip_rv1126b_dv_64_evb1_v10_defconfig
3. rockchip_rv1126b_evb1_v10_defconfig
4. rockchip_rv1126b_evb4_v10_defconfig
5. rockchip_rv1126b_fastboot_defconfig
6. rockchip_rv1126b_ipc_32_evb1_v10_defconfig
7. rockchip_rv1126b_ipc_64_evb1_v10_defconfig
8. rockchip_rv1126b_kickpi_k12c_debian_defconfig
9. rockchip_rv1126b_robot_defconfig
10. rockchip_rv1126bp_evb1_v10_defconfig
11. rockchip_rv1126bp_fastboot_defconfig
12. rockchip_rv1126bp_ipc_32_evb1_v10_defconfig
13. rockchip_rv1126bp_ipc_64_evb1_v10_defconfig
14. rockchip_rv1126bp_robot_defconfig
Which would you like? [1]: 8
Switching to defconfig: /home/hjt/share/rv1126b-k12c/rv1126b-linux/device/rockchip/.chip/rockchip_rv1126b_kickpi_k12c_debian_defconfig
#
# configuration written to /home/hjt/share/rv1126b-k12c/rv1126b-linux/output/.config
#
Using last kernel version(6.1)
hjt@hjt:~/share/rv1126b-k12c/rv1126b-linux$
2. Full compilation
Other Commands¶
Multi-screen Recognition Image Compilation
Tip
If you need one firmware to automatically adapt to different display screens during SDK compilation, perform this operation.
U-Boot Compilation
Kernel defconfig Configuration
Kernel Compilation
Kernel Multi-screen Recognition Compilation
Debian Filesystem Compilation
Q&A¶
- WiFi malfunction after modifying the kernel configuration?
Due to lazy compilation of rootfs, WiFi-related drivers are not updated. Clean and recompile.
- Unable to pull the Buildroot mirror source?
If the USTC mirror cannot be pulled during compilation, replace it with the Tsinghua mirror.
--- a/buildroot/configs/rockchip/base/common.config
+++ b/buildroot/configs/rockchip/base/common.config
@@ -11,7 +11,7 @@ BR2_PRIMARY_SITE="https://sources.buildroot.net"
BR2_BACKUP_SITE=""
# Mirror for GNU packages
-BR2_GNU_MIRROR="https://mirrors.ustc.edu.cn/gnu"
+BR2_GNU_MIRROR="https://mirrors.tuna.tsinghua.edu.cn/gnu"
# Rockchip BSP packages
BR2_PACKAGE_ROCKCHIP=y