SPRADD1A August   2023  – September 2024 AM620-Q1 , AM623 , AM625 , AM625-Q1 , AM625SIP , AM62A3 , AM62A3-Q1 , AM62A7 , AM62A7-Q1 , AM62P , AM62P-Q1

 

  1.   1
  2.   Abstract
  3.   Trademarks
  4. Introduction
  5. Installing the SDK
  6. Configuring the SDK for a Custom Board
  7. Starting U-Boot Board Port
    1. 4.1 Introduction to Devicetrees
    2. 4.2 Capabilities of the Minimal Configuration
    3. 4.3 Preparing Custom Board Files
    4. 4.4 Initial Devicetree Modifications
    5. 4.5 Building U-Boot Binaries
    6. 4.6 U-Boot Deployment Instructions
  8. Expanding the Custom Board Devicetree
    1. 5.1 Devicetree Configuration
    2. 5.2 Describing Peripherals in Nodes
    3. 5.3 Revising the Devicetree Configuration
  9. Booting the Linux Kernel
    1. 6.1 Kernel Boot Overview
    2. 6.2 Kernel Deployment Instructions
  10. Tools and Debugging
    1. 7.1 Kernel Debug Traces
    2. 7.2 OpenOCD Debugging
  11. Future Work
  12. Summary
  13. 10References
  14.   Revision History

Configuring the SDK for a Custom Board

This section serves as a step-by-step guide on replicating the TI U-Boot baseline for a custom board. While these steps are not absolutely necessary in order to begin development, it is good practice for every board to use its own board-specific files to prevent any conflicts or board specific configuration issues. Creating new board-specific files also preserves the files provided with the SDK for TI EVMs that can be used as references.

These instructions refer to the custom board's name as <boardname> and the name of the organization as <company>. The organization name is used for naming directories to help keep the files for one's boards together.

  1. Copy and paste the existing EVM A53 and R5 Kconfig targets in TI_U_BOOT/arch/arm/mach-k3/am62x/Kconfig and rename the symbols for the custom board. Optionally, modify the corresponding board specific string. An example is below.
    + config TARGET_AM625_A53_<BOARDNAME>
    +	bool "<COMPANY> K3 based AM625 <BOARDNAME> running on A53"
    +	select ARM64
    +	select BINMAN
    +	select OF_SYSTEM_SETUP
    
    + config TARGET_AM625_R5_<BOARDNAME>
    +	bool "<COMPANY> K3 based AM625 <BOARDNAME> running on R5"
    +	select CPU_V7R
    +	select SYS_THUMB_BUILD
    +	select K3_LOAD_SYSFW
    +	select RAM
    +	select SPL_RAM
    +	select K3_DDRSS
    +	select BINMAN
    +	imply SYS_K3_SPL_ATF

    Add the following line to the bottom of the same Kconfig file.

    + source "board/<company>/<boardname>/am62x/Kconfig
  2. Make new <company> and <boardname> directories to store files that will be copied and modified.
    $ mkdir -p TI_U_BOOT/board/<company>/<boardname>/
    $ mkdir -p TI_U_BOOT/board/<company>/common/
  3. Copy and rename board files from the TI directory to the new directories.
    $ cp TI_U_BOOT/board/ti/am62x/* TI_U_BOOT/board/<company>/<boardname>/
    $ cp TI_U_BOOT/board/ti/common/* TI_U_BOOT/board/<company>/common/
  4. In the TI_U_BOOT/board/<company>/<boardname> directory, edit the Kconfig by modifying the default value of the configuration options as seen below.
    if TARGET_AM625_A53_<BOARDNAME>
    config SYS_BOARD
           default "<boardname>"
    config SYS_VENDOR
           default "<company>"
    config SYS_CONFIG_NAME
           default "<boardname>_evm"
    source "board/<company>/common/Kconfig"
    endif
    
    if TARGET_AM625_R5_<BOARDNAME>
    config SYS_BOARD
           default "<boardname>"
    config SYS_VENDOR
           default "<company>"
    config SYS_CONFIG_NAME
           default "<boardname>_evm"
    config SPL_LDSCRIPT
    	default "arch/arm/mach-omap2/u-boot-spl.lds"
    source "board/<company>/common/Kconfig"
    endif
  5. In the same directory, rename the file evm.c to <boardname>.c and the file am62x.env to <boardname>.env.
    $ mv TI_U_BOOT/board/<company>/<boardname>/evm.c TI_U_BOOT/board/<company>/<boardname>/<boardname>.c
    $ mv TI_U_BOOT/board/<company>/<boardname>/am62x.env TI_U_BOOT/board/<company>/<boardname>/<boardname>.env
  6. In the same directory, edit the Makefile as seen below.
    - obj-y	+= evm.o
    + obj-y	+= <boardname>.o
  7. Copy the EVM board header file and rename the file for the custom board.
    $ cp TI_U_BOOT/include/configs/am62x_evm.h TI_U_BOOT/include/configs/am62x_<boardname>.h

    Make the following modification inside the newly created header file.

    - #ifndef __CONFIG_AM625_EVM_H
    - #define __CONFIG_AM625_EVM_H
    + #ifndef __CONFIG_AM625_<BOARDNAME>_H
    + #define __CONFIG_AM625_<BOARDNAME>_H
  8. Create the following configuration fragments in TI_U_BOOT/configs/ and add the lines below to set the Kconfig targets.

    am62x_<boardname>_r5.config

    CONFIG_TARGET_AM625_R5_<BOARDNAME>=y
    # CONFIG_TARGET_AM625_R5_EVM is not set
    am62x_<boardname>_a53.config
    CONFIG_TARGET_AM625_A53_<BOARDNAME>=y
    # CONFIG_TARGET_AM625_A53_EVM is not set

You have now replicated TI's U-Boot baseline for the custom board.