AM62x MCU+ SDK  08.06.00
SBL UART Linux

Introduction

This bootloader does SOC initializations and attempts to boot a multicore appimage received over UART via XMODEM. The image file is sent using a python script (See UART Bootloader Python Script). Once image is received, the SBL then parses it, splits it into RPRCs for each core applicable. Each core is then initialized, RPRC image is loaded, entry points are set and the core is released from reset. For more on bootflow/bootloaders, please refer Understanding the bootflow and bootloaders

Supported Combinations

Parameter Value
CPU + OS r5fss0-0 nortos
Toolchain ti-arm-clang
Board am62x-sk, am62x-sk-lp
Example folder examples/drivers/boot/sbl_uart_linux

Steps to Run the Example

Build the example

Since this is a bootloader and is used as a SOC initialization binary, the example will be run every time you boot an application using this example. It is generally run from a boot media (OSPI Flash, SD Card or over UART) unlike other examples which are usually loaded with CCS. Nevertheless, you can build this example like you do for the others using makefile or build it via CCS by importing as a project.

  • When using CCS projects to build, import the CCS project for the required combination and build it using the CCS project menu (see Using SDK with CCS Projects).
  • When using makefiles to build, note the required combination and build using make command (see Using SDK with Makefiles).

Create an SD-Card with Linux image

  • For booting A53 with linux SD-Card with linux image needs to be created. Refer to Processor SDK Linux user guide on how to create SD-Card to boot Linux.

Create Linux Appimage

Note
Change DEVICE_TYPE to HS in ${SDK_INSTALL_PATH}/devconfig/devconfig.mak and then generate Linux Appimage for HS-SE device.
For HS, Instructions to build A53 uboot can be found in the SDK Linux documentation at Foundational Components » U-Boot » User’s Guide » General Information » Build U-Boot
Copy ATF, OPTEE from ${SDK_INSTALL_PATH}/board-support/prebuilt-images and ${OUTPUT_PATH_OF_U-BOOT_A53}/a53/spl/u-boot-spl.bin (unsigned image) to a new folder.
Change PSDK_LINUX_HS_IMAGE_PATH to the path where A53 spl images (ATF, OPTEE, A53 uboot) are copied.
  • Create a Linux Appimage containing the Linux binaries (ATF, OPTEE, A53 SPL)
  • This can be done by running the makefile at {SDK_INSTALL_PATH}/tools/boot/linuxAppimageGen after setting the PSDK path in file config.mak
  • Refer Linux Appimage Generator Tool for more details

Run the example

Note
For HS-SE device, use default_sbl_uart_hs.cfg as the cfg file.
For HS-FS device, use default_sbl_uart_hs_fs.cfg as the cfg file.
  • Run the following command from the {MCU_PLUS_SDK_INSTALLATION_PATH}/tools/boot
    • For am62x-sk
         python uart_bootloader.py -p /dev/ttyUSB0 --cfg=sbl_prebuilt/am62x-sk/default_sbl_uart_linux.cfg
      
    • For am62x-sk-lp
         python uart_bootloader.py -p /dev/ttyUSB0 --cfg=sbl_prebuilt/am62x-sk-lp/default_sbl_uart_linux.cfg
      

Here /dev/ttyUSB0 can be changed to COM port like'COM4' incase of Windows.

See Also

BOOTLOADER

Sample Output

Since this SBL receives the appimage over UART using XMODEM protocol, it doesn't print anything to the console so as not to corrupt the XMODEM transport.