Help!

Loading application after init


Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> Embeded RSS
Next:  unusual makefiles - problems with rules  
Author Message
Himanshu Chauhan
External


Since: Jun 19, 2006
Posts: 17



PostPosted: Mon Jul 30, 2007 9:04 pm    Post subject: Loading application after init
Archived from groups: comp>os>linux>embedded (more info?)

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?

--Himanshu
Back to top
Unknown
External


Since: May 06, 2005
Posts: 50



PostPosted: Mon Jul 30, 2007 9:04 pm    Post subject: Re: Loading application after init [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Mon, 30 Jul 2007 21:04:17 +0530, Himanshu Chauhan wrote:

> 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.
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
> it should be all by itself.

Which is the way to go?
RTFM init/inittab
Back to top
rulznospam
External


Since: Jul 31, 2007
Posts: 1



PostPosted: Tue Jul 31, 2007 7:56 am    Post subject: Re: Loading application after init [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Jul 31, 2:41 am, Unknown <n... RemoveThis @way.cc> wrote:
> On Mon, 30 Jul 2007 21:04:17 +0530, Himanshu Chauhan wrote:
> > 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.
>
> 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
>
> > it should be all by itself.
>
> Which is the way to go?
> RTFM init/inittab


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
Back to top
CptDondo
External


Since: Oct 05, 2005
Posts: 309



PostPosted: Tue Jul 31, 2007 5:22 pm    Post subject: Re: Loading application after init [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Himanshu Chauhan wrote:
> 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?
>
> --Himanshu

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.
Back to top
Geronimo W. Christ Esq
External


Since: Mar 30, 2005
Posts: 89



PostPosted: Wed Aug 01, 2007 12:22 am    Post subject: Re: Loading application after init [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Himanshu Chauhan wrote:
> 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?

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.
Back to top
Himanshu Chauhan
External


Since: Jun 19, 2006
Posts: 17



PostPosted: Wed Aug 01, 2007 2:12 am    Post subject: Re: Loading application after init [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Geronimo W. Christ Esq wrote:
> Himanshu Chauhan wrote:
>> 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?
>
> 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.


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 Smile 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.

--Himanshu
Back to top
Display posts from previous:   
Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> Embeded All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum