Android BSP User Guide for rk3568 series 12
Contents
- 1 Android BSP Version
- 2 Build Environment on Host
- 3 Run Docker example
- 4 Getting Android Source Code
- 5 Build Instructions
- 6 Compile all
- 7 Build U-boot
- 8 Build Kernel
- 9 Build Android
- 10 How to update images?
- 10.1 <a href="1.%20Using%20AndroidToool.">1._Using_AndroidToool.</a>
- 10.2 <a href="2.%20Using%20storage%EF%BC%88such%20sd%20or%20USB%20disk%EF%BC%89with%20update.zip%20in%20it.">2._Using_storage(such sd_or_USB_disk)with_update.zip_in_it.</a>
- 10.3 <a href="3.%20Using%20bootup%20sd%20disk%20made%20by%20SDDiskTool.">3._Using_bootup_sd_disk made_by SDDiskTool.</a>
Android BSP Version
Android 12.0
Kernel 4.19.206
Build Environment on Host
Currently, we adopt <a href="https://www.docker.com/" alt="https://www.docker.com/" title="https://www.docker.com/">Docker</a> as build environment.
You can get the latest version of <a href="https://hub.docker.com/r/advrisc/u18.04-rk3399abv10" alt="https://hub.docker.com/r/advrisc/u18.04-rk3399abv10" title="https://hub.docker.com/r/advrisc/u18.04-rk3399abv10">advrisc/u18.04-rk3399abv10</a> 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/rockchip-linux/repo.git $ mkdir rk3568_android_S12 $ cd rk3568_android_S12 $ git config --global user.name "Your Name" $ git config --global user.email you@example.com $ ../repo/repo init -u https://dev.azure.com/AIM-Linux/RISC-RK3568-Android/_git/android-manifest -b rk3568-androidS12 -m RK3568_S12_AIV0001.xml $ ../repo/repo sync $ ../repo/repo forall -c git checkout -b local --track advantech-azure/rk3568-androidS12
Build Instructions
$ export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64 $ export PATH=$JAVA_HOME/bin:$PATH $ export CLASSPATH=.:$JAVA_HOME/lib:$JAVA_HOME/lib/tools.jar
Compile all
Build RSB-4810 project
$ source build/envsetup.sh;lunch rsb4810_s-userdebug; $./build.sh -AUCKu
Build U-boot
Build RSB-4810 U-boot
$ ./make.sh rk3568_rsb4810a2
Build Kernel
Build RSB-4810 platform
$ cd kernel-4.19 $ make ARCH=arm64 rk3568_adv_defconfig $ make ARCH=arm64 rk3568-rsb4810-a2.img -j12
Build Android
Build RSB-4810 platform
$ source build/envsetup.sh;lunch rsb4810_s-userdebug; $ ./build.sh -A
All image in
rockdev/Image-rsb4810_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
How to update images?
There are three ways to update images:
<a href="1.%20Using%20AndroidToool.">1._Using_AndroidToool.</a>
There is no limitation by this way.
<a href="2.%20Using%20storage%EF%BC%88such%20sd%20or%20USB%20disk%EF%BC%89with%20update.zip%20in%20it.">2._Using_storage(such sd_or_USB_disk)with_update.zip_in_it.</a>
There are some limitations:
(1)The device must be able to boot up to Android system.
(2)Only update images from the same os, eg :
Android6.0 upgrade to Android6.0 or Android7.1 upgrade to Android7.1.
(3)Using update.zip to upgrade. (see more detail in "Create OTA zip" on how to create update.zip)
<a href="3.%20Using%20bootup%20sd%20disk%20made%20by%20SDDiskTool.">3._Using_bootup_sd_disk made_by SDDiskTool.</a>
(1)Only update images from the same os, eg :
Android6.0 upgrade to Android6.0 or Android7.1 upgrade to Android7.1.
(2)Using update.img to upgrade.