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
目录
相关文章
|
物联网 Java Linux
Linux安装与配置Eclipse Paho库:实现MQTT通信
Eclipse Paho是一个开源的MQTT(Message Queuing Telemetry Transport)实现,提供了多种编程语言的客户端库,包括C、C++、Java、Python等。在Linux系统中,通过安装和配置Eclipse Paho库,我们可以方便地实现MQTT通信功能。本文将详细介绍在Linux系统中安装和配置Eclipse Paho库的步骤,以便于开发者在物联网项目中使用MQTT协议进行通信。
3040 0
|
5月前
|
人工智能 运维 数据中心
拆解光模块:从传统分立器件到硅光芯片的集成革命
本文揭秘光模块核心构成(TOSA/ROSA、激光器、调制器、探测器、DSP等),对比传统分立器件与硅光集成技术:前者成熟稳定,后者依托CMOS工艺将光器件“刻”入硅芯片,实现高集成、低功耗,但需外置光源。二者按距离、成本互补共存。(239字)
|
11月前
|
弹性计算 网络协议 数据挖掘
阿里云服务器ECS使用抓包工具进行网络数据包抓取(图文教程)
本文介绍2026年阿里云ECS服务器使用抓包工具排查网络异常的方法,涵盖Linux下tcpdump和Windows下Wireshark的安装、配置与抓包操作步骤,并提供具体命令示例及数据分析流程,助力高效定位丢包、延迟等问题。
|
12月前
|
人工智能 自然语言处理 搜索推荐
2025浙江AI数字人TOP厂商评析与重点企业推荐
数字人企业正引领虚拟与现实融合的新浪潮。本文揭秘行业排行榜、技术优势与多元类型,涵盖像衍科技、阿里、华为等领军者,展现其在服务、工业、文旅等领域的广泛应用与未来潜力。
|
12月前
|
小程序 应用服务中间件 Linux
免费试用:阿里云轻量应用服务器200Mbps带宽、2核4G配置,不限流量
阿里云轻量应用服务器现可免费试用1个月,提供2核4G和2核1G两种配置,支持宝塔、WordPress、Docker等镜像,适用于建站、小程序后端及电商独立站。海外多节点可用,点击申请:https://t.aliyun.com/U/DSVQIT 还可领取代金券。
1139 8
|
人工智能 自然语言处理 搜索推荐
声临其境!体验阿里云开源音频基座大模型——FunAudioLLM
阿里通义实验室开源了全新的音频基座大模型FunAudioLLM,包含SenseVoice与CosyVoice两大核心模型。SenseVoice专精于多语言语音识别、情感辨识与声音事件检测,支持50余种语言,中文及粤语识别准确率提升50%以上。CosyVoice则擅长语音合成,只需3-10秒原始音频即可克隆音色,并支持跨语言合成。FunAudioLLM的应用场景广泛,包括语音到语音翻译、情感语音对话、互动播客及有声读物等。CosyVoice的在线体验显示,其生成的语音自然流畅,支持定制化及高级情绪控制,超越竞品ChatTTS。SenseVoice在情感识别及长音频处理方面表现出色。
29763 28
|
算法 安全 大数据
【C/C++ 随机函数行为】深入探索C++中的随机数:std::random_device与rand的行为分析(二)
【C/C++ 随机函数行为】深入探索C++中的随机数:std::random_device与rand的行为分析
765 0
|
Linux 芯片
一篇文章讲明白Linux下控制GPIO的三种方法
一篇文章讲明白Linux下控制GPIO的三种方法
3284 3
|
Web App开发 安全 Linux
FFmpeg开发笔记(二十六)Linux环境安装ZLMediaKit实现视频推流
《FFmpeg开发实战》书中介绍轻量级流媒体服务器MediaMTX,但其功能有限,不适合生产环境。推荐使用国产开源的ZLMediaKit,它支持多种流媒体协议和音视频编码标准。以下是华为欧拉系统下编译安装ZLMediaKit和FFmpeg的步骤,包括更新依赖、下载源码、配置、编译、安装以及启动MediaServer服务。此外,还提供了通过FFmpeg进行RTSP和RTMP推流,并使用VLC播放器拉流的示例。
3314 3
FFmpeg开发笔记(二十六)Linux环境安装ZLMediaKit实现视频推流
|
索引
【Qt 学习笔记】Qt常用控件 | 多元素控件 | List Widget的说明及介绍
【Qt 学习笔记】Qt常用控件 | 多元素控件 | List Widget的说明及介绍
1813 3