Hi Klaus,

thank you very much for your well-done HowTo. I need NTP running at  
the foxboard and therefore I was glad to find this help.
It worked fine for me, and NTP is running perfectly now at my  
foxboard. Just some notes:

1. In my setup there was no DNS server defined in /etc/resolv.conf.  
For this reason NTP could not find the servers. I assume this is  
clear for the normal developer, but I am a beginner.

2. There seems to be a small typo in your Howto in the post file:
        Bug?: file files/etc/default/rcS /etc/defaultrcS mode=0666
        My solution: directory /etc/default
                        file files/etc/default/rcS /etc/default/rcS mode=0666

3. I would like to use ntpq and ntpdc also, but at the moment I have  
no glue how to make or compile them.

4. I would like to use the post file to add more of my application to  
the fimage, for example a small website. I do not understand the  
syntax of the post file and up to now I was not able to find any  
documentation or any other example than yours.
Can anybody give me a link to the relevant documentation?

5. As I understand the history, the original code comes from  
www.ntp.org (with a configure-utility, but without a makefile). Then  
acme-systems people did some configuration and produced the makefile.  
In your HowTo you described how to use the makefile from acme- 
systems. For me it is black magic what the acme-systems people did.  
If I would understand this step, maybe I would be able to use the  
actual version of www.ntp.org and maybe I would be able to activate  
ntpq and ntpdc.
Can anybody explain me the black magic of configuring the NTP package  
for the foxboard?


....................
Thomas

Am 25.12.2006 um 14:04 schrieb kaffbeemer:

