1.2. Building the SDK

1.2.1. Build PC setup

Please refer to the following pages from Android documentation to setup your environment for Android build:

Getting the repo tool

You will need the repo tool to retrieve repositories. To install it, please refer to this webpage : https://source.android.com/setup/develop#installing-repo

1.2.2. Downloading sources

Create a folder for downloading all sources

$ mkdir ~/10_01_00 && cd $_
$ export YOUR_PATH=$PWD

Fetch the code using repo:

$ mkdir ${YOUR_PATH}/ti-aosp-15 && cd $_
$ repo init -u https://git.ti.com/git/android/manifest.git -b android15-release -m releases/RLS_10_01.xml
$ repo sync

Tip

By default the Android build contains pre-built binaries for both the kernel and the bootloaders. The pre-builts are located in in device/ti/am62x-kernel and vendor/ti/am62x/bootloader folder.

To get the sources, refer to:

1.2.3. Build Instructions

$ cd ${YOUR_PATH}/ti-aosp-15
$ source build/envsetup.sh
$ lunch <BUILD_TARGET>
$ m
[...]
#### build completed successfully (49:14 (mm:ss)) ####

Where <BUILD_TARGET> is listed in the table below :

Android Build type

Build target

AM62PX-SK Tablet userdebug

am62p-ap3a-userdebug

AM62PX-SK Tablet user

am62p-ap3a-user

AM62PX-SK Car userdebug

am62p_car-ap3a-userdebug

AM62PX-SK Car user

am62p_car-ap3a-user

The recommended <BUILD_TARGET> to use is am62p-ap3a-userdebug.

It’s possible to customize the standard build (m), by passing build flags. For example, the following enables AVB on userdebug builds:

$ TARGET_AVB_ENABLE=true m

The following build flags are available. Default values are highlighted.

Flag

Possible values

Description

TARGET_AVB_ENABLE

false/true

Forces AVB feature on userdebug

TARGET_ADB_USER_ENABLE

false/true

Forces enable ADB on user builds (NOT for production builds)

TARGET_SDCARD_BOOT

false/true

Boot from SD card instead of eMMC

After building is complete, the necessary images will be available in $YOUR_PATH/ti-aosp-15/out/target/product/am62*/.

To proceed to flash Android, see Flashing Instruction.

Tip

As stated previously, Android build contains pre-built binaries for both the kernel and the bootloaders. These are ready to be used as-is with the EVM boards. For customization, it’s possible to rebuild them.