Android BSP User Guide for ROM-5880 series 12

From ESS-WIKI
Jump to: navigation, search

Android BSP Version

Android 12.0

Kernel 4.19.206

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 RK3399 and rk3568 projects.

Docker command:

docker pull advrisc/u18.04-rk3399abv10:latest;

Run Docker example

Step1 Run docker container (example)

docker run --privileged -it --name android_S12 -v /home/your-name/myandroid:/home/adv/BSP:rw advrisc/u18.04-rk3399abv10 /bin/bash

Step2 In container, change the user. (example)

$ sudo chown adv:adv -R BSP

Getting Android Source Code

$ cd ~/BSP
$ sudo git clone https://github.com/ADVANTECH-Rockchip/repo.git
$ mkdir rk3568_android_S12-rkr13
$ cd rk3568_android_S12-rkr13
$ git config --global user.name "Your Name"
$ git config --global user.email you@example.com
$ git config --global http.postBuffer 52428800000
$ git config --global http.maxRequestBuffer 100M
$ git config --global core.compression 0
$ ../repo/repo init -u https://dev.azure.com/AIM-Linux/RISC-RK3568-Android/_git/android-manifest -b rk3568-androidS12-rkr13 -m default.xml
------If you want to get the latest code, please use default.xml------
------If you want to get RSB4810 code, please use RK3568_S12_AIV12012.xml------
------If you want to get ROM5880 code, please use RK3568_S12_AIV12013.xml------
$ ../repo/repo sync -c -f --no-clone-bundle -j`nproc`

Getting Prebuilts  (must download)

Baidu:prebuilts Key: 1234    DropBox:prebuilts.tar.gz

Exit docker and copy the file to /home/your-name/myandroid
$ cp prebuilts.tar.gz /home/your-name/myandroid/rk3568_android_S12-rkr13/android

In container and Unzip file
$ docker attach android_S12
$ tar zxvf ~/BSP/rk3568_android_S12-rkr13/android/prebuilts.tar.gz

Compile all

Build ROM-5880 project

$ source build/envsetup.sh
$ lunch rom5880_s-userdebug;
$./build.sh -AUCKu

Build U-boot

Build ROM-5880 U-boot

$ ./make.sh rk3568_rom5880a1

Build Kernel

Build RSB-5880 Kernel

$ cd kernel-4.19
$ make ARCH=arm64 rk3568_adv_defconfig
$ make ARCH=arm64 rk3568-rom5880-a1.img -j12

Build Android

Build RSB-5880 Android

$ source build/envsetup.sh
$ lunch rom5880_s-userdebug;
$ ./build.sh -A

All image in

rockdev/Image-rsb4810_s/

rockdev/Image-rom5880_s/

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