Loading application after init - Embedded

This is a discussion on Loading application after init - Embedded ; 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 ...

+ Reply to Thread
Results 1 to 7 of 7

Thread: Loading application after init

  1. 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?

    --Himanshu

  2. Re: Loading application after init

    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





  3. Re: Loading application after init

    On Jul 31, 2:41 am, Unknown 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


  4. Re: Loading application after init

    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.

  5. Re: Loading application after init

    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.

  6. Re: Loading application after init

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

  7. Re: Loading application after init


    >
    > Before posting here I had already tried the above initab thing. Didn't
    > work. For some reasons busybox's sulogin was being run.

    kill -HUP 1


    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

    This posting also tells everyone that you have no ****ing idea what you
    are doing. Spending an entire day learning about init will save you many
    weeks of pissing around in the dark.

    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.


    Just like you would expect. All busybox utils are symlinked to the
    busybox binary. The busybox code reads the absolute path of executable
    being run to work out which utility is being called. Having read preachy
    manual you might know this ....




+ Reply to Thread