ts-7000
[Top] [All Lists]

Re: [ts-7000] my code & kerne

To:
Subject: Re: [ts-7000] my code & kerne
From: Jim Jackson <>
Date: Wed, 20 Dec 2006 19:22:47 +0000 (GMT)


On Wed, 20 Dec 2006, Alvaro Aguirre wrote:

> Maybe what you really need is a daemon and not a kernel module. A linux
> daemon can be loaded anytime on the boot up process depending on the
> level/priority you give it on the init scripts.

Not "Maybe", but "Definitely"!

Tyrone, things don't have to be "in the kernel" to run permanently! That
is not the Unix/Linux way. As Alvaro says you just organise the boot up
init scripts to run your program, there is no special magic involved.

Inserting stuff from previous email on startup.....

You need to read up on the SysV INIT system, which is sort of what is
used - though much simplified.

see for instance.....

 http://www.redhat.com/docs/manuals/linux/RHL-9-Manual/ref-guide/s1-boot-init-sh

 http://www.linuxnetmag.com/en/issue6/m6inits1.html

But it is very stripped down on the TS72xx's

Essentially on boot the init program reads /etc/inittab and start various
things (like getty on serial ports so you can login), and it runs script
/etc/rc.d/rcS.sysinit and as the default run level (see /etc/inittab) is 3
is runs /etc/rc.d/rcS 3, which runs the scripts linked in /etc/rc.d/rc3.d
(those that begin with "S") in numeric order. To see what is run do

  ls -l /etc/rc.d/rc3.d/S*


So to get a program started the quick and dirty way is to modify the
script /etc/rc.d/rcS.sysinit to start crond.

To do it properly (:-) make a script to start/stop your program, put it at
/etc/init.d/progname, and add a suitable link from directory
/etc/rc.d/rc3.d that links to this script. See how its done by checking
out /etc/init.d/rc.inetd

 e.g.  cd /etc/rc.d/rc3.d
       ln -s ../../init.d/progname S90progname

or similar.

The sysV init stuff is infinitely configurable :-) see Gooches' rant on
the topic at

  http://www.atnf.csiro.au/people/rgooch/linux/boot-scripts/

HTH
Jim



>
> On 12/20/06, Tyrone Cousins <> wrote:
> >
> >   I am wrote this simple infinite loop that reads serial port/UART2 and
> > transmit back on UART2 information, what i want to know where in the
> > kernel do i put this infinite loop code and is it possible?.
> >
> > I want it to reside in the kernel but run AFTER linux is completely
> > loaded. is it possible? If so, where do i put this code? is it in
> > _start.s? Please help me. thanks
> >
> >
> >
>


 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ts-7000/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/ts-7000/join
    (Yahoo! ID required)

<*> To change settings via email:
     
    

<*> To unsubscribe from this group, send an email to:
    

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 

<Prev in Thread] Current Thread [Next in Thread>
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU