How to add the initscript and run during the devce boot on imx6ul

Showing results for 
Search instead for 
Did you mean: 

How to add the initscript and run during the devce boot on imx6ul

Contributor I

I want to add one script file in the /etc/init.d/ and can be run by rcS.d the during boot up.
I follow the post to add the code and file.
After load rootfs into device, I can see the script file in the /etc/init.d/ and /etc/rcS.d/

#ls -all
#lrwxrwxrwx 1 root root 26 Jan 1 1970 -> ../init.d/

But the script can not run during the boot.
The console message will show as below.
[ SKIP ] Ordering cycle found, skipping pvs6-startLTE.service
How do I solve this problem ?

Labels (3)
0 Kudos
2 Replies

NXP TechSupport
NXP TechSupport

Please try to add a link to your script into exact runlevel, /etc/rc5.d/ for example.
You can recognize exact runlevel with "runlevel" utility.

0 Kudos

Contributor I

I check some status from below systemctl command. 

root@imx6ulevk:~# systemctl status pvs6-startLTE.service
♂ pvs6-startLTE.service
Loaded: loaded (/etc/init.d/; generated; vendor preset: enabl
Active: inactive (dead)
Docs: man:systemd-sysv-generator(8)

root@imx6ulevk:~# systemctl is-enabled pvs6-startLTE.service
root@imx6ulevk:~# systemctl is-active pvs6-startLTE.service

And I want to enable it but fail. 

root@imx6ulevk:~# systemctl enable pvs6-startLTE.service
Failed to enable unit: Unit /run/systemd/generator.late/pvs6-startLTE.service is transient or generated.

Please help me for why I cannot enable it ?

0 Kudos