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_00_00 && cd $_
$ export YOUR_PATH=$PWD

Fetch the code using repo:

$ mkdir ${YOUR_PATH}/ti-aosp-14 && cd $_
$ repo init -u https://git.ti.com/git/android/manifest.git -b android14-release -m releases/RLS_10_00.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-14
$ 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

AM62X-SK Tablet userdebug

am62x-userdebug

AM62X-SK Tablet user

am62x-user

AM62X-SK Car userdebug

am62x_car-userdebug

AM62X-SK Car user

am62x_car-user

The recommended <BUILD_TARGET> to use is am62x-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

TARGET_KERNEL_USE

6.1/6.6

Pick kernel version. 6.6 is experimental

TARGET_BOOTLOADER_VERSION

unset/2024.04

Pick U-Boot version (default: 2023.04). 2024.04 is experimental

After building is complete, the necessary images will be available in $YOUR_PATH/ti-aosp-14/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.

The android images generated for the AM62X-SK EVM are compatible with the Beagle Play board. For flashing the Beagle Play, see the dedicated application note.