Skip to content
Snippets Groups Projects
Commit 84cceb91 authored by Guillaume LA ROQUE's avatar Guillaume LA ROQUE Committed by Mattijs Korpershoek
Browse files

board: ti: am62x_evm: Add android bootflow


TODO: add build documentation to board doc

Add android boot flow support for AM62X board based on misc partition
to detect reboot reason and boot.img version 4 from android build
system.

Also add device tree overlay support for Android to enable CSI camera,
LVDS screen, HDMI Audio output.

This assumes that the `adtb_idx` env variable is a space-separated
list of indices.

Example:

Signed-off-by: default avatarGuillaume La Roque <glaroque@baylibre.com>
Co-developed-by: default avatarMattijs Korpershoek <mkorpershoek@baylibre.com>
Signed-off-by: default avatarMattijs Korpershoek <mkorpershoek@baylibre.com>
parent a7a2fd0d
No related branches found
No related tags found
No related merge requests found
......@@ -19,3 +19,10 @@ splashfile=ti_logo_414x97_32bpp.bmp.gz
splashimage=0x80200000
splashpos=m,m
splashsource=sf
#if CONFIG_BOOTMETH_ANDROID
#include <env/ti/android.env>
force_avb=0 # FIXME: unused for now
adtb_idx=0
adtbo_idx=2 # FIXME: should be removed from here
#endif
# Defconfig fragment for enabling Android boot flow
# to apply on top of am62x_evm_a53_defconfig or am62x_lpsk_a53_defconfig
# Enable fastboot
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_CMD_GPT=y # Needed for FASTBOOT_CMD_OEM_FORMAT
CONFIG_RANDOM_UUID=y # Needed for FASTBOOT_CMD_OEM_FORMAT
CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
# Enable Android boot flow
CONFIG_BOOTMETH_ANDROID=y
CONFIG_SYS_BOOTM_LEN=0x4000000
CONFIG_SYS_MALLOC_LEN=0x08000000
CONFIG_AVB_VERIFY=y
CONFIG_LIBAVB=y
CONFIG_CMD_ADTIMG=y
CONFIG_CMD_ABOOTIMG=y
CONFIG_CMD_AB_SELECT=y
CONFIG_CMD_AVB=y
# Store env in eMMC for dtbo overlays
CONFIG_DEFAULT_ENV_IS_RW=y
CONFIG_ENV_SIZE=0x20000
CONFIG_ENV_OFFSET=0x100000
CONFIG_ENV_IS_IN_MMC=y
CONFIG_ENV_IS_NOWHERE=n
CONFIG_SYS_MMC_ENV_PART=1
CONFIG_SPL_ENV_IS_NOWHERE=y
# Disable splashscreen
CONFIG_SPL_VIDEO=n
CONFIG_VIDEO=n
CONFIG_SPL_BMP=n
CONFIG_BMP=n
/* Android partitions
* += is needed because \n is converted by space in .env files */
partitions=name=bootloader,start=5M,size=8M,uuid=${uuid_gpt_bootloader};
partitions+=name=tiboot3,start=4M,size=1M,uuid=${uuid_gpt_tiboot3};
partitions+=name=misc,start=13824K,size=512K,uuid=${uuid_gpt_misc};
partitions+=name=frp,size=512K,uuid=${uuid_gpt_frp};
partitions+=name=boot_a,size=40M,uuid=${uuid_gpt_boot_a};
partitions+=name=boot_b,size=40M,uuid=${uuid_gpt_boot_b};
partitions+=name=vendor_boot_a,size=32M,uuid=${uuid_gpt_vendor_boot_a};
partitions+=name=vendor_boot_b,size=32M,uuid=${uuid_gpt_vendor_boot_b};
partitions+=name=init_boot_a,size=8M,uuid=${uuid_gpt_init_boot_a};
partitions+=name=init_boot_b,size=8M,uuid=${uuid_gpt_init_boot_b};
partitions+=name=dtbo_a,size=8M,uuid=${uuid_gpt_dtbo_a};
partitions+=name=dtbo_b,size=8M,uuid=${uuid_gpt_dtbo_b};
partitions+=name=vbmeta_a,size=64K,uuid=${uuid_gpt_vbmeta_a};
partitions+=name=vbmeta_b,size=64K,uuid=${uuid_gpt_vbmeta_b};
partitions+=name=vbmeta_vendor_dlkm_a,size=64K,uuid=${uuid_gpt_vbmeta_vendor_dlkm_a};
partitions+=name=vbmeta_vendor_dlkm_b,size=64K,uuid=${uuid_gpt_vbmeta_vendor_dlkm_b};
partitions+=name=super,size=4608M,uuid=${uuid_gpt_super};
partitions+=name=metadata,size=64M,uuid=${uuid_gpt_metadata};
partitions+=name=persist,size=32M,uuid=${uuid_gpt_persist};
partitions+=name=userdata,size=-,uuid=${uuid_gpt_userdata}
fastboot_raw_partition_bootenv=0x800 0x400 mmcpart 1
fastboot.partition-type:metadata=f2fs
boot_targets=mmc0
mmcdev=0
bootmeths=android
vendor_boot_comp_addr_r=0xe0000000
bootcmd=bootflow scan -lb
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment