Linux BSP User Guide for RK3568 Series Debian10
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 hardware platforms, and deployment methods.
Linux BSP Version
- OS: Debian 10.x
- Kernel: 4.19.219
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.
Docker Installation Command
sudo docker pull advrisc/u18.04-rklbv1
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
Install Some Tools
$ sudo apt-get install expect
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
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
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
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
Build Recovery
$ cd $TOP
$ rm buildroot/output/rockchip_rk356x_recovery -rf
$ source envsetup.sh rockchip_rk356x_recovery
$ ./build.sh recovery
Build Debian 10.x
$ cd $TOP
$ source envsetup.sh rockchip_rk3568
$ sudo BUILD_IN_DOCKER=TRUE ./mk-debian.sh
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
Make update.img
$ cd $TOP
$ source envsetup.sh rockchip_rk3568
$ ./build.sh updateimg
You can get update.img in rockdev/ directory.
How to Update Images
There are three ways to update images:
1. Using AndroidTool
There is no limitation by this method.
2. Using Storage (such as SD or USB disk) with update.zip
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
3. Using Bootup SD Disk Made by SDDiskTool
- Only update images from the same OS (e.g., Debian upgrade to Debian)
- Using
update.imgto upgrade
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
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 |
Build Configuration Summary
Project Selection
Each hardware 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
U-boot Targets
- RSB-4810:
rk3568_rsb4810a2 - ROM-5880:
rk3568_rom5880a1 - KEDGE-350:
rk3568_kedge350a1 - EBC-RB07:
rk3568_ebcrb07a1
Kernel Configuration
Most platforms use rk3568_adv_defconfig, except:
- EBC-RB07: Uses
rk3568_rb07_defconfig
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
Build Workflow Summary
- Environment Setup → Docker + Ubuntu 18.04
- Source Download → Git repo sync from Advantech Azure DevOps
- Project Selection → Choose target hardware platform configuration
- Component Build → U-boot → Kernel → Recovery → Debian
- Image Packaging → mkfirmware.sh → update.img
- Deployment → AndroidTool, SD/USB storage, or SDDiskTool
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 hardware (RSB-4810, ROM-5880, KEDGE-350, or EBC-RB07)
Development Notes
- The RK3568 series supports multiple hardware 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)
This document was last modified on 8 August 2024, at 02:56.