OK. You can just create a script /etc/init.d/S99ReadDIO with the
following contents:
#!/bin/sh
/etc/a/c_program_to_read_dio
See http://www.debian-administration.org/articles/28 (found by Googling
"debian startup on boot") for more details.
Don
On 6/17/2013 1:06 PM, tanganyang1985 wrote:
thx, but i didn't find rc.local, I only find rc0-rc6, rcS.d form the
etc folder.
--- In <ts-7000%40yahoogroups.com>, Don
Tucker <> wrote:
>
>
> On 6/16/2013 11:46 PM, tanganyang1985 wrote:
> >
> > Thanks, after reading the materials for initialization script. I
think
> > the procedure for running a program when the board boot should be:
> >
> > 1) put the c program on the location like: /etc/a
> >
> > 2) Put a line at the top of /etc/init.d/rcS:
> > export TZ=`cat /etc/a`
> >
> I'm not sure what you are hoping to do with this.
> >
> > 3) Put the same line in /etc/profile
> >
> I don't think you mean /etc/profile. You might mean /etc/rc.local. All
> you should need to do is to add a line calling your c program near the
> end of the rc.local script, e.g.
>
> /etc/a/c_program_to_read_dio
>
> >
> > Then the program will run when the board power up? But my board fail
> > to run it, any mistakes?
> > thx
> >
> > --- In <ts-7000%40yahoogroups.com>
<ts-7000%40yahoogroups.com>, Don
> > Tucker <dtucker@> wrote:
> > >
> > >
> > > On 6/11/2013 11:12 PM, tanganyang1985 wrote:
> > > >
> > > > Hi, I got a ts 7260 with 3 switches. My questions are:
> > > >
> > > > 1, how could I 'link' the 3 switches to the ts 7260?
> > > >
> > > You can use the DIO header on the board to read discrete inputs.
> > >
> > > http://wiki.embeddedarm.com/wiki/TS-7260#DIO1_Header
> > > http://wiki.embeddedarm.com/wiki/TS-7260#Digital_I.2FO
> > > >
> > > >
> > > > 2, I want the ts 7260 to check the status of the switch (like
switch
> > > > 'on' or 'off')
> > > >
> > > You can write an application to read the values of the discrete
inputs
> > > on the DIO header.
> > >
> > >
> >
http://wiki.embeddedarm.com/wiki/Linux_for_ARM_on_TS-72XX_User%27s_Guide#DIO
> > >
> > > > 3, how could I do the switch check without boot in the Linux,
> > > > alternately, I want the ts 7260 check the switch status after
connect
> > > > to 5 DC power.
> > > >
> > > You can write a script that will run your application when the board
> > > boots (receives power).
> > >
> > >
> >
http://wiki.embeddedarm.com/wiki/Linux_for_ARM_on_TS-72XX_User%27s_Guide#Initialization_Scripts
> > > >
> > > >
> > > > >> TS-SDBOOT - built Aug 10 2009
> > > >
> > > > >> Copyright (c) 2007, Technologic Systems
> > > >
> > > > .
> > > > .
> > > > .
> > > > Finished booting in 2.14 seconds
> > > > Type 'tshelp' for help
> > > >
> > > > $
> > > >
> > > > Any idea or tutorial materials will be great help, thank you &
have a
> > > > good night.
> > > >
> > > >
> > >
> >
> >
>
smime.p7s
Description: S/MIME Cryptographic Signature
|