- Note
- The load address of resource table for R5 and M4 cores must be consistant with the address in the Linux dts file.
Introduction
- Note
- By default, AM62AX-SK ships with OSPI NAND flash. This example is applicable only after modifying it to OSPI NOR flash
This is a bootloader example, which shows an example of booting Linux on A53 core and RTOS/NORTOS applications on DM R5, MCU R5 and C75 cores.
The booting is done in 2 stages(2 bootloader applications).
- The stage1 of the bootloader runs from the HSM RAM. It boots MCU R5 with RTOS/NORTOS application and initializes the DDR. Then it loads the stage2 of the bootloader to DDR and stats running it.
- The stage2 of the bootloader boots Linux on A53 and then self loads DM firmware on the DM R5.
The SBL uses 6 appimages
- A Linux appimage containing the Linux binaries (ATF, OPTEE, A53 SPL).
- tiboot3.bin with SBL stage1, TIFS, BoardConfig
- Appimage for SBL stage2
- Appimage for MCU R5
- Appimage for HSM M4
- DM firmware appimage for DM R5
Refer SBL Booting Linux From OSPI for more details on the OSPI boot loader.
In order to boot faster,
- Linux appimage can be packaged with the Linux kernel and DTB in falcon mode (Linux Appimage Generator Tool). Refer to Processor SDK Linux for more information on how to create a buildable Kernel and DTB
- This example reuses the OSPI initialization already performed at SBL stage 1 instead of reprogramming it. This is done by enabling the Skip OSPI Programming option in SBL stage 2 sysconfig
Refer Enabling DDR inline ECC enablig inline ECC
Supported Combinations
Parameter | Value |
CPU + OS | r5fss0-0 nortos |
Toolchain | ti-arm-clang |
Board | am62ax-sk |
Example folder | examples/drivers/boot/sbl_ospi_linux_multistage |
Steps to Run the Example
Build the example
- 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 Linux Appimage
- Note
- Change DEVICE_TYPE to HS in ${SDK_INSTALL_PATH}/devconfig/devconfig.mak and then generate Linux Appimage for HS-SE device.
- Create a Linux Appimage containing the Linux binaries (ATF, OPTEE, A53 SPL) or (ATF, OPTEE, Kernel, DTB) in case of falcon mode.
- 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
Create HSM Appimage
- Note
- Change DEVICE_TYPE to HS in ${SDK_INSTALL_PATH}/devconfig/devconfig.mak and then generate Linux Appimage for HS-SE device.
- Create a HSM Appimage
- This can be done by running the makefile at {SDK_INSTALL_PATH}/tools/boot/HSMAppimageGen
- Refer HSM Appimage Generator Tool for more details
Run the example
- Note
- For IPC rpmsg linux echo, the resource table entity must be placed at the beginning of remoteproc memory section as mentoined in Linux dts file.
- To flash to the EVM, refer to Flash an example application . Only when giving the flash config file, point to the
default_sbl_ospi_linux.cfg
shown above.
- Example, assuming SDK is installed at
C:/ti/mcu_plus_sdk
and this example and IPC application is built using makefiles, and Linux Appimage is already created, in Windows, cd C:/ti/mcu_plus_sdk/tools/boot
python uart_uniflash.py -p COM13 --cfg=C:/ti/mcu_plus_sdk/tools/boot/sbl_prebuilt/am62ax-sk/default_sbl_ospi_linux.cfg
- If Linux PC is used, assuming SDK is installed at
~/ti/mcu_plus_sdk
cd ~/ti/mcu_plus_sdk
python uart_uniflash.py -p /dev/ttyUSB0 --cfg=~/ti/mcu_plus_sdk/tools/boot/sbl_prebuilt/am62ax-sk/default_sbl_ospi_linux.cfg
- Boot the EVM in OSPI NOR boot mode.
- Note
- The above config file will flash till u-boot on the OSPI NOR bootmedia. U-Boot can load kernel from any bootmedia, refer to Processor SDK Linux user guide for more details.
See Also
BOOTLOADER
Sample Output
After flashing and booting the EVM, you will see below output on the UART console (Complete log is not shown)