3.4. Android on SD Card

This application note contains steps to use SD Card instead of eMMC.

3.4.1. Build U-Boot with this changes

3.4.1.1. Download sources

Follow this link to download bootloader sources.

Apply this patch in U-Boot source code:

diff --git a/configs/am62x_android_a53.config b/configs/am62x_android_a53.config
index fc949f65d7fe..d50952557192 100644
--- a/configs/am62x_android_a53.config
+++ b/configs/am62x_android_a53.config
@@ -5,7 +5,7 @@ CONFIG_USB_FUNCTION_FASTBOOT=y
CONFIG_FASTBOOT_BUF_ADDR=0xC0000000
CONFIG_FASTBOOT_BUF_SIZE=0x2F000000
CONFIG_FASTBOOT_FLASH=y
-CONFIG_FASTBOOT_FLASH_MMC_DEV=0
+CONFIG_FASTBOOT_FLASH_MMC_DEV=1
CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
# Enable Android boot flow
CONFIG_SYS_MALLOC_LEN=0x08000000

3.4.1.2. Build U-Boot

Follow this link to build U-Boot.

Rebuild U-Boot then copy u-boot.img in Android build system environment : vendor/ti/am62x/bootloader/am62-sk

3.4.1.3. Build Android

Follow this link to build Android image. Go in your Android environment then rebuild with TARGET_SDCARD_BOOT=true build args:

cd ${YOUR_PATH}/ti-aosp-14
source build/envsetup.sh
lunch <BUILD_TARGET>
m TARGET_SDCARD_BOOT=true

3.4.1.4. Flashing SD Card

Warning

Minimal size for SD card is 16GB

  • Change the boot mode DIP switches to SD card boot mode:

    Boot mode DIP switch:
    SW1: 11000010 SW2: 01000000
    
  • Go in out directory in android environment and launch this command:

    # If you are using binaries built locally
    cd out/target/product/am62x
    sudo ./flashall.sh --board="am62x-sk" --sdcard="/dev/sdX"
    

flashall.sh script print in your console instruction to do

Note

Replace X in /dev/sdX/ by letter corresponding to your SD card