cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
vijaydhoki
Adventurer
Adventurer
472 Views
Registered: ‎07-03-2019

Run an application automatically at start up on Linux platform

Hey all,

I am trying to run a linux application on zcu102 in qspi mode.I am able to run my application manually after booting and i am able to see the output of my application.

But the problem is that i want to run my application automatically after boot up.

For this procedure i have a small knowledge about this is that we need add a script file and that contains the path of our application(I don't know whether this process is correct or not)

please tell me the procedure that i need to follow to run an application immediately after completion of booting.and if i need to add any script files please share me the link to that script file so that i can edit that file to run my application.

 

Regards

Vijay 

0 Kudos
2 Replies
aravindb
Moderator
Moderator
452 Views
Registered: ‎02-07-2018

Hi @vijaydhoki 

 

 Please follow below steps & build It should work.

 

1. petalinux-create -t apps --template install -n myapp-init --enable

2. vim project-spec/meta-user/recipes-apps/myapp-init/myapp-init.bb

 

#thiss file is the myapp-init recipe.

#

SUMMARY = "Simple myapp-init application"

SECTION = "PETALINUX/apps"

LICENSE = "MIT"

 

LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"

SRC_URI = "file://myapp-init \

"

S = "${WORKDIR}"

FILESEXTRAPATHS_prepend := "${THISDIR}/files:"

inherit update-rc.d

INITSCRIPT_NAME = "myapp-init"

INITSCRIPT_PARAMS = "start 99 S ."

do_install() {

install -d ${D}${sysconfdir}/init.d

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

}

FILES_${PN} += "${sysconfdir}/*"

 

3. Modify your script (project-spec/meta-user/recipes-apps/myapp-init/files/myapp-init)according to your requirements and build it.

 

Thanks & regards

Aravind

----------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.
Give Kudos to a post which you think is helpful and reply oriented.
----------------------------------------------------------------------------------------------

 

Thanks & Regards

Aravind

0 Kudos
vijaydhoki
Adventurer
Adventurer
443 Views
Registered: ‎07-03-2019

Hi @aravindb,Thanks for your reply

Sorry to say this,I am not using peta-linux,I am using linux platform only.
could please tell me the steps to follow to run this on linux.

Regards
Vijay
0 Kudos