Skip to main content

Android BSP User Guide for RK3588 Series Android13

1. Introduction


This document provides comprehensive instructions for building and deploying Android BSP for RK3588 series platforms running 13.0. The guide covers environment setup, source code acquisition, building processes for multiple processors platforms, and deployment methods.

2. Android BSP Version


  • OS: Android 13.0
  • Kernel: 5.10.157

3. Build Environment on Host


Currently, we adopt Docker as build environment.

You can get the latest version of advrisc/u18.04-rk3399abv10 Docker image for developing Rockchip RK3588 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/u18.04-rk3399abv10

3.2 Run Docker Example

  • Step 1: Run Docker Container
    Assume your working directory is home/bsp/myLinux and the Docker container name is rk3588_android_risc.
    Replace home/bsp/myLinux and rk3588_android_risc with the actual ones based on your environment.
$ export WORKSPACE="home/bsp/myLinux"
$ export CONTAINER_NAME="rk3588_android_risc"
$ sudo docker run -it --name ${CONTAINER_NAME} -v ${WORKSPACE}:/home/adv/BSP:rw --privileged advrisc/u18.04-rk3399abv10 /bin/bash
  • Step 2: Change User in Container
adv@7cc0fa834366:~$ sudo chown adv:adv -R BSP
  • Step 3: Install build dependencies in Container

    • Install live build
    adv@7cc0fa834366:~$ cd ~
    adv@7cc0fa834366:~$ git clone https://salsa.debian.org/live-team/live-build.git --depth 1 -b debian/1%20230131
    adv@7cc0fa834366:~$ cd live-build
    adv@7cc0fa834366:~$ rm -rf manpages/po/
    adv@7cc0fa834366:~$ sudo make install -j8
    adv@7cc0fa834366:~$ cd ~
    adv@7cc0fa834366:~$ rm -rf live-build
    • Install qemu 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 Android Source Code


Please contact PM to get BSP.

If you have BSP tarball (e.g., ASRA501A2EG90AIM38DBV110051_2025-03-04.bsp.tgz), then you have to copy it into container.

Follow the steps below:

1. Exit Container and Return to Local Machine

$ exit

2. Copy BSP Tarball to Workspace and Change Owner

$ export BSP_TARBALL="ASRA501A2EG90AIM38DBV110051_2025-03-04.bsp.tgz"
$ cp ${BSP_TARBALL} ${WORKSPACE}
$ sudo chown adv:adv ${WORKSPACE}/${BSP_TARBALL}

3. Return to Container

$ docker start ${CONTAINER_NAME}
$ docker attach ${CONTAINER_NAME}

4. Unpack BSP Tarball

$ tar zxvf ${BSP_TARBALL}
NOTE
  • BSP tarball is for fast developing uboot and kernel.
  • BSP tarball does NOT support building recovery debian and update.img.

5. Building


5.1 Compile all

  • Build ROM-6881 project
$ source build/envsetup.sh
$ lunch rom6881_t-userdebug
$ ./build.sh -AUCKu

5.2 Build U-boot

5.2.1 Build ROM-6881 U-boot

$ source build/envsetup.sh
$ lunch rom6881_t-userdebug
$ ./build.sh -U

5.3 Build Kernel

5.3.1 Build ROM-6881 Kernel

$ source build/envsetup.sh
$ lunch rom6881_t-userdebug
$ ./build.sh -K

5.4 Build Android

5.4.1 Build ROM-6881 Android

$ source build/envsetup.sh
$ lunch rom6881_t-userdebug
$ ./build.sh -A

All image in rockdev/Image-/

The common image files are listed below:

MiniLoaderAll.bin
baseparameter.img
boot-debug.img
boot.img
config.cfg
dtbo.img
misc.img
parameter.txt
pcba_small_misc.img
pcba_whole_misc.img
recovery.img
resource.img
super.img
uboot.img
update.img
vbmeta.img

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:

  1. The device must be able to boot up to Android system
  2. Only update images from the same OS (e.g., Android upgrade to Android)
  3. Using update.img to upgrade

6.3 Via SD card

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

7. Summary


7.1 Supported Hardware Platforms

  • ROM-6881: ROM-6881 Computer-on-Module

7.2 System Requirements

  • Docker environment with advrisc/u18.04-rk3399abv10 image
  • Ubuntu 22.04 base system
  • BSP tarball from our released BSP
  • Build tools and dependencies
  • Sufficient disk space for source code and build artifacts
  • Internet connection for package installation
  • Target processors (ROM-6881)

7.3 Build Workflow Summary

  1. Environment Setup → Docker + Ubuntu 22.04
  2. Source Acquisition → BSP tarball or Full SDK
  3. Project Selection → Choose target processors platform
  4. Component Build → U-boot → Kernel → (Recovery)* → (Debian)*
  5. Image Generation → Firmware packaging → (Update image)*
  6. 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
  • Requirements: Contact PM for access