Is it possible to optimize the boot-time in the device tree/image?

Is it possible to optimize the boot time in the device tree or before you build the image?

I’ve seen the How-to articles for optimization but didn’t quite understand where those changes would be implemented to make the image itself optimized.

Hi @edmirsuljicOIM ,

Thanks for reaching out.

What OS are you using and which version?

Best Regards
Kevin

It’s a linux image where the program is run on one docker container.

verdin-imx8mm-xxx:~$ hostnamectl
   Static hostname: verdin-imx8mm-xxx
         Icon name: computer
        Machine ID: 19c6b23afec348939f560f189dac10f8
           Boot ID: 478cf052f6004e4997dcb6c882091f6a
  Operating System: TorizonCore 5.6.0+build.13 (dunfell)
            Kernel: Linux 5.4.161-5.6.0+git.0f0011824921
      Architecture: arm64

Hi @edmirsuljicOIM !

Boot time optimization is always very specific for each case.

Could you please elaborate more on your use case?

Please be specific about what you need to accomplish.

Also, what specifically do you want to modify on the device tree?

Best regards,

Hmm well the use case is quite simple; we wish to reduce the time from boot to application start as much as possible, since right now it takes about 30 seconds for the application to start. Optimally this would be almost instant but that is unfortunately not possible, so we will be happy with whatever we can get.

It is a pretty simple python application running in a docker container. No GUI is used and only some GPIO pins and some audio interface is used.

Our device tree is customized already for our purpose, I mentioned it as a question if anything should be changed there for optimization as I am quite new to this.

Please let me know what more specifically you need as I am unsure what details you need from me. Thanks

Hello @edmirsuljicOIM ,
I you want “instant boot”, I’m afraid that you are left with only two options:

If instant boot is not an absolute must for you, you could start by analyzing the boot process via the systemd-analyze blame command in order to remove the services that are not essential for you.

Best regards,
Josep