|
|

|
|
|
|
|
|
|
|
|
# TASTITALIA BSP ANDROID
|
|
|
|
|
|
## Getting Started
|
|
|
|
|
|
This repository contains a manifest file to clone all the open-source repository needed for Android.
|
|
|
|
|
|
In order to complete the build environment with the proprietary repositories, repo will also download a proprietary tar.gz file protected by a passphrase.
|
|
|
|
|
|
Please contact Tastitalia to obtain the passphrase.
|
|
|
|
|
|
Follow the steps below to download and build the Android 12 release.
|
|
|
|
|
|
## Download and Build Tastitalia Android 12 Release
|
|
|
|
|
|
### Setting up your PC
|
|
|
|
|
|
To build Tastitalia Android 12, use a computer running Linux OS.
|
|
|
|
|
|
We used Ubuntu 20.04 to build Android, other distributions may work but have not been tested.
|
|
|
|
|
|
Check whether all the necessary packages are installed for an Android build.
|
|
|
See “Establishing a Build Environment” on the [Android website](https://source.android.com/setup/build/initializing).
|
|
|
In addition to the packages requested on the Android website, the following packages are also needed:
|
|
|
```bash
|
|
|
$: sudo apt-get install uuid uuid-dev zlib1g-dev liblz-dev liblzo2-2 liblzo2-dev lzop \
|
|
|
git curl u-boot-tools mtd-utils \
|
|
|
android-sdk-libsparse-utils android-sdk-ext4-utils \
|
|
|
device-tree-compiler gdisk m4 zlib1g-dev \
|
|
|
bison flex make libssl-dev gcc-multilib
|
|
|
```
|
|
|
|
|
|
To access the BSP, you need to have the repo utility installed, and gpg to decrypt the tar.gz proprietary file.
|
|
|
|
|
|
Install the repo utility:
|
|
|
|
|
|
```bash
|
|
|
$: mkdir ~/bin
|
|
|
$: curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
|
|
|
$: export PATH=${PATH}:~/bin
|
|
|
```
|
|
|
|
|
|
Install gpg:
|
|
|
|
|
|
```bash
|
|
|
$: sudo apt install -y gnupg
|
|
|
```
|
|
|
|
|
|
### Download and prepare Tastitalia Android 12
|
|
|
|
|
|
Follow these steps to download and prepare your environment with all the Android 12 source files:
|
|
|
|
|
|
```bash
|
|
|
$: mkdir android_build
|
|
|
$: cd android_build
|
|
|
$: repo init -u https://gitlab.tastitalia.local/tastitalia-mpu-arm/android/tastitalia-bsp-android.git -b imx-android-12 -m tastitalia-imx-android-12.0.0_1.0.0.xml
|
|
|
$: repo sync -j32
|
|
|
#### Choose -j variable according to the number of cores in your PC
|
|
|
#### Take a coffee
|
|
|
```
|
|
|
|
|
|
Now, follow these steps to extract and prepare the proprietary source code.
|
|
|
|
|
|
To decrypt tar.gz file using GUI passphrase prompt:
|
|
|
|
|
|
```bash
|
|
|
$: gpg --output tastitalia-imx-android-12.0.0_1.0.0.tar.gz --decrypt tastitalia-imx-android-12.0.0_1.0.0.tar.gz.gpg
|
|
|
```
|
|
|
Alternatively, if you want to insert passphrase directly in bash:
|
|
|
|
|
|
```bash
|
|
|
$: gpg --batch --passphrase 'PASSHPRASE' --output tastitalia-imx-android-12.0.0_1.0.0.tar.gz --decrypt tastitalia-imx-android-12.0.0_1.0.0.tar.gz.gpg
|
|
|
#### Change PASSHPRASE with the real passphrase shared with you by Tastitalia
|
|
|
```
|
|
|
To extract tar.gz and finish setting up source code:
|
|
|
|
|
|
```bash
|
|
|
$: tar xzf tastitalia-imx-android-12.0.0_1.0.0.tar.gz
|
|
|
$: source tastitalia-imx-android-12.0.0_1.0.0/tastitalia-imx_android_setup.sh
|
|
|
```
|
|
|
|
|
|
After these steps, all Android 12 source codes are downloaded and ready to be built.
|
|
|
|
|
|
### Set up and build Android 12
|
|
|
|
|
|
To set up your build environment, Tastitalia prepared a script file for every board.
|
|
|
|
|
|
Find the appropriate setup file following our [Naming Convention](#tastitalia-naming-convention).
|
|
|
* Example: **setup_tasd8mp_2g_7.sh**.
|
|
|
|
|
|
This script is needed to export arm64 cross compile GCC, set up android environment and prepare it for a userdebug build mode.
|
|
|
Feel free to change userdebug mode to any other mode, according to Android documentation:
|
|
|
|
|
|
| Build Mode | Description |
|
|
|
|-------------|-------------------------------------------------------------------------------------------------------------------------|
|
|
|
| userdebug | This build mode is suitable for developers and testers. It includes debugging capabilities and additional logging. |
|
|
|
| user | This build mode is optimized for regular users. It excludes debugging features and reduces logging for better performance. |
|
|
|
| eng | This build mode, short for "engineering," includes advanced debugging and profiling tools. It is primarily for developers and platform engineers. |
|
|
|
|
|
|
After that, you will be able to lunch the Android 12 build script:
|
|
|
|
|
|
Example:
|
|
|
```bash
|
|
|
$: source setup_tasd8mm_2g_7.sh
|
|
|
$: ./imx-make.sh -j32 2>&1 | tee build-log.txt
|
|
|
#### Choose -j variable according to the number of cores in your PC
|
|
|
#### Take a very long coffee
|
|
|
```
|
|
|
After following these steps, Android will be built, and a **build-log.txt** file containing all the build information will be created.
|
|
|
|
|
|
Please refer to the next section for instructions on flashing the output files to your board.
|
|
|
|
|
|
### Download and flash Android image
|
|
|
|
|
|
## Tastitalia Naming Convention
|
|
|
|
|
|
We follow a specific naming convention for our board names. The board names are in the format **tasXYYY_Zg_W**, where:
|
|
|
|
|
|
- "**X**" indicates the format of the System-on-Module (SOM):
|
|
|
- "d" represents SODIMM format
|
|
|
- "c" represents SMARC format.
|
|
|
- "**YYY**" indicates the processor type, such as "8mp" for NXP i.MX8M Plus processor
|
|
|
- "**Z**" indicates the amount of DDR RAM in GB.
|
|
|
- "**W**" indicates the display size in inches.
|
|
|
|
|
|
For example, a board name **tasd8mm_2g_7** would represent a board with a SODIMM format, an i.MX8M Mini processor, 2GB of DDR RAM, and a 7-inch display. |