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

Debug Traces

Early in the board bring-up process, diagnosing a catastrophic failure that occurs before the Linux kernel initializes the serial console is highly challenging. Furthermore, raw kernel boot logs can be difficult to interpret without context. Compiling debugging features into the kernel image via the menuconfig tool can significantly help isolate the root cause of early boot failures.

Enabling additional debug features requires building a custom kernel image. These steps come from the AM62x Processor SDK: Linux Users Guide and the commands should be executed from the root of the Linux kernel repository.

  1. Install tools required to build the kernel Image using the command below:
    $ sudo apt install git xz-utils build-essential flex bison bc libssl-dev libncurses-dev
  2. Reset the kernel source tree to a clean state.
    $ make ARCH=arm64 CROSS_COMPILE="$CROSS_COMPILE_64" distclean
  3. Open the interactive menuconfig tool.

    The next command loads the default ARM64 kernel configuration, applies the ti_arm64_prune.config fragment for cleanup, and opens the interactive menuconfig tool to manually configure additional kernel options.

    $ make ARCH=arm64 CROSS_COMPILE="$CROSS_COMPILE_64" defconfig ti_arm64_prune.config menuconfig
  4. Enable debug features.

    Navigate to the "Kernel hacking" menu to access the available debugging options. More information of these debug configuration options can be found at $TI_LINUX/lib/Kconfig.debug. After enabling the debug features, exit the interactive menuconfig tool, save the configuration, and build the kernel image using the following commands:

    $ make ARCH=arm64 CROSS_COMPILE="$CROSS_COMPILE_64" savedefconfig
    $ make ARCH=arm64 CROSS_COMPILE="$CROSS_COMPILE_64"

The resulting kernel binary is located at $TI_LINUX/arch/arm64/boot/Image. Deploy this debug-enabled kernel image during the board porting process to help diagnose and resolve issues with newly enabled peripherals.