Prerequisites
You already have an Ubuntu22.04 host environment, and all subsequent operations will be performed on this host. Refer to VMware Ubuntu22.04 Setup 🚀 chapter for setup.
Special Note: We have two ways to obtain the SDK source code.
- (Recommended) Synchronize source code from Remote Repository using the
repotool for management. Subsequent compilation and development will be done locally. - (Backup) Download the source code archive from Download Center 🚀, extract and use directly. Subsequent compilation and development will be done locally.
Method 1 (Recommended): Synchronize Source Code from Remote Repository
Install dependencies:
sudo apt update && sudo apt install -y sudo curl sshConfigure sudo passwordless login:
sudo sed -i -e '/\%sudo/ c \%sudo ALL=(ALL) NOPASSWD: ALL' /etc/sudoers && \
sudo usermod -a -G sudo $USER2
Choose a directory as the SDK storage location, enter this directory, and run the following command:
curl -fsSL https://raw.githubusercontent.com/jlckfb/TaishanPi-manifests/main/install.sh | bash -s -- -b android14/tspi-3-260416This command will automatically install related tools and set environment variables. During the process, you will be asked whether to synchronize the source code. Select y to synchronize:
After completion, you will find a TaishanPi-3-Linux/ folder in the current directory. This folder is the SDK source code.
Method 2 (Backup): Download SDK Archive
Download the Archive
You can download the corresponding Android SDK from the Download Center 🚀 network drive, similar to this:
This date is just an example. The downloaded version may be newer.
It is recommended to use the Samba tool. Refer to Samba Setup 🚀 chapter for setup. Download the archive directly to the mapped network drive.
Verify File MD5 Checksum
Since the SDK archive is large, we split a complete SDK into multiple split archives (aa, ab, ac...). If any split archive is corrupted during download or transfer, the extraction will fail.
Therefore, we need to verify with md5. To check if the archive is corrupted, use the following command:
md5sum -c file_*_md5sum.txtIf all files show OK, the files are complete and can be safely extracted. If any file verification fails, you need to re-download the corresponding archive.
Extract SDK
After verification, ensure all archives show OK. Then we can proceed with extraction:
cat $(ls -1 TaishanPi_3_rk3576_*_sdk_*.tar.gz?? | sort) | pigz -d | sudo tar -xvpf -After extraction:
You can see that a TaishanPi-3-Android14/ folder has appeared.
Synchronize SDK Source Code
Enter the TaishanPi-3-Android14/ directory:
cd TaishanPi-3-Android14/All source code is recorded in the .repo folder. Each git project is managed through repo.
For your convenience, we have prepared a tspi-sdk-init.sh script that can quickly configure the host environment and synchronize the source code. Run this script:
This script will automatically install all tools and dependencies required for compiling the Android14 SDK. After running this tool without errors, you can directly start compilation.
sudo ./tspi-sdk-init.shWhen prompted whether to synchronize, just press the y key on the keyboard:
Wait for synchronization to complete:
You can then see the related source code in the TaishanPi-3-Android14/ directory: