AM62Px MCU+ SDK  09.01.00
SBL Booting Linux From eMMC

Introduction

  • SBL booting Linux from eMMC (see SBL EMMC Linux Multistage) is a secondary bootloader application that boots Linux on A53 core and RTOS/NORTOS application on R5, M4 cores.
  • The bootloader makes use of 5 appimages
    • A Linux appimage containing the Linux binaries (ATF, OPTEE, A53 SPL).
    • tiboot3.bin with SBL stage1, TIFS, BoardConfig
    • Appimage for WKUP R5 with SBL stage2
    • Appimage for MCU R5
    • Appimage for HSM M4
  • Boots WKUP-R5F, MCU-R5, HSM-M4 cores and Linux on A53 from eMMC.
  • SBL booting Linux can be used when early booting of WKUP-R5F, HSM-M4 and MCU-R5 cores are required. When using uBoot, the application will start running on WKUP-R5F, HSM-M4 and MCU-R5 cores only after booting Linux.
  • The Linux appimage can be generated by using Linux Appimage Generator Tool
  • The appimages will be flashed to the offset on eMMC specified by SysCfg, the SBL parses the appimages from these locations, loads and run the cores.

Bootflow for SBL booting linux from eMMC

Note
The binaries for WKUP-R5F, MCU-R5 cores need not be in the linux root partition (root/lib/firmware), when SBL is booting Linux.
  • The bootflow for SBL booting Linux is as follows

Bootflow for SBL booting Linux
  • The stage 2 bootloader and the Device manager application are combined as a single appimage
  • The SBL stage 1 will self load SBL stage 2 + Device manager application to WKUP-R5 core and run self CPU
  • Then two threads namely, main thread and SBL stage 2 thread will be created for parallel execution
  • The main thread will open the drivers required for application, do the SciServer init and run the WKUP-R5 core application
  • The SBL thread will set the clock and open the drivers for the peripherals used by the SBL.
  • Then it boots the HSM-M4 core, MCU-R5 core and linux on A53 core.
Note
- The peripherals used by SBL and application are separated by using the sysconfig option 'Instance added by bootloader'.
- For the peripherals used by SBL, the 'Instance added by bootloader' option is enabled in the sysconfig as shown.
Instance added by bootloader - sysconfig option
- These peripherals will be opened/closed in the SBL thread and it will not get opened/closed in the common Drivers_open/Drivers_close function called in the main thread.

EMMC Partitioning

Note
The default SD card image for AM62Px-evm can be used to boot Linux using SBL
The tiboot3.bin, tispl.bin will not be used for booting Linux when using SBL booting Linux.
The R5 binaries in the root partition (eg : root/lib/firmware/am62p-mcu-r5f0_0-fw) will not be used when SBL boots Linux and MCU-R5 core.
  • eMMC uses two patitions to boot Linux
    • A boot patition
      • tiboot3.bin
      • tispl.bin
      • u-boot.img
      • uboot.env
    • A ext4 partition in the user data area containing
      • Linux Kernel image
      • Linux DTB
      • Linux file system

See Also