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

Kernel Debug Traces

Early on in the board bring up process, it can be difficult to detect the root cause of a boot failure if the kernel fails prior to bootlogs being printed. Additionally, kernel bootlogs can be difficult to interpret. Adding kernel debug features to the kernel image through menuconfig selection helps isolate the cause of the failure.

Enabling additioanl debug features requires building a custom kernel image. These steps come from the AM62x Processor SDK Guide. These commands are run from the root of the SDK 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. Clean source to begin a fresh build of the kernel.
    make ARCH=arm64 CROSS_COMPILE="$CROSS_COMPILE_64" distclean
  3. Enter the configuration menu.

    To enable extra debugging features, enable additional config options. This is done by using menuconfig. To apply the menuconfig settings over the recommended configuration file fragment, use the following command.

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

    Navigate to "Kernel hacking" to view the kernel debug options. Enable debugging features in menuconfig sets them to be built into the kernel image. A description of these debug configuration options is found at TI_LINUX/lib/Kconfig.debug. After enabling debug features, save the configuration and exit the configuration menu. Build the kernel image using the following command.

    make ARCH=arm64 CROSS_COMPILE="$CROSS_COMPILE_64"

The resulting image is found in TI_LINUX/arch/arm64/boot/Image. Using this image enables access to the added debug features.