分类: LINUX
2009-05-23 10:44:34
从ntp官方网站下载一个ntp-4.2.4p4.tar.gz
解压 tar zvxf ntp-4.2.4p4.tar.gz
cd ntp-4.2.4p4
[root@localhost ntp-4.2.4p4]# ls
aclocal.m4 config.h.in include missing README.refclocks
adjtimed config.log INSTALL NEWS README.versions
arlib config.status install-sh NOTES.y2kfixes readme.y2kfixes
bincheck.mf config.sub kernel ntpd results.y2kfixes
bootstrap config.txt libisc ntpdate scripts
build configure libntp ntpdc sntp
ChangeLog configure.ac libopts ntpq stamp-h1
clockstuff COPYRIGHT libparse packageinfo.sh TODO
CommitLog depcomp libtool parseutil util
CommitLog-4.1.0 dot.emacs ltmain.sh ports version
compile ElectricFence m4 README version.m4
conf excludes Makefile README.bk WHERE-TO-START
config.guess flock-build Makefile.am README.hackers
config.h html Makefile.in README.patches
[root@localhost ntp-4.2.4p4]#
文档为html的文件夹,可以参考
[root@localhost ntp-4.2.4p4]# ./configure --prefix=/home/nfs/ntp --exec-prefix=/home/nfs/ntp --host=arm-linux
[root@localhost ntp-4.2.4p4]# make CC=/usr/local/arm/3.4.1/bin/arm-linux-gcc
注意我采用2.95.3结果出现错误,然后用3.4.1的
[root@localhost ntp-4.2.4p4]# make install
[root@localhost ntp]# ls
bin lib man
[root@localhost bin]# ls
ntpd ntpdc ntpq ntptrace sntp
ntpdate ntp-keygen ntptime ntp-wait tickadj
[root@localhost bin]#
然后上面的bin,lib文件copy到开发上
然后ntp的配置,可以参考主机的 /etc/ntp.conf
ntpdate 209.81.9.7
调整开发板的时间
然后启动ntpd服务