[Yocto] Auto run script when startup

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

[Yocto] Auto run script when startup

10,268 次查看
li_hong
Contributor III

Hi , Team:

 I 'd finished a script for Rootfs Resize, and I want to excute this script automatically when the system startup。

How can I solve this problem?

Thank you in advance!

0 项奖励
回复
8 回复数

8,698 次查看
li_hong
Contributor III

image:fsl-image-qt5-validation-imx

0 项奖励
回复

8,698 次查看
karangajjar
Senior Contributor II

Hi hong li,

Check if you have crontab in your system by default it should. Follow below links to start a script at boot:

https://www.dexterindustries.com/howto/auto-run-python-programs-on-the-raspberry-pi/ 

cron - Running command at startup on crontab - Ask Ubuntu 

Regards,

Karan Gajjar

0 项奖励
回复

8,698 次查看
li_hong
Contributor III

Thank you,karan gajjar .I have sloven my problem.Have a nice day.

0 项奖励
回复

8,698 次查看
karangajjar
Senior Contributor II

Hi hong li,

If you have inittab file in /etc/ then you can add the command to execute your script on startup as the example of running xdm in below link:

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

Regards,

Karan Gajjar

0 项奖励
回复

8,698 次查看
li_hong
Contributor III

Hi,karan gajjar:

Think you for your reply, but I'd not found out inittab file in /etc/.

0 项奖励
回复

8,698 次查看
karangajjar
Senior Contributor II

Hi hong li,

Can you please let us know which image are you building in yocto? core-image-minimal, core-image-base, fsl-image-machine-test, etc?

Regards,

Karan Gajjar

0 项奖励
回复

8,698 次查看
Rita_Wang
NXP TechSupport
NXP TechSupport

Could you tell us which board and BSP are you using?

0 项奖励
回复

8,698 次查看
li_hong
Contributor III

Hi,Rita Wang:

imx6qpsabresd of Yocto.

0 项奖励
回复