How to make my app automatically run on startup (Leopard Board Ti DM 368 )
Problem is regarding leopard board (tms320 dm368 processor).
(Please ignore if i sound weird at some places as i am a complete newbieee in Leopard Board/LINUX ) :) I have a leopard board (tms320 dm368 processor)and i want to run an app, automatically after boot up instead of manually typing the command in terminal. So, I created the script file (named vcc_app) as follows Code:
#!bin/sh 2. I gave the command Code:
chmod +x /etc/init.d/vcc_app 3. Then I gave the command Code:
ln -s /etc/init.d/vcc_app /etc/rc.d/vcc_app Now, when i reboot the board nothing happens (Some times it says vcc_app not found..). Is there anything wrong . Please help me out ! Many Thanks ! |
Which distro is running on your leopardboard?
|
Does your program work correctly if started from the command line (/etc/init.d/vc_app)? Does it start the board?
In general, it is not recommended to put your own code in /etc/init.d. Rather, make a startup script into a standard executable directory (like /usr/local/bin or $HOME/bin) and add the corresponding line into /etc/rc.local (although it may depend on the distro). |
If you want to start your program by the init system in the way you're planning you have to make sure:
- it can run from /bin/sh - it does NOT require any lib or program not yet started (e.g. programs running on other runlevels) - it refers to full paths (not relative) |
Quote:
Just for more info: There are no runlevel dirs like rc1.d or rc2.d etc. rc.local is also not present.All i have is rc.d |
Quote:
When em running it manually from terminal it works fine. |
Quote:
2. There are neither runlevel dirs like rc1.d, rc2.d etc nor rc.local. i only have rc.d Just for more info: Its not a distro, i just have a bootloader(uboot,kernel and rootfs.(i am successfully booting it from SD card) |
Not all the scripts in rc.d and init.d are started just because they have tha run flag set!
What's inside your /etc/rc.d and /etc/init.d folders? |
Quote:
init.d Code:
-rwxr-xr-x 1 xyz xyz 3248 2012-05-22 15:18 coprocessors Code:
lrwxrwxrwx 1 xyz xyz 18 2012-05-22 12:31 S00mountall -> ../init.d/mountall |
In a nutshell, if you look at the rc.d directory the S means start. Processes are started in order i.e S00xxx - S99xxx. Creating the link /etc/rc.d/S99your_app should run your hello world program automatically.
|
Quote:
Thanks! |
All times are GMT -5. The time now is 02:26 AM. |