Compile & Flash Android12.0 Firmware for POC's RK3588 SSOM
Prepare environment
It is for both PX30 and RK3588 Compiling Android requires high machine configuration:
- 64-bit CPU
- 16GB physical memory + swap memory
- 250GB of free disk space
The official recommendation is the Ubuntu 18.04 operating system.
The initialization of the compilation environment can refer to http://source.android.com/source/initializing.html
Ubuntu 16.04 and 18.04 package installation reference:
$ sudo apt-get update $ sudo apt-get install git gnupg flex bison gperf libsdl1.2-dev libesd-java \ squashfs-tools build-essential zip unzip curl libncurses5-dev zlib1g-dev \ pngcrush schedtool libgl1-mesa-dev libxml2 libxml2-utils xsltproc lzop \ libc6-dev schedtool g++-multilib lib32z1-dev lib32ncurses5-dev lib32readline-dev \ gcc-multilib libswitch-perl libssl-dev device-tree-compiler liblz4-tool python-pyelftools \ python3-pyelftools x11proto-core-dev libx11-dev fontconfig -y
Install repo for source code sync.
$ mkdir -p ~/.bin
$ PATH="${HOME}/.bin:${PATH}"
$ curl https://storage.googleapis.com/git-repo-downloads/repo > ~/.bin/repo
$ chmod a+rx ~/.bin/repo
☛ Note:
Open file “~/.bin/repo” with any editor on Ubuntu.
Check to see if the first line of the repo file looks like “#!/usr/bin/env python3”. If not, please modify it
Download and Decompress source code
Android12.0 SDK source code for RK3588 is provided by POC, packaged as follows
Downloaded from the link https://49.gigafile.nu/0718-10007afffdfe5db3c7b96a520f423bfe
File named: gigafile-0718-10007afffdfe5db3c7b96a520f423bfe.zip
$ mkdir -p <Your_project> $ cd <Your_project> $ unzip <Where_the_file_is_stored>/gigafile-0718-10007afffdfe5db3c7b96a520f423bfe.zip $ cat rk3588_a12-20240319.tar.bz2-016.aa rk3588_a12-20240319.tar.bz2-011.ab rk3588_a12-20240319.tar.bz2-007.ac rk3588_a12-20240319.tar.bz2-003.ad rk3588_a12-20240319.tar.bz2-014.ae rk3588_a12-20240319.tar.bz2-008.af rk3588_a12-20240319.tar.bz2-009.ag rk3588_a12-20240319.tar.bz2-013.ah rk3588_a12-20240319.tar.bz2-010.ai rk3588_a12-20240319.tar.bz2-015.aj rk3588_a12-20240319.tar.bz2-002.ak rk3588_a12-20240319.tar.bz2-006.al rk3588_a12-20240319.tar.bz2-004.am rk3588_a12-20240319.tar.bz2-005.an rk3588_a12-20240319.tar.bz2-012.ao rk3588_a12-20240319.tar.bz2-001.ap rk3588_a12-20240319.tar.bz2-017.aq | tar xjv
Replace the source code to make Android12.0 work on POC's RK3588
Step 1: Copy the file “RK3588_Android12_Fixed.zip” to Ubuntu
Step 2: Extract it
Step 3: Copy and replace everything in the folder “RK3588_Android12_Fixed” to <Your_project>/t923
Compile source code
1. If you want to compile them all, do the following
$ cd <Your_project>/t923 $ source build/envsetup.sh $ lunch rk3588_s-userdebug $ ./build.sh -AUCKu
2. If compiling each one, do the following KERNEL
$ cd <Your_project>/t923/kernel $ make ARCH=arm64 rockchip_defconfig android-11.config $ make ARCH=arm64 BOOT_IMG=../rockdev/Image- rk3588_s/boot.img rk3588-chinchilla-carrier.img -j24
U-BOOT
$ cd <Your_project>/t923/u-boot $ ./make.sh rk3588
ANDROID
$ cd <Your_project>/t923 $ source build/envsetup.sh $ lunch rk3588_s-userdebug $ ./build.sh -Au
3. After successful compilation it has the following structure
