Loading application after init

Hello all,

I am doing an embedded project based on the AT91RM9200 board. I am using

2.6.22 vanilla kernel with patches from maxim. Till now the system boots fine and init loads the sulogin followed by busy box shell, after booting. I have a program. That is the only program that will ever run on the board. How can start that automatically after init. I don't want any login prompt. Board can drop into single user mode, no problem. But it should be all by itself. Which is the way to go?


Reply to
Himanshu Chauhan
Loading thread data ...

Put it /etc/inittab !

I don't want any login prompt. Then comment it out of /etc/inittab

Board can drop into single user mode, no problem. But

Which is the way to go? RTFM init/inittab

Reply to

Simply: Just run your program instead of sulogin in init tty1::respawn:/bin/yourprog

You really should have read the manual.

You want to be confident that the program you are running is solid - especially if you are still developing. Having a crashing program that continually respawns just makes things more difficult.

The other option is to launch a script from init. I guess it depends how complex your system is and how physically secure you want it to be.

Cheers Marc

Reply to

A few options :

- edit /etc/init.d/rcS and run the program you wish.

- edit /etc/inittab and run your application at the appropriate runlevel.

Reply to
Geronimo W. Christ Esq

use init=/bin/myinit as a kernel option

then write a script called myinit, which brings up the board the way you want and then runs your program.

Reply to

Before posting here I had already tried the above initab thing. Didn't work. For some reasons busybox's sulogin was being run. Sorry didn't reply to any of the earlier posts, because all other posts were preaching. I am used to usenet now. I understand when to post and I also understand 10% people will try to preach. You can avoid them :) Anyways, replacing sulogin didn't seem to work. I will have to figure out why it happens. Because I had a similar problem. The tftp program in busybox wasn't good enough. So I wrote a small tftp program and am using it now. I copied that in /usr/local/bin where the symlink to tftp of busybox was lysing in the board. But still when I simply type tftp the busybox's tftp starts. To run my binary I have to give full path.


Reply to
Himanshu Chauhan

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.