This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM62A7: Boot time optimization on am62a7-sk

Part Number: TDA4AEN-Q1

Hi Team,

I am working on an aggressive boot-time optimization for the AM62A7-SK (SDK 11.01). My primary goal is to have the camera-to-display pipeline active as soon as possible after power-on.
 
Current Progress:
I have successfully optimized the early boot stages and can reach the Linux console (BusyBox) in under 2 seconds from power-on. My current build configuration includes:
  • Bootloader: Falcon Mode enabled (skipping U-Boot proper).
  • Userspace: BusyBox-based tiny-image (replacing systemd).
  • Libraries: Minimal GStreamer libraries enabled.
  • Kernel: Stripped defconfig to remove unnecessary drivers and features.
 
The Issue:
After thinning the kernel to improve boot speed, the camera and display device nodes (/dev/video* and /dev/fb0 or /dev/dri/card0) are no longer appearing.
When I re-enable the standard FB/Display drivers, the boot time increases significantly, which defeats the purpose of the optimization. It seems I am missing the specific "lean" configuration or patches required to initialize the CSI-2 RX and DSS subsystems without the overhead of the full multi-media stack.
 
Questions:
  1. Do you have a recommended minimal Kernel .config or a patch specifically for AM62A that enables only the CSI-2 and Display (DSS) paths for fast-boot scenarios?
  2. To keep the boot time under 2–3 seconds, is it possible to initialize the VPAC/ISP via the R5F core earlier in the sequence, or must I wait for a specific remoteproc load in Linux?
  3. Are there specific Device Tree optimizations (nodes to keep vs. nodes to disable) to ensure the CSI-2 and Display drivers probe immediately without waiting for other dependencies?
  4. Is there a reference for an "Early Capture" implementation that bypasses the standard heavy driver probe sequence?
I would appreciate any guidance, minimal device tree examples, or kernel fragments that could help me restore the pipeline while maintaining my 2-second boot target.
Thank you!
  • Hello,

    This thread was just now assigned to the correct organization. I'll now assign it to the correct engineer. Please allow some time for a response.

    Thanks,

    Anshu

  • Hi Avijit,

    Do you have a recommended minimal Kernel .config or a patch specifically for AM62A that enables only the CSI-2 and Display (DSS) paths for fast-boot scenarios?

    This would be a high customization to our default SDK, but we don't have any.

    To keep the boot time under 2–3 seconds, is it possible to initialize the VPAC/ISP via the R5F core earlier in the sequence, or must I wait for a specific remoteproc load in Linux?

    In current boot flow, VPAC/ISP is already initialized before Linux boots, as shown in the boot flow diagram here. It is done as part of the DM FW image as shown below. However, as you mentioned, IPC handshaking between DM R5 and A53 has to be finished in order for applications on A53 (Linux) to be able to use VPAC through either Gstreamer or TIOVX.

    Are there specific Device Tree optimizations (nodes to keep vs. nodes to disable) to ensure the CSI-2 and Display drivers probe immediately without waiting for other dependencies?

    Same as the first question. We don't have this kind of customization example beyond the standard SDK.

    Is there a reference for an "Early Capture" implementation that bypasses the standard heavy driver probe sequence?

    We don't have any reference for early (fast) capture using the standard SDK (i.e. AM62A EdgeAI SDK).

    Regards,

    Jianzhong

  • Hi Jianzhong, 

    I'm looking for the patches and .cfg files that strip down the tiny-image. I want to try reverting them to restore the necessary device nodes. After confirming the nodes are back, I'll work on optimizing the kernel boot time myself.

    Thanks,

    Avijit

  • I am trying to make a tiny image with the kernel config from the base image. 

  • Ok. Understood your ask. Let me check internally.

  • Hi Avijit,

    I am trying to make a tiny image with the kernel config from the base image. 

    By the "tiny image", do you refer to the filesystem image file tisdk-tiny-initramfs-am62xx-evm.rootfs.cpio provided in the SDK? If so, this tiny image file is purely the Linux rootfs, it doesn't include kernel Image and modules (the boot/ and lib/modules/ directories are empty). So you can populate the kernel Image and modules with whatever config you need into this tiny rootfs.

    Please let's know if this doesn't answer your question.

  • I am building using the command 
    MACHINE=am62axx-evm bitbake tisdk-tiny-image 

    And loading the .wic.xz file (not only the rootfs) 

    I would like to make a custom tiny image (wic file). with the following customization for fast boot. 

    - Use busybox in place of systemd 

    - Enable falcon mode 

    - Use the kernel defconfig from base image. 

    "Use the kernel defconfig from base image" - My understanding is TI is applying a custom .cfg file on top of the default defconfig to remove components in the tiny image.

    I am trying to bring the camera to display pipeleine ASAP. I am able to bring the camera on base image. Also, I made a build that is booting to shell (#) in bellow 2 secs. I am trying to merge these two changes into one build. 

    Now I am trying to make a combo of these two builds. Kernel from base build and eveything else from tiny build. If camera and display works there, I can trim the kernel. 

    Can you please help me making the combo build ? 

    Thanks,

    Avijit 

  • Hi Avijit.

    The instruction linked below explains how to build Yocto for falcon boot.

    3.1.2.9. U-Boot Falcon Mode — Processor SDK AM62Ax Documentation

    - Use busybox in place of systemd 

    To replace systemd, do you really mean to use busybox directly, or you meant to use SysVInit?

  • BTY, by just replacing the base rootfs image with the tiny image won't save much in boot time, it is the root filesystem init process which matters. So for your application I don't recommend to start with the tiny image, because it doesn't provide any supporting library for the CSI/DSS applications. Instead, I recommend you start from the base image, then optimize its inti process. For example, you can use SysVInit to replace systemd, then optimize the SysVInit init process. Or you can skip the standard Linux init (SysVInit or systemd) at all, and directly let the kernel to start your application as the PID 1 process.

  • Thanks Liu, Do you happen to have any patch (even if it is not official) that could help me with this effor. 

  • Hi Avijit,

    I am not sure which specific task you need patches for, but in general, this is a manual customization process and the changes would not be the same for different applications.