SPRADU1 September   2026 AM62A3 , AM62A7

 

  1.   1
  2.   Abstract
  3.   Trademarks
  4. 1Introduction
  5. 2Boot Process
    1. 2.1 SPL Boot Process
      1. 2.1.1 R5 SPL
      2. 2.1.2 TF-A+OPTEE+A53 SPL
      3. 2.1.3 U-Boot
      4. 2.1.4 Linux and User Mode
    2. 2.2 SPL Falcon Mode
      1. 2.2.1 Steps
        1. 2.2.1.1 Installing Linux SDK
        2. 2.2.1.2 Adding Falcon Script
        3. 2.2.1.3 Compiling Linux Device Tree
        4. 2.2.1.4 Creating tispl.bin
        5. 2.2.1.5 Creating a Bootable Card
    3. 2.3 Replacing SPL With SBL
      1. 2.3.1 Falcon Boot in SBL
  6. 3Boot Media
  7. 4Operating System Boot Optimization
    1. 4.1 Trimming Operating System
      1. 4.1.1 Using Preset Trimming Configuration
      2. 4.1.2 Custom Trimming
    2. 4.2 Reducing Log Output
  8. 5Userspace Optimization
    1. 5.1 Customizing Boot Services Using Systemd
  9. 6Minimizing Boot Services Using init Script
  10. 7Conclusion
  11. 8References

Minimizing Boot Services Using init Script

The first program that starts after the Linux boot is /sbin/init, which can be replaced with a custom boot script. To replace /sbin/init, create a script first, then delete /sbin/init, and finally soft-link the custom script as the boot program using the ln -sf <your script> /sbin/init command.

The following is a reference script for CMS fast boot. This script ultimately launches the edgeai-tiovx-apps-main application. It first executes some mount commands to mount necessary partitions. It then loads several necessary modules using the modprobe command, including camera drivers, csi-rx, v4l2 (for camera data input), rpmsg (for communication with the AI DSP and the R-core that executes the ISP), tidss, and display_connecter (for display). After that, it exports some environment variables to prepare for the final run of services. Finally, it runs the edgeai-tiovx-apps-main executable program.

#!/bin/sh
set -x
export PATH=/usr/bin:/sbin:/bin
export LD_LIBRARY_PATH=/lib:/usr/lib:$LD_LIBRARY_PATH
mount -t proc proc /proc
mount -n -t sysfs sysfs /sys
mount -t debugfs debugfs /sys/kernel/debug
mount -t configfs configfs /sys/kernel/config
mount -t efivarfs efivarfs /sys/firmware/efi/efivars
mount -n -t tmpfs none /run
mount -n -t devtmpfs devtmpfs /dev
mkdir -p /dev/shm
chmod 1777 /dev/shm
mount -t tmpfs /dev/shm
export SOC=am62a
export DEVICE_NAME=AM62A
# Load essential kernel modules
insmod /lib/modules/6.6.58-ti-01497-ga7758da17c28-dirty/kernel/drivers/rpmsg/rpmsg_char.ko
insmod /lib/modules/6.6.58-ti-01497-ga7758da17c28-dirty/kernel/drivers/rpmsg/rpmsg_ctrl.ko
modprobe sii902x
modprobe tidss
modprobe display_connector
modprobe ti_k3_r5_remoteproc
modprobe ti_k3_dsp_remoteproc
modprobe omap_mailbox
modprobe cdns_csi2rx
modprobe j721e_csi2rx
modprobe v4l2_cci
modprobe videobuf2_dma_contig
modprobe v4l2_fwnode
modprobe videobuf2_memops
modprobe videobuf2_v4l2
modprobe videobuf2_common
modprobe v4l2_async
modprobe videodev
modprobe cdns_dphy_rx
modprobe mc
modprobe imx219
ulimit -c unlimited
echo "/tmp/core.%e.%p" > /proc/sys/kernel/core_pattern
export EDGEAI_GST_APPS_PATH=/opt/edgeai-gst-apps
export EDGEAI_DATA_PATH=/opt/edgeai-test-data
export OOB_DEMO_ASSETS_PATH=/opt/oob-demo-assets
export MODEL_ZOO_PATH=/opt/model_zoo
export EDGEAI_VERSION=10.1
export EDGEAI_SDK_VERSION=10_01_00
bash /opt/edgeai-gst-apps/scripts/setup_cameras.sh
./opt/edgeai-tiovx-apps/bin/Release/edgeai-tiovx-apps-main ./opt/edgeai-tiovx-apps/configs/linux/imx219_cam_example.yaml &
echo "System initialized: Hello world!!!!!!"
/bin/sh