Skip to main content

Linux BSP User Guide for RK3288 Series Debian10

1. Introduction


This document provides comprehensive instructions for building and deploying Linux BSP for RK3288 series platforms running Debian 10. The guide covers environment setup, source code acquisition, building processes, and deployment methods.

2. Linux BSP Version


  • OS: Debian 10.x
  • Kernel: Linux version 4.4.xxx

3. Build Environment on Host


Currently, we adopt Docker as build environment.

You can get the latest version of advrisc/u16.04-rk3288lbv1 Docker image for developing Rockchip RK3288 projects.

3.1 Docker Installation Commands

$ sudo apt-get update
$ sudo apt-get install -y qemu-user-static
$ sudo apt-get install -y live-build
$ sudo docker pull advrisc/u16.04-rk3288lbv1

3.2 Run Docker Example

  • Step 1: Run Docker Container
    Assume your working directory is home/bsp/myLinux and the Docker container name is rk3288_linux_risc. Replace home/bsp/myLinux and rk3288_linux_risc with the actual ones based on your environment.
$ export WORKSPACE="home/bsp/myLinux"
$ export CONTAINER_NAME="rk3288_linux_risc"
$ sudo docker run -it --name ${CONTAINER_NAME} -v ${WORKSPACE}:/home/adv/BSP:rw --privileged advrisc/u16.04-rk3288lbv1:latest /bin/bash
  • Step 2: Change User in Container
adv@353556f23a6b:~$ sudo chown adv:adv -R BSP
  • Step 3: Install build dependencies in Container
    • Install qemeu and binfmts
      adv@7cc0fa834366:~$ sudo apt-get update
      adv@7cc0fa834366:~$ sudo apt-get install binfmt-support qemu-user-static --reinstall
      adv@7cc0fa834366:~$ sudo update-binfmts --enable qemu-aarch64
    • Install gettext
      adv@7cc0fa834366:~$ sudo apt-get update
      adv@7cc0fa834366:~$ sudo apt-get install gettext -y

4. Getting Linux Source Code


4.1 Full SDK

$ cd ~/code
$ sudo git clone https://github.com/ADVANTECH-Rockchip/repo.git
$ mkdir rk3288_debian
$ cd rk3288_debian
$ git config --global user.name "Your Name"
$ git config --global user.email you@example.com
$ ../repo/repo init -u https://github.com/ADVANTECH-Rockchip/linux-manifest.git -b rk3288_linux_v230_risc -m default.xml
$ ../repo/repo sync
$ ../repo/repo forall -c git checkout -b local --track advantech-github/rk3288_linux_v230_risc
$ sudo dpkg -i rootfs/ubuntu-build-service/packages/*
$ sudo apt-get install -f

5. Building


5.1 Choose Project

  • Build RSB-4680 Project
$ export TOP=`pwd`
$ cd $TOP
$ export UBOOT_PROJECT="rk3288_rsb4680a3_2G"
$ export KERNEL_PROJECT="rk3288-rsb4680-a3.img"

5.2 Build U-boot

$ cd $TOP
$ cd u-boot/
$ ./make.sh ${UBOOT_PROJECT}

5.3 Build Kernel

$ cd $TOP 
$ cd kernel/
$ make ARCH=arm rk3288_adv_defconfig
$ make ARCH=arm ${KERNEL_PROJECT} -j12

5.4 Build Recovery

$ cd $TOP
$ rm buildroot/output/rockchip_rk3288_recovery -rf
$ source envsetup.sh rockchip_rk3288_recovery
$ ./build.sh recovery

NOTE: For recovery.img includes kernel and recovery tools, kernel MUST be built before recovery.

5.5 Build Debian 10.x

$ cd $TOP
$ sudo BUILD_IN_DOCKER=TRUE ./mk-debian.sh

5.6 Push All Images to Rockdev Folder

$ cd $TOP
$ source envsetup.sh rockchip_rk3288_recovery
$ sudo ./mkfirmware.sh

The common image files in rockdev/ directory are listed below:

boot.img
MiniLoaderAll.bin
misc.img
oem.img
parameter.txt
recovery.img
rootfs.img
trust.img
uboot.img
userdata.img

5.7 Make update.img

$ cd $TOP
$ sudo apt-get install bsdmainutils
$ ./build.sh updateimg

You can get update.img in rockdev/ directory.

6. Update.img


There are two ways to update images:

6.1 Using RKDevTool via USB Cable

There is no limitation by this method.

6.2 Via SD card

  1. Only update images from the same OS (e.g., Debian upgrade to Debian)
  2. Using update.img to upgrade

7. Summary


7.1 Supported Hardware Platforms

  • RSB-4680

7.2 System Requirements

  • Docker environment with advrisc/u16.04-rk3288lbv1 image
  • Ubuntu 16.04 base system
  • Git and repo tools
  • Build tools and cross-compilation toolchain
  • Sufficient disk space for source code and build artifacts
  • Internet connection for source code download
  • Target processors (RSB-4680)

7.3 Build Workflow Summary

  1. Environment Setup → Docker + Ubuntu 16.04
  2. Source Download → Git repo sync from Advantech Rockchip repositories
  3. Component Build → U-boot → Kernel → (Recovery)* → (Debian)*
  4. Image Creation → Firmware packaging → (Update image)*
  5. Deployment → AndroidTool, SD/USB storage, or SDDiskTool

Components marked with asterisk () are not supported in BSP tarball mode.

7.4 Development Modes

7.4.1 BSP Tarball Mode (Limited)

  • Use Case: Quick U-boot and kernel development
  • Advantages: Fast setup, smaller download size
  • Limitations: Cannot build recovery, debian, or update images
Important Notes about BSP Tarball

The BSP tarball is designed for fast development of uboot and kernel components. However, it has some limitations.

  • Supported: U-boot building
  • Supported: Kernel building
  • NOT Supported: Recovery building
  • NOT Supported: Debian building
  • NOT Supported: Update image building

7.4.2 Full SDK Mode (Complete)

  • Use Case: Complete system development and customization
  • Advantages: Full build capability, all components supported
  • Limitations: Larger download size