Auto run script when startup

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

Auto run script when startup

跳至解决方案
4,134 次查看
santhosh2
Contributor IV

Hi,

I want to auto run a custom script during start up

I am using  i.mx8mmini board  yocto

building using bitbake fsl-image-validation-imx

Regards

Santhosh

0 项奖励
1 解答
3,734 次查看
igorpadykov
NXP Employee
NXP Employee

one can also check suggestions provided on

i.MX8M autostart application at boot 

Best regards
igor

在原帖中查看解决方案

0 项奖励
5 回复数
3,734 次查看
karangajjar
Senior Contributor II

Hi Santhosh Kumar,

Please check below thread:

[Yocto] Auto run script when startup 

Let us know if above thread do not solve your problem.

Regards,

Karan Gajjar

0 项奖励
3,734 次查看
karangajjar
Senior Contributor II

Hi Santhosh Kumar,

If your system has /etc/inittab, try adding a line in it.

What the Linux /etc/inittab file tells your system to do | Network World 

Regards,

Karan Gajjar

0 项奖励
3,734 次查看
santhosh2
Contributor IV

Hi Karan,

inittab is not found in my rfs, I tried as per this link also  cron - Running command at startup on crontab - Ask Ubuntu 

I placed the command sudo sh /home/root/startupscript.sh in /etc/rc.local before the exit 0 line

But things didn't work. it didn't execute the startupscript at all

Any other alternative..

0 项奖励
3,735 次查看
igorpadykov
NXP Employee
NXP Employee

one can also check suggestions provided on

i.MX8M autostart application at boot 

Best regards
igor

0 项奖励
3,734 次查看
santhosh2
Contributor IV

Thanks Issue resolved... :smileyhappy:

edited the  /etc/rc.local file and added the below line before the exit(0)

cd /home/root/

sh startupscript.sh

Regards

Santhosh Kumar S

0 项奖励