>
> After investigation time syncronization I found that ntpdate is  
> probably not the best solution. So I tried to fully implement ntpd.
>
>
> I've done this using SDK Phrozen Patch with glibc and full internet  
> access. It's my first implementation of a package for fox. So  
> probably there might be some enhancements.
>
>
>
> The advantage of using ntpd among other time syncronization  
> mechanisms is its continous adaption to a time server time provided  
> in the internet. The other advantage is that you might not need to  
> add a hardware RTC.
>
>
>
> Download the following files from http://developer.axis.com/ 
> download/contrib/NTP/
>
>
>
> ntp-4.1.1a.tgz
>
> conf_ntp.tgz is not required as it is incomplete.
>
>
>
> Untar ntp-4.1.1a.tgz    at .../devboard*/apps/
>
>
>
> The original package does not strip the binaries and installs  
> libntp.a. This results in a package being too large to fit in an  
> fimage. In order to solve this go to ../devboard*/apps/ntp-4.1.1a
>
> In Makefile change:
>
>
>
> old:
>
> STRIP = strip
>
> new:
>
> STRIP = cris-strip
>
>
>
> Go to ../devboard*/apps/ntp-4.1.1a/libntp
>
> In Makefile comment the install part for libntp.a as it is not  
> required:
>
>
>
> old:
>
> install: $(EXE)
>
> [EMAIL PROTECTED] "Installing $(EXE)"
>
> #chmod ugo+x $(EXE)
>
> $(INSTALL) -d $(INSTDIR)
>
> $(INSTALL) -m $(INSTMODE) -o $(INSTOWNER) -g $(INSTGROUP) $(PROGS) $ 
> (INSTDIR)
>
> new:
>
> install: $(EXE)
>
> [EMAIL PROTECTED] "Installing $(EXE)"
>
> #chmod ugo+x $(EXE)
>
> #$(INSTALL) -d $(INSTDIR)
>
> #$(INSTALL) -m $(INSTMODE) -o $(INSTOWNER) -g $(INSTGROUP) $(PROGS)  
> $(INSTDIR)
>
>
>
> Create file ../devboard*/files/etc/ntp.conf and insert appropriate  
> server addresses from www.pool.ntp.org The location and use of a  
> driftfile which stores the average drift for initialization  
> purposes should be well thought of. I didn't want to locate it on  
> the flash to avoid an early damage of the flash, as the file is  
> continuously written. Instead I start ntpdate before ntpd is  
> started, so the drift at starttime is already very small.
>
>
>
> # /etc/ntp.conf
>
>
>
> server 0.europe.pool.ntp.org
>
> server 1.europe.pool.ntp.org
>
> server 2.europe.pool.ntp.org
>
>
>
> driftfile /var/log/ntp.drift   # remember the drift of the local clock
>
>
>
> Create file ../devboard*/files/etc/init.d/ntpd:
>
>
>
> #!/bin/sh
>
>
>
> . /etc/init.d/functions.sh
>
>
>
> case "$1" in
>
>         start)
>
>                 begin "Starting service ntpd"
>
>                 start_daemon /bin/ntpd
>
>                 ;;
>
>         stop)
>
>                 begin "Shutting down service ntpd"
>
>                 stop_daemon /bin/ntpd
>
>                 ;;
>
>         *)
>
>                 error "Usage: $0 stop | start"
>
>                 ;;
>
> esac
>
>
>
> exit 0
>
>
>
>
>
> Create file ../devboard*/files/etc/init.d/ntpdate:
>
>
>
> #!/bin/sh
>
>
>
> . /etc/init.d/functions.sh
>
>
>
> case "$1" in
>
>         start)
>
>                 begin "Initializing NTP"
>
>             /bin/ntpdate -v ntp.ubuntu.com pool.ntp.org >> /var/log/ 
> ntpdate.out 2>&1
>
>                 ;;
>
>         stop)
>
>                 begin "Nothing to stop"
>
>                 ;;
>
>         *)
>
>                 error "Usage: $0 stop | start"
>
>                 ;;
>
> esac
>
>
>
> exit 0
>
>
>
> Informations about setting the timezone
>
> http://www.debian.org/doc/manuals/system-administrator/ch-sysadmin- 
> time.html
>
>
>
> If you have configured your development linux platform timezone  
> then you can copy the files
>
>             cp /etc/localtime ../devboard*/files/etc/localtime
>
>             cp /etc/timezone ../devboard*/files/etc/timezone
>
>             cp /etc/default/rcS ../devboard*/files/etc/default/rcS
>
>
>
> Otherwise you have to manually edit these files except the  
> localtime. This has to be copied from /usr/share/ 
> zoneinfo….<yourtimezone>
> Be aware of the fact that the ntpd daemon is using UTC to  
> synconize. Thus in rcS utc=yes should be set.
>
>
>
> Create or edit a file named post in ../devboard*/configure-files
>
> Add the following lines:
>
>
>
> sub apps/ntp-4.1.1a
>
> file files/etc/ntp.conf /etc/ntp.conf mode=0666
>
> file files/etc/timezone /etc/timezone mode=0666
>
> file files/etc/localtime /etc/localtime mode=0666
>
> file files/etc/default/rcS /etc/defaultrcS mode=0666
>
>
>
> file files/etc/init.d/ntpdate /etc/init.d/ntpdate mode=0755
>
> symlink ../init.d/ntpdate $prefix/etc/rc3.d/S32ntpdate
>
>
>
> file files/etc/init.d/ntpd /etc/init.d/ntpd mode=0755
>
> symlink ../init.d/ntpd $prefix/etc/rc0.d/K24ntpd
>
> symlink ../init.d/ntpd $prefix/etc/rc1.d/K24ntpd
>
> symlink ../init.d/ntpd $prefix/etc/rc2.d/K24ntpd
>
> symlink ../init.d/ntpd $prefix/etc/rc3.d/S33ntpd
>
> symlink ../init.d/ntpd $prefix/etc/rc6.d/K24ntpd
>
>
>
> Change directory to ../devboard* and
>
>
>
> ./configure
>
> make
>
> ftp 192.168.0.90
>
> put fimage flash_all
>
>
>
> After boot the date and time should be syncronized.
>
>
>
> [EMAIL PROTECTED] /usr]130# date
>
> Mon Dec 25 13:33:27 CET 2006
>
>
>
> Happy Christmas
>
> Klaus
>
>
>
> 



[Non-text portions of this message have been removed]



 
Yahoo! Groups Links

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

<*> Your email settings:
    Individual Email | Traditional

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

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

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

Reply via email to