How to start an application before system boot up ?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

How to start an application before system boot up ?

跳至解决方案
1,673 次查看
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

标签 (1)
1 解答
1,443 次查看
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

在原帖中查看解决方案

4 回复数
1,443 次查看
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,443 次查看
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 项奖励
回复
1,444 次查看
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,443 次查看
toanjunifer
Senior Contributor I

Hi shivanipatel‌,

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

Regards,

Toan

0 项奖励
回复