Linux BSP User Guide for RK3568 Series Debian10
1. Introduction
This document provides comprehensive instructions for building and deploying Linux BSP for RK3568 series platforms running Debian 10. The guide covers environment setup, source code acquisition, building processes for multiple processors platforms, and deployment methods.
2. Linux BSP Version
- OS: Debian 10.x
- Kernel: 4.19.219
3. Build Environment on Host
Currently, we adopt Docker as build environment.
You can get the latest version of advrisc/u18.04-rklbv1 Docker image for developing Rockchip RK3568 projects.
3.1 Docker Installation Command
sudo docker pull advrisc/u18.04-rklbv1
3.2 Run Docker Example
- Step 1: Run Docker Container
sudo docker run -it --name rk3568_linux_risc -v /home/bsp/myLinux:/home/adv/BSP:rw --privileged advrisc/u18.04-rklbv1:latest /bin/bash
- Step 2: Change User in Container
adv@7cc0fa834366:~$ sudo chown adv:adv -R BSP
- Step 3: Install Some Tools
$ sudo apt-get install expect
4. Getting Linux Source Code
Debian 10.x
$ cd ~/BSP
$ git clone https://github.com/ADVANTECH-Rockchip/repo.git
$ mkdir rk3568_linux_risc
$ cd rk3568_linux_risc
$ git config --global user.name "Your Name"
$ git config --global user.email you@example.com
$ ../repo/repo init -u https://AIM-Linux@dev.azure.com/AIM-Linux/RISC-RK3568-Linux/_git/manifest -b rk356x_v130_risc -m default.xml
$ ../repo/repo sync
$ ../repo/repo forall -c git checkout -b local --track advantech-azure/rk356x_v130_risc
5. Building
5.1 Build Choose Project
- Build RSB-4810 Project
$ export TOP=`pwd`
$ cd $TOP
$ ln -rfs device/rockchip/.target_product/BoardConfig-rk3568-rsb4810a2.mk device/rockchip/.BoardConfig.mk
- Build ROM-5880 Project
$ export TOP=`pwd`
$ cd $TOP
$ ln -rfs device/rockchip/.target_product/BoardConfig-rk3568-rom5880a1.mk device/rockchip/.BoardConfig.mk
- Build KEDGE-350 Project
$ export TOP=`pwd`
$ cd $TOP
$ ln -rfs device/rockchip/.target_product/BoardConfig-rk3568-kedge350a1.mk device/rockchip/.BoardConfig.mk
- Build EBC-RB07 Project
$ export TOP=`pwd`
$ cd $TOP
$ ln -rfs device/rockchip/.target_product/BoardConfig-rk3568-ebcrb07a1.mk device/rockchip/.BoardConfig.mk
5.2 Build U-boot
- Build RSB-4810 U-boot
$ export TOP=`pwd`
$ cd $TOP
$ cd u-boot
$ ./make.sh rk3568_rsb4810a2
- Build ROM-5880 U-boot
$ export TOP=`pwd`
$ cd $TOP
$ cd u-boot
$ ./make.sh rk3568_rom5880a1
- Build KEDGE-350 U-boot
$ export TOP=`pwd`
$ cd $TOP
$ cd u-boot
$ ./make.sh rk3568_kedge350a1
- Build EBC-RB07 U-boot
$ export TOP=`pwd`
$ cd $TOP
$ cd u-boot
$ ./make.sh rk3568_ebcrb07a1
5.3 Build Kernel
- Build RSB-4810 Kernel
$ cd $TOP
$ cd kernel
$ make ARCH=arm64 rk3568_adv_defconfig -j8
$ make ARCH=arm64 rk3568-rsb4810-a2.img -j12
- Build ROM-5880 Kernel
$ cd $TOP
$ cd kernel
$ make ARCH=arm64 rk3568_adv_defconfig -j8
$ make ARCH=arm64 rk3568-rom5880-a1.img -j12
- Build KEDGE-350 Kernel
$ cd $TOP
$ cd kernel
$ make ARCH=arm64 rk3568_adv_defconfig -j8
$ make ARCH=arm64 rk3568-kedge350-a1.img -j12
- Build EBC-RB07 Kernel
$ cd $TOP
$ cd kernel
$ make ARCH=arm64 rk3568_rb07_defconfig -j8
$ make ARCH=arm64 rk3568-ebcrb07-a1.img -j12
5.4 Build Recovery
$ cd $TOP
$ rm buildroot/output/rockchip_rk356x_recovery -rf
$ source envsetup.sh rockchip_rk356x_recovery
$ ./build.sh recovery
5.5 Build Debian 10.x
$ cd $TOP
$ source envsetup.sh rockchip_rk3568
$ sudo BUILD_IN_DOCKER=TRUE ./mk-debian.sh
5.6 Push All Images to Rockdev Folder
$ ./mkfirmware.sh
All images are located in rockdev/. The ./mkfirmware.sh command in the previous step will repack boot.img and rootfs.img, and copy other related image files to the rockdev/ directory.
Output Image Files
The common image files are listed below:
boot.img
misc.img
oem.img
recovery.img
rootfs.img
uboot.img
userdata.img
MiniLoaderAll.bin
parameter.txt
5.7 Make update.img
$ cd $TOP
$ source envsetup.sh rockchip_rk3568
$ ./build.sh updateimg
You can get update.img in rockdev/ directory.
6. Update Images
There are three ways to update images:
6.1 Using RKDevTool via USB Cable
There is no limitation by this method.
6.2 Local OTA
There are some limitations:
- The device must be able to boot up to Debian
- Only update images from the same OS (e.g., Debian upgrade to Debian)
- Using
update.imgto upgrade
6.3 Via SD card
- Only update images from the same OS (e.g., Debian upgrade to Debian)
- Using
update.imgto upgrade
7. Summary
7.1 Supported Hardware Platforms
- RSB-4810: Industrial Single Board Computer with RK3568 processor
- ROM-5880: Computer-on-Module with RK3568 processor
- KEDGE-350: Edge AI Gateway with RK3568 processor
- EBC-RB07: Embedded Board Computer with RK3568 processor
7.2 Hardware Platform Specifications
| Platform | Type | Processor | Key Features |
|---|---|---|---|
| RSB-4810 | Industrial SBC | RK3568 | Industrial temperature range, multiple I/O interfaces |
| ROM-5880 | Computer-on-Module | RK3568 | Compact form factor, carrier board flexibility |
| KEDGE-350 | Edge AI Gateway | RK3568 | AI acceleration, edge computing optimized |
| EBC-RB07 | Embedded Board | RK3568 | Cost-effective, general purpose applications |
8. Build Configuration Summary
8.1 Project Selection
Each processors platform requires a specific board configuration file:
- RSB-4810:
BoardConfig-rk3568-rsb4810a2.mk - ROM-5880:
BoardConfig-rk3568-rom5880a1.mk - KEDGE-350:
BoardConfig-rk3568-kedge350a1.mk - EBC-RB07:
BoardConfig-rk3568-ebcrb07a1.mk
8.2 U-boot Targets
- RSB-4810:
rk3568_rsb4810a2 - ROM-5880:
rk3568_rom5880a1 - KEDGE-350:
rk3568_kedge350a1 - EBC-RB07:
rk3568_ebcrb07a1
8.3 Kernel Configuration
Most platforms use rk3568_adv_defconfig, except:
- EBC-RB07: Uses
rk3568_rb07_defconfig
8.4 Device Tree Targets
- RSB-4810:
rk3568-rsb4810-a2.img - ROM-5880:
rk3568-rom5880-a1.img - KEDGE-350:
rk3568-kedge350-a1.img - EBC-RB07:
rk3568-ebcrb07-a1.img
9. Build Workflow Summary
- Step 1:Environment Setup → Docker + Ubuntu 18.04
- Step 2:Source Download → Git repo sync from Advantech Azure DevOps
- Step 3:Project Selection → Choose target processors platform configuration
- Step 4:Component Build → U-boot → Kernel → Recovery → Debian
- Step 5:Image Packaging → mkfirmware.sh → update.img
- Step 6:Deployment → AndroidTool, SD/USB storage, or SDDiskTool
10. System Requirements
- Docker environment with
advrisc/u18.04-rklbv1image - Ubuntu 18.04 base system
- Git and repo tools
- Expect tool for automation
- Build tools and cross-compilation toolchain
- Sufficient disk space for source code and build artifacts
- Internet connection for source code download
- Target processors (RSB-4810, ROM-5880, KEDGE-350, or EBC-RB07)
11. Development Notes
- The RK3568 series supports multiple processors platforms with shared base components
- Each platform requires specific board configuration and U-boot targets
- Most platforms share the same kernel configuration (
rk3568_adv_defconfig) - The EBC-RB07 platform uses a specialized kernel configuration
- All platforms support the same Debian 10.x rootfs
- Update images are compatible only within the same OS (Debian to Debian)