SPRADD1B August   2023  – September 2026 AM620-Q1 , AM623 , AM625 , AM625-Q1 , AM625SIP , AM62A1-Q1 , AM62A3 , AM62A3-Q1 , AM62A7 , AM62A7-Q1 , AM62P , AM62P-Q1

 

  1.   1
  2.   Abstract
  3.   Trademarks
  4. 1 Introduction
  5. 2 Installing the SDK
  6. 3 U-Boot Build-System Integration
  7. 4 Minimal Device Tree and Reaching the U-Boot Prompt
    1. 4.1 Introduction to Device Trees
    2. 4.2 Minimal Platform Support
    3. 4.3 Adding Custom Board Devicetrees
    4. 4.4 Initial Device Tree Modifications
    5. 4.5 Building U-Boot
    6. 4.6 Reaching the U-Boot Prompt
  8. 5 Expanding the Device Tree
    1. 5.1 Adding New Device Tree Nodes
    2. 5.2 Revising Device Tree Nodes
    3. 5.3 Device Tree Development Tips
  9. 6 Booting the Linux Kernel
    1. 6.1 Boot Method Overview
    2. 6.2 Reaching the Linux Command Prompt
  10. 7 Tools and Debugging
    1. 7.1 Debug Traces
    2. 7.2 OpenOCD
  11. 8 Future Work
  12. 9 Summary
  13. 10References
  14. 11Revision History

U-Boot Build-System Integration

This subsection provides a step-by-step guide to integrating custom board infrastructure into the U-Boot build system. While these steps are not strictly required to begin early prototyping, it is best practice to establish dedicated board directories, Kconfig targets, and Makefiles. Note that this section only configures the software build framework; device tree files are covered separately in the next section. Establishing these dedicated build files allows the user to:

  1. Prevent board conflicts
  2. Isolate board-specific configuration issues
  3. Preserve the TI EVM files so they could be used as references

These instructions refer to the custom board's name as <boardname> and the name of the company as <company>. The company's name is used when naming directories to help keep a company's boards grouped together.

  1. Add the following line to the bottom of the $TI_U_BOOT/arch/arm/mach-k3/am62x/Kconfig file.
    + source "board/<company>/<boardname>/Kconfig"
  2. Make a new <company>/<boardname> board directory to store board files for the custom board.
    $ mkdir -p $TI_U_BOOT/board/<company>/<boardname>/
  3. Copy board files from am62x board, as a starting point:
    $ cp -r $TI_U_BOOT/board/ti/am62x/* $TI_U_BOOT/board/<company>/<boardname>/
  4. In the $TI_U_BOOT/board/<company>/<boardname> directory, edit the Kconfig file as seen below.
    + choice
    + 	prompt "<company> AM62X based <boardname>"
    + 	optional
    
    + config TARGET_<BOARDNAME>_A53
    + 	 bool "<COMPANY> <BOARDNAME> running on A53"
    +        select ARM64
    +        select BINMAN
    +        select OF_SYSTEM_SETUP
    +        imply TI_COMMON_CMD_OPTIONS
    
    +  config TARGET_<BOARDNAME>_R5
    +	bool "<COMPANY> <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
    
    + endchoice
    
    + if TARGET_<BOARDNAME>_A53
    + config SYS_BOARD
    +        default "<boardname>"
    + config SYS_VENDOR
    +        default "<company>"
    + config SYS_CONFIG_NAME
    +        default "<boardname>"
    source "board/ti/common/Kconfig"
    endif
    
    + if TARGET_<BOARDNAME>_R5
    + config SYS_BOARD
    +        default "<boardname>"
    + config SYS_VENDOR
    +        default "<company>"
    + config SYS_CONFIG_NAME
    +        default "<boardname>"
    + config SPL_LDSCRIPT
    +         default "arch/arm/mach-omap2/u-boot-spl.lds"
    + source "board/ti/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 it for the custom board.
    $ cp $TI_U_BOOT/include/configs/am62x_evm.h $TI_U_BOOT/include/configs/<boardname>.h

    Make the following modification inside the newly created header file.

    - #ifndef __CONFIG_AM625_EVM_H
    - #define __CONFIG_AM625_EVM_H
    + #ifndef __CONFIG_<BOARDNAME>_H
    + #define __CONFIG_<BOARDNAME>_H
  8. Create the Defconfig files. Start by copying am62x_minimal_r5_defconfig and am62x_minimal_a53_defconfig as seen below.
    $ cp $TI_U_BOOT/configs/am62x_minimal_r5_defconfig $TI_U_BOOT/configs/<boardname>_r5_defconfig
    $ cp $TI_U_BOOT/configs/am62x_minimal_a53_defconfig $TI_U_BOOT/configs/<boardname>_a53_defconfig

    Add the CONFIG_TARGETs as seen below.

    <boardname>_r5_defconfig

    + CONFIG_TARGET_<BOARDNAME>_R5=y
    + # CONFIG_TARGET_AM625_R5_EVM is not set
    <boardname>_a53_defconfig
    + CONFIG_TARGET_<BOARDNAME>_a53=y
    + # CONFIG_TARGET_AM625_A53_EVM is not set

The user has now integrated the custom board's infrastructure in the U-Boot build system.