cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Voyager
Voyager
2,856 Views
Registered: ‎06-26-2015

how to auto lunch app after booting

Jump to solution

how do I set the petalinux 2017.2, and my apps.  so it auto lunch my apps after Linux finish the boot process.

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Explorer
Explorer
4,674 Views
Registered: ‎03-22-2016

One way is to create an init.d script. That's a nice clean option.

 

- Make a new petalinux application

- Create an init.d script (bash script that can take an argument of "start", "stop", "restart")

- In your application's recipe, add:

 

inherit update-rc.d

INITSCRIPT_NAME = "name_of_your_initscript"
INITSCRIPT_PARAMS = "defaults 90"

And in your do_install() function, add:

install -d ${D}{sysconfdir}/init.d
install -m 0755 ${S}/name_of_your_initscript ${D}${sysconfdir}/init.d/name_of_your_initscript

Inside your init.d script, you can use start-stop-daemon to background a task, save PID files, etc.

View solution in original post

0 Kudos
2 Replies
Highlighted
Explorer
Explorer
2,801 Views
Registered: ‎10-14-2015

it is explained in the reference guide

0 Kudos
Highlighted
Explorer
Explorer
4,675 Views
Registered: ‎03-22-2016

One way is to create an init.d script. That's a nice clean option.

 

- Make a new petalinux application

- Create an init.d script (bash script that can take an argument of "start", "stop", "restart")

- In your application's recipe, add:

 

inherit update-rc.d

INITSCRIPT_NAME = "name_of_your_initscript"
INITSCRIPT_PARAMS = "defaults 90"

And in your do_install() function, add:

install -d ${D}{sysconfdir}/init.d
install -m 0755 ${S}/name_of_your_initscript ${D}${sysconfdir}/init.d/name_of_your_initscript

Inside your init.d script, you can use start-stop-daemon to background a task, save PID files, etc.

View solution in original post

0 Kudos