How to start an application before system boot up ?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to start an application before system boot up ?

Jump to solution
1,570 Views
toanjunifer
Senior Contributor I

Hi NXPs,

My name is Toan. I'm using iMX6UL-evk with kernel 4.14.98. And I trying to start application fast much as possible. Currently, I use crontab to start app and it is started after system boot up. It's took about 27 seconds. But I wanna much faster. So how can I boot app before system boot up ? Does it possible ?

Thank you so much.

Best regards,

Toan

Labels (1)
1 Solution
1,340 Views
shivanipatel
Senior Contributor II

Hi, toanjunifer@gmail.com

It won't be possible at the u-boot level.

You can optimize the boot time by disabling the unnecessary modules using menuconfig to start your application as soon as possible.

You can refer to this link to minimize the boot time.

Regards,

Shivani

View solution in original post

4 Replies
1,340 Views
shivanipatel
Senior Contributor II

Hi, toanjunifer@gmail.com

At which point do you want to start your application, after u-boot or after Linux console come?

To run an application on system boot, you need to write the custom systemd service as Linux kernel 4.14.98 uses systemd init/service manager.

You can refer this link to write a custom systemd service.

Hope this will help you.

Regards,

Shivani

1,340 Views
toanjunifer
Senior Contributor I

Hi shivanipatel‌,

Thank you for your reply.

I wanna start my application before login user show up and as early as possible. Does it possible if I wanna start after u-boot ?

Note: I tried follow Use systemd to Start a Linux Service at Boot | Linode . It's working good but starting time is the same with I use crontab. 

Best regards,

Toan

0 Kudos
Reply
1,341 Views
shivanipatel
Senior Contributor II

Hi, toanjunifer@gmail.com

It won't be possible at the u-boot level.

You can optimize the boot time by disabling the unnecessary modules using menuconfig to start your application as soon as possible.

You can refer to this link to minimize the boot time.

Regards,

Shivani

1,340 Views
toanjunifer
Senior Contributor I

Hi shivanipatel‌,

Currently, I;'m using iMX6UL, not iMX6Q. So this solution seem like not compatible.

Regards,

Toan

0 Kudos
Reply