Difference between revisions of "Usee Guide"

From ESS-WIKI
Jump to: navigation, search
(Created page with " == Android BSP Version == Android 12.0 Kernel 4.19.206 == Build Environment on Host == Currently, we adopt [https://www.docker.com/ Docker] as build environment. You can...")
 
(Replaced content with " ==   ==")
 
Line 1: Line 1:
  
== Android BSP Version ==
+
==   ==
 
 
Android 12.0
 
 
 
Kernel 4.19.206
 
 
 
== Build Environment on Host ==
 
 
 
Currently, we adopt [https://www.docker.com/ Docker] as build environment.
 
 
 
You can get the latest version of [https://hub.docker.com/r/advrisc/u18.04-rk3399abv10 advrisc/u18.04-rk3399abv10] Docker image for developing Rockchip RK3399 and rk3568 projects.
 
 
 
Docker command:
 
<pre>docker pull advrisc/u18.04-rk3399abv10:latest;</pre>
 
 
 
== Run Docker example ==
 
 
 
Step1 Run docker container (example)
 
<pre>docker run --privileged -it --name android_S12 -v /home/your-name/myandroid:/home/adv/BSP:rw advrisc/u18.04-rk3399abv10 /bin/bash
 
</pre>
 
 
 
Step2 In container, change the user. (example)
 
 
 
&nbsp;
 
<pre>$ sudo chown adv:adv -R BSP
 
</pre>
 
 
 
== Getting Android Source Code ==
 
<pre>$ cd ~/BSP
 
$ sudo git clone https://github.com/ADVANTECH-Rockchip/repo.git
 
$ mkdir rk3568_android_S12
 
$ cd rk3568_android_S12
 
$ git config --global user.name &amp;quot;Your Name&amp;quot;
 
$ 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://kag-sw.visualstudio.com/RK3568-Android/_git/android-manifest -b rk3568-androidS12 -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_AIV12001.xml------
 
------If you want to get ROM5880 code, please use RK3568_S12_AIV12002.xml------
 
$ ../repo/repo sync -c -f --no-clone-bundle -j`nproc`
 
</pre>
 
 
 
&nbsp;
 
 
 
== Getting Prebuilts &nbsp;(must download) ==
 
 
 
Baidu:[https://pan.baidu.com/s/1AE84XmoURcAIfDxREH3kww prebuilts.tar.gz] Key: 1234&nbsp; &nbsp;&nbsp;DropBox:&nbsp;[https://www.dropbox.com/scl/fi/s7wonszuu9nvwjc18gse3/prebuilts-rk3568-android12-20220126.tar.gz?rlkey=dlue4ybb2g64vi7sfo2970qq8&dl=0 prebuilts.tar.gz]
 
<pre>Exit docker and copy the file to /home/your-name/myandroid
 
$ cp prebuilts.tar.gz /home/your-name/myandroid/rk3568_android_S12/android
 
 
 
In container and Unzip file
 
$ docker attach android_S12
 
$ tar zxvf ~/BSP/rk3568_android_S12/android/prebuilts.tar.gz
 
</pre>
 
 
 
== Compile all ==
 
 
 
Build RSB-4810 project
 
<pre>$ source build/envsetup.sh;lunch rsb4810_s-userdebug;
 
$./build.sh -AUCKu</pre>
 
 
 
Build ROM-5880 project
 
<pre>$ source build/envsetup.sh;lunch rom5880_s-userdebug;
 
$./build.sh -AUCKu</pre>
 
 
 
== Build U-boot ==
 
 
 
=== Build RSB-4810 U-boot ===
 
<pre>$ ./make.sh rk3568_rsb4810a2</pre>
 
 
 
=== Build ROM-5880 U-boot ===
 
<pre>$ ./make.sh rk3568_rom5880a1</pre>
 
 
 
== Build Kernel ==
 
 
 
=== Build RSB-4810 Kernel ===
 
<pre>$ cd kernel-4.19
 
$ make ARCH=arm64 rk3568_adv_defconfig
 
$ make ARCH=arm64 rk3568-rsb4810-a2.img -j12</pre>
 
 
 
=== Build RSB-5880 Kernel ===
 
<pre>$ cd kernel-4.19
 
$ make ARCH=arm64 rk3568_adv_defconfig
 
$ make ARCH=arm64 rk3568-rom5880-a1.img -j12</pre>
 
 
 
== Build Android ==
 
 
 
=== Build RSB-4810 Android ===
 
<pre>$ source build/envsetup.sh;lunch rsb4810_s-userdebug;
 
$ ./build.sh -A
 
</pre>
 
 
 
=== Build RSB-5880 Android ===
 
<pre>$ source build/envsetup.sh;lunch rom5880_s-userdebug;
 
$ ./build.sh -A</pre>
 
 
 
All image in
 
 
 
rockdev/Image-rsb4810_s/
 
 
 
rockdev/Image-rom5880_s/
 
 
 
The common image files are listed below:
 
<pre>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
 
</pre>
 
 
 
== How to&nbsp;update images? ==
 
 
 
There are three ways to update images:
 
 
 
(The corresponding tools are in the '''RKTools/ '''directory of the source code)
 
 
 
=== '''[[1._Using_AndroidToool.|1._Using_AndroidToool.]]''' ===
 
 
 
There is no limitation by this way.
 
 
 
=== '''[[2._Using_storage(such_sd_or_USB_disk)with_update.zip_in_it.|2._Using_storage(such&nbsp;sd_or_USB_disk)with_update.zip_in_it.]]''' ===
 
 
 
There are some&nbsp;limitations:
 
 
 
(1)The device must be able to boot up to Android system.
 
 
 
(2)Only update images from the same os,&nbsp; eg&nbsp;:&nbsp;
 
 
 
&nbsp; &nbsp; &nbsp; &nbsp; Android6.0 upgrade to Android6.0 or&nbsp;Android7.1&nbsp;upgrade to Android7.1.
 
 
 
(3)Using update.zip to upgrade. (see more detail in "Create OTA zip" on how to create update.zip)
 
 
 
=== '''[[3._Using_bootup_sd_disk_made_by_SDDiskTool.|3._Using_bootup_sd_disk&nbsp;made_by&nbsp;SDDiskTool.]]''' ===
 
 
 
(1)Only update images from the same os,&nbsp; eg&nbsp;:&nbsp;
 
 
 
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Android6.0 upgrade to Android6.0 or&nbsp;Android7.1&nbsp;upgrade to Android7.1.
 
 
 
(2)Using update.img to upgrade.
 

Latest revision as of 10:38, 11 August 2023