SDK Related - Compiling Firmware

1. Download Files
CAM126 / CAM126B-P: pay attention to the distinction
Go to CAM126 SDK | Go to CAM126B-P SDK
[Optional] Choose an Operating System
[Optional] [For reference only] This example usesubuntu-24.04.3-live-server-amd64.iso
[Optional] [For reference only] During installation, selectInstall Ubuntu Server (minimized). This is a specific option that appears during the Ubuntu Server installation process; its core purpose is to install a deliberately minimized base Ubuntu Server system for you.
Thank you for downloading Ubuntu Server 24.04.3 LTS
📁 RV1126BP SDK Linux V1.1.0 Updated Version V1.2.1
The new version V1.2.1 only provides new code for reference; the corresponding features have not been developed.
Link: https://pan.baidu.com/s/1Br7GJm_1y5o274LQgSFmJw?pwd=fanc
Extraction code: fanc
Extract Files
The downloaded SDK files are as follows
ls
rv1126b_linux6.1_sdk_v1.1.0.tar.gz00 rv1126b_linux6.1_sdk_v1.1.0.tar.gz01
Merge multiple split files and extract
cat rv1126b_linux6.1_sdk_v1.1.0.tar.gz* > rv1126b_linux6.1_sdk_v1.1.0.tar.gz
tar -zxvf rv1126b_linux6.1_sdk_v1.1.0.tar.gz
# Move to the build directory
mv rv1126b_linux6.1_sdk_v1.1.0 ~
cd ~/rv1126b_linux6.1_sdk_v1.1.0
2. Prepare the Environment
[Optional] Basic Preparation
[Optional] [For reference only] Create a separate screen session to prevent an SSH disconnect caused by network issues from stopping the build
# Install basic software
sudo apt update
sudo apt install vim screen
# Optional: start a separate session named builrv1126 and keep it alive
screen -S builrv1126
Bonus: simple usage of screen:
## Basic usage
# Create a window named builrv1126
screen -S builrv1126
# Key combination to hide the current window:
# `ctrl + a + d`
# It will show:
# [detached from 1695.builrv1126]
# Switch to view the window list (if there is only one, it switches into it directly)
screen -r
# Switch to the window named builrv1126 with id 1695
screen -r builrv1126
screen -r 1695
# -d avoids being unable to switch because someone else is attached; -d forces the switch
screen -rd builrv1126
# Exit the window
exit
Build Preparation
- The install commands for the packages that the SDK build environment depends on are as follows:
sudo apt update
# Install build dependencies
sudo apt-get install -y rsync
sudo apt-get install -y gcc
sudo apt-get install -y g++
sudo apt-get install -y make
sudo apt-get install -y libsqlite3-dev
sudo apt-get install -y device-tree-compiler
sudo apt-get install -y flex
sudo apt-get install -y bison
sudo apt-get install -y git
sudo apt-get install -y libssl-dev
sudo apt-get install -y libgmp-dev
sudo apt-get install -y libmpc-dev
sudo apt-get install -y libncurses
sudo apt-get install -y libncurses-dev
sudo apt-get install -y bc
sudo apt-get install -y gettext
sudo apt-get install -y file
sudo apt-get install -y unzip
sudo apt-get install -y bzip2
sudo apt-get install -y fakeroot
- Install Python-2.7.18
cd ~
wget https://www.python.org/ftp/python/2.7.18/Python-2.7.18.tgz
tar xf Python-2.7.18.tgz
cd Python-2.7.18
sudo apt-get install libsqlite3-dev
./configure --enable-optimizations
sudo make install -j8
- Install lz4 for decompression
cd ~
git clone https://github.com/lz4/lz4.git --depth 1 -b v1.9.4
cd lz4
sudo make install -j8
3. Start Building
Select a Project
Currently available options:
rockchip_rv1126bp_evb1_v10_defconfig
rockchip_rv1126bp_ipc_32_evb1_v10_defconfig
rockchip_rv1126bp_ipc_64_evb1_v10_defconfig
Note: 9. rockchip_rv1126bp_evb1_v10_defconfig
Note: ipc_32 (32-bit)
cd ~/rv1126b_linux6.1_sdk_v1.1.0
./build.sh lunch
# 9. rockchip_rv1126bp_evb1_v10_defconfig
# 10. rockchip_rv1126bp_fastboot_defconfig
# 11. rockchip_rv1126bp_ipc_32_evb1_v10_defconfig
# 12. rockchip_rv1126bp_ipc_64_evb1_v10_defconfig
# 13. rockchip_rv1126bp_robot_defconfig
Start Building
./build.sh
Pay attention to the error output; for common problems you can first ask AI
Build Complete
- The prompt is as follows
Make firmware OK!
------ OK ------
********rkImageMaker ver 2.29********
Generating new image, please wait...
Writing head info...
Writing boot file...
Writing firmware...
Generating MD5 data...
MD5 data generated successfully!
New image generated successfully!
Run 'make edit-package-file' if you want to change the package-file.
Running mk-updateimg.sh - build_updateimg succeeded.
Images under /home/roy/rv1126b_linux6.1_sdk_v1.1.0/output/firmware/ are ready!
Running mk-firmware.sh - build_firmware succeeded.
Running 99-all.sh - build_all succeeded.
Download the Files
- According to the completion message, check the corresponding files
cd /home/roy/rv1126b_linux6.1_sdk_v1.1.0/output/firmware/
ls -l
total 0
lrwxrwxrwx 1 roy roy 46 Oct 25 09:16 MiniLoaderAll.bin -> ../../u-boot/rv1126bp_spl_loader_v1.06.105.bin
lrwxrwxrwx 1 roy roy 25 Oct 25 09:16 boot.img -> ../../kernel-6.1/boot.img
lrwxrwxrwx 1 roy roy 11 Oct 25 09:16 misc.img -> ../misc.img
lrwxrwxrwx 1 roy roy 22 Oct 25 09:18 oem.img -> ../extra-parts/oem.img
lrwxrwxrwx 1 roy roy 50 Oct 25 09:18 parameter.txt -> ../../device/rockchip/.chips/rv1126b/parameter.txt
lrwxrwxrwx 1 roy roy 23 Oct 25 09:18 recovery.img -> ../recovery/ramboot.img
lrwxrwxrwx 1 roy roy 58 Oct 25 09:18 rootfs.img -> ../../buildroot/output/rockchip_rv1126b/images/rootfs.ext2
lrwxrwxrwx 1 roy roy 22 Oct 25 09:16 uboot.img -> ../../u-boot/uboot.img
lrwxrwxrwx 1 roy roy 26 Oct 25 09:18 update.img -> ../update/Image/update.img
lrwxrwxrwx 1 roy roy 27 Oct 25 09:18 userdata.img -> ../extra-parts/userdata.img
- Get the corresponding upgrade firmware
For example:
update.img
realpath update.img
/home/roy/rv1126b_linux6.1_sdk_v1.1.0/output/update/Image/update.img
- Download the built system to the current cmd directory
# roy is the username
# 10.0.1.0 is the IP of the build server
scp roy@10.0.1.0:/home/roy/rv1126b_linux6.1_sdk_v1.1.0/output/update/Image/update.img ./

FAQ
About the SDK
This is the official Rockchip SDK; we have only done the basic BSP adaptation and image tuning.
For specific features, you can implement them based on the open-source code. We do not provide customization work in this area.
Build Debian Command
You need to set a variable; everything else stays the same
export RK_ROOTFS_SYSTEM=debian