/********************************************************************** * buildroot NTP Network clock synchronization * Description: * File system requires network clock synchronization, so use NTP to do this thing. * 2016-12-1 Shenzhen Nanshan Ping Shan village Zengjianfeng ************************************************************** *******/First, buildroot configuration:1. TimeZone: ┌─────────────────────────system configuration──────────────────────────┐│arrow Keys navigate the Menu. <Enter> selects submenus--->(or Empty││submenus----). Highlighted letters is hotkeys. Pressing <Y>││selectes a feature, while<N>Would exclude a feature. Press││<Esc><Esc> to exit, <?> forHelp, </> forSearch. Legend: [*] feature││┌────^(-) ─────────────────────────────────────────────────────────────┐│││[*] Purge unwanted locales││││ (C en_us) locales to keep ││││ () Generate locale data││ ││[*] Install timezone info││││ (default) TimeZone list││││ (ETC/UTC)defaultlocal time││││ () Path to the users tables ││││ () Root filesystem Overlay directories││││ () Cust Om scripts to run before creating filesystem images││││ () Custom scripts to run inside the Fakeroot E Nvironment│││└────┴ (+) ─────────────────────────────────────────────────────────────┘│ ├─────────────────────────────────────────────────────────────────────────┤│<Select> < Exit > < Help > < Save > < Load >│└─────────────────────────────────────────────────────────────────────────┘2. Ntpdate command: ┌────────────────────────networking applications────────────────────────┐│arrow keys Navig Ate the menu. <Enter> selects submenus--->(or Empty││submenus----). Highlighted letters is hotkeys. Pressing <Y>││selectes a feature, while<N>Would exclude a feature. Press││<Esc><Esc> to exit, <?> forHelp, </> forSearch. Legend: [*] feature││┌────^(-) ─────────────────────────────────────────────────────────────┐│││[] Noip ││││[*] ntp││││[) SNTP ││││[] NTP-keygen││││[] SHM clock support ││││[] ntpd││││[ *] ntpdate││││[] NTPDC ││││[] Ntpq││ ││[] Ntpsnmpd│││└────┴ (+) ─────────────────────────────────────────────────────────────┘│ ├─────────────────────────────────────────────────────────────────────────┤│<Select> < Exit > < Help > < Save > < Load >│└─────────────────────────────────────────────────────────────────────────┘ Second, execute the order [email p Rotected]/etc]# cp/usr/share/zoneinfo/asia/shanghai/etc/localtime [[email protected]/etc]# cat timezone Asia/Shanghai [[email protected]/etc]# ntpdate us.pool.ntp.org1Dec A:Geneva: -ntpdate[2437]: Adjust time server204.9.54.119Offset0.009610sec [[email protected]/etc]#
BuildRoot NTP Network clock synchronization