cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Contributor
Contributor
408 Views
Registered: ‎07-01-2016

Run custom app at bootup at a specific priority

Greetings!

I've built a custom app under Petalinux 2019.2 and I need it to run at bootup BEFORE the network starts up.  In /etc/rc2.d (as well as runlevels 3-5) I see:

s01networking
s20myapp-init

What I need to see is:

s00myapp-init
s01networking

To try and make this happen, I've updated the myapp-init.bb file as follows:

INITSCRIPT_PARMS = "start 0 2 3 4 5 ."

However, this doesn't seem to be taking effect.  Is there something else I need to do?  Is there something I'm overlooking?

Thanks in advance for any help!

-Dave

 

0 Kudos
Reply
2 Replies
Xilinx Employee
Xilinx Employee
349 Views
Registered: ‎05-15-2018

Hi @dtubbs 

A couple of things to check:

1. Could you modify myapp-init.bb to change INITSCRIPT_PARAMS as follows:

INITSCRIPT_PARMS = "start 00 2 3 4 5 ."

If I'm not mistaken, the run-level should be specified as an integer NN (00-99), rather than N (0), which might be preventing your custom app from being placed at the start of the queue for a given init-level.

2. Could you verify that myapp-init.bb has the line "inherit update-rc.d"?. This will ensure that parameters specified in INITSCRIPT_PARAMS are passed to the update-rc.d call during installation.

---------------------------------------------------------------------------
Don’t forget to Reply, Kudo, and Accept as Solution.
---------------------------------------------------------------------------
0 Kudos
Reply
Contributor
Contributor
330 Views
Registered: ‎07-01-2016

Hi Shirilt,

Thanks for yoour suggestions!  I verified the inherit was there, and modified the parms as you suggested, but still no joy - the entry is still S20mkinterfaces-init.  Here's the whole BitBake file:

#
# This file is the mkinterfaces-init recipe.
#

SUMMARY = "Simple mkinterfaces-init application"
SECTION = "PETALINUX/apps"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"

SRC_URI = "file://mkinterfaces-init \
"

S = "${WORKDIR}"

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

inherit update-rc.d

INITSCRIPT_NAME = "mkinterfaces-init"
INITSCRIPT_PARMS = "start 00 2 3 4 5 ."

do_install() {
install -d ${D}/${sysconfdir}/init.d
install -m 0755 ${S}/mkinterfaces-init ${D}/${sysconfdir}/init.d/mkinterfaces-init
}
FILES_${PN} += "${sysconfdir}/*"

Any other ideas?

Thanks!

-Dave

 

0 Kudos
Reply