[Yocto] Auto run script when startup

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

[Yocto] Auto run script when startup

9,048 Views
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 Kudos
8 Replies

7,478 Views
li_hong
Contributor III

image:fsl-image-qt5-validation-imx

0 Kudos

7,478 Views
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 Kudos

7,478 Views
li_hong
Contributor III

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

0 Kudos

7,478 Views
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 Kudos

7,478 Views
li_hong
Contributor III

Hi,karan gajjar:

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

0 Kudos

7,478 Views
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 Kudos

7,478 Views
Rita_Wang
NXP TechSupport
NXP TechSupport

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

0 Kudos

7,478 Views
li_hong
Contributor III

Hi,Rita Wang:

imx6qpsabresd of Yocto.

0 Kudos