rock rv1126buildroot增加ntp过程

简介: rock rv1126buildroot增加ntp过程

1 在buildroot中添加

切换到rv1126_rv1109_20210616/buildroot/output/rockchip_rv1126_rv1109$

make ntp-reconfigure
make ntp-rebuild

这里就会把ntpd 安装到target 文件系统里面

然后再上层路径使用build.sh 生产update.img 重新将这个写入到板子上

开启系统后

修改配置文件/etc/ntp.conf


         

修改时区为上海

cp -f /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

手动启动

ntpd -g

在ntp服务端 使用抓包查看

tcpdump port 123 -vvv

问题解决

更新时间宽度过大时只允许修改一次

这个是ntpd -g 这个参数指定的 原文是

ntpd - NTP daemon program - Ver. 4.2.8p10
Usage:  ntpd [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \
    [ <server1> ... <serverN> ]
  Flg Arg Option-Name    Description
   -4 no  ipv4           Force IPv4 DNS name resolution
        - prohibits the option 'ipv6'
   -6 no  ipv6           Force IPv6 DNS name resolution
        - prohibits the option 'ipv4'
   -a no  authreq        Require crypto authentication
        - prohibits the option 'authnoreq'
   -A no  authnoreq      Do not require crypto authentication
        - prohibits the option 'authreq'
   -b no  bcastsync      Allow us to sync to broadcast servers
   -c Str configfile     configuration file name
   -d no  debug-level    Increase debug verbosity level
        - may appear multiple times
   -D Num set-debug-level Set the debug verbosity level
        - may appear multiple times
   -f Str driftfile      frequency drift file name
   -g no  panicgate      Allow the first adjustment to be Big
        - may appear multiple times
   -G no  force-step-once Step any initial offset correction.
   -i --- jaildir        built without --enable-clockctl or --enable-linuxcaps or --enable-solarisprivs
   -I Str interface      Listen on an interface name or address
        - may appear multiple times
   -k Str keyfile        path to symmetric keys
   -l Str logfile        path to the log file
   -L no  novirtualips   Do not listen to virtual interfaces
   -n no  nofork         Do not fork
        - prohibits the option 'wait-sync'
   -N no  nice           Run at high priority
   -p Str pidfile        path to the PID file
   -P Num priority       Process priority
   -q no  quit           Set the time and quit
        - prohibits these options:
        saveconfigquit
        wait-sync
   -r Str propagationdelay Broadcast/propagation delay
      Str saveconfigquit Save parsed configuration and quit
        - prohibits these options:
        quit
        wait-sync
   -s Str statsdir       Statistics file location
   -t Str trustedkey     Trusted key number
        - may appear multiple times
   -u --- user           built without --enable-clockctl or --enable-linuxcaps or --enable-solarisprivs
   -U Num updateinterval interval in seconds between scans for new or dropped interfaces
      Str var            make ARG an ntp variable (RW)
        - may appear multiple times
      Str dvar           make ARG an ntp variable (RW|DEF)
        - may appear multiple times
   -w Num wait-sync      Seconds to wait for first clock sync
        - prohibits these options:
        nofork
        quit
        saveconfigquit
   -x no  slew           Slew up to 600 seconds
   -m no  mdns           Register with mDNS as a NTP server
      opt version        output version information and exit
   -? no  help           display extended usage information and exit
   -! no  more-help      extended usage information passed thru pager
Options are specified by doubled hyphens and their name or by a single
hyphen and the flag character.
The following option preset mechanisms are supported:
 - examining environment variables named NTPD_*
Please send bug reports to:  <http://bugs.ntp.org, bugs@ntp.org>

在 /etc/init.d/S49ntp 这个可执行文件

/etc/init.d/S49ntp stop
/etc/init.d/S49ntp start

即可在不关机重启的状态下更新系统时间

2 手动将可执行文件拷贝进去

在别得地方交叉编译好的可执行文件ntpd

S49ntp启动文件

分别拷贝到

  • /usr/sbin/ntpd
  • /ec/init.d/S49ntp
目录
相关文章
|
Android开发 异构计算
屏蔽开机的android_kernel_log信息----&gt;lk.bin
最近在开机加一些自己的测试程序,编译的是eng版本,希望安卓开机后能够看到自己的调试信息,可是一开机就会有很多其它的信息干扰我的调试,那么如何屏蔽掉kernel的kmsg打印的这些信息呢? 很简单,我们找到以下这个文件: 在我的源码目录下:MT8127_M0_MP8_0407_BK\bootable\lk\app\mt_boot\mt_boot.
1174 0
Devexpress VCL Build v2014 vol 15.2.3 发布
2016年第一个版本,继续修补。 New Major Features in 15.2 What's New in VCL Products 15.2 Breaking Changes To learn about breaking changes in this version, ple...
1147 0
Devexpress VCL Build v2015 vol 15.2 开始测试
增加了几个小玩意,与大版本变化根本无法匹配。   具体可以官网了解 https://www.devexpress.com/Subscriptions/New-2015.xml?product=vcl
882 0
|
Shell Windows 数据格式
Devexpress VCL Build v2015 vol 15.1.2发布
2015年马上过半年了。终于第一个大版出来了。 What's New in 15.1.2 (VCL Product Line)   New Major Features in 15.1 What's New in VCL Products 15.
969 0
Devexpress VCL Build v2014 vol 14.2.7发布
2015年马上快过去一半了,这个玩意还在纠结在14版。其实也无所谓,反正就是改成15版,也还是这些 东西的修补。 What's New in 14.2.7 (VCL Product Line)   New Major Features in 14.
1155 0
|
容器
Devexpress VCL Build v2014 vol 14.2.6 发布
终于支持XE8 了。需要这么长时间吗? New Major Features in 14.2 What's New in VCL Products 14.2 Feature Highlights To learn about feature highlights in this versio...
1034 0
|
OLAP
Devexpress VCL Build v2014 vol 14.2.5 发布
和xe8 几乎同一天出来,但是目前官方不支持xe8. The following sections list all minor and major changes in DevExpress VCL 14.
1297 0
|
OLAP Shell
Devexpress VCL Build v2014 vol 14.2.4 发布
What's New in 14.2.4 (VCL Product Line)   New Major Features in 14.2 What's New in VCL Products 14.
1038 0
|
Unix
zzbank oneOpencloud Env linuxaix6.1 interactiveMaintain(nfs,aix genintall基于系统iso光盘,aix6.1 puppet-Agent,Cent6.4 puppetServer,agent time no syn case Er)
1,puppet--server,Client,Agent time no syn case eror puppet agent --server frontend -terr: Could not request certificate: execution expiredExiting; fa...
1032 0
|
Windows
Devexpress VCL Build v2013 vol 14.1.5 发布
What's New in 14.1.5 (VCL Product Line)   New Major Features in 14.1 What's New in VCL Products 14.
1357 0