Message ID | 20250606064211.3091237-13-jerome.forissier@linaro.org |
---|---|
State | New |
Headers | show |
Series | sntp for NET_LWIP | expand |
On Fri, Jun 06, 2025 at 08:41:48AM +0200, Jerome Forissier wrote: > Fix an error in doc/README.SNTP ("timeoffset") and clarify the > differences between CONFIG_NET=y and CONFIG_NET_LWIP=y. > > Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> > --- > > Changes in v2: > - New patch > > doc/README.SNTP | 23 ++++++++++++++++------- > 1 file changed, 16 insertions(+), 7 deletions(-) Thanks for touching the docs. But, can you please convert this to rst and then update it?
On 6/6/25 16:20, Tom Rini wrote: > On Fri, Jun 06, 2025 at 08:41:48AM +0200, Jerome Forissier wrote: > >> Fix an error in doc/README.SNTP ("timeoffset") and clarify the >> differences between CONFIG_NET=y and CONFIG_NET_LWIP=y. >> >> Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> >> --- >> >> Changes in v2: >> - New patch >> >> doc/README.SNTP | 23 ++++++++++++++++------- >> 1 file changed, 16 insertions(+), 7 deletions(-) > > Thanks for touching the docs. But, can you please convert this to rst > and then update it? OK. I will post a v3 with a new file: doc/usage/cmd/sntp.rst. Thanks,
diff --git a/doc/README.SNTP b/doc/README.SNTP index da9ec459ad4..da68aa318a5 100644 --- a/doc/README.SNTP +++ b/doc/README.SNTP @@ -4,14 +4,23 @@ configuration file of the board. The "sntp" command gets network time from NTP time server and syncronize RTC of the board. This command needs the command line parameter of server's IP address or environment variable -"ntpserverip". The network time is sent as UTC. So if you want to -set local time to RTC, set the offset in second from UTC to the -environment variable "time offset". +"ntpserverip". -If the DHCP server provides time server's IP or time offset, you -don't need to set the above environment variables yourself. +[CONFIG_NET_LWIP=y only] The host name of the NTP server may be +provided instead of its IP address provided that CONFIG_CMD_DNS=y. + +The NTP server address does not need to be given if the DHCP server +provides one. + +The network time is sent as UTC. So if you want to set local time to +RTC, set the offset in second from UTC to the environment variable +"timeoffset". + +[CONFIG_NET=y only] If the DHCP server provides time server's IP +or time offset, you don't need to set the above environment +variables yourself. Current limitations of SNTP support: 1. The roundtrip time is ignored. -2. Only the 1st NTP server IP, in the option ntp-servers of DHCP, will - be used. +2. [CONFIG_NET=y only] Only the 1st NTP server IP, in the option + ntp-servers of DHCP, will be used.
Fix an error in doc/README.SNTP ("timeoffset") and clarify the differences between CONFIG_NET=y and CONFIG_NET_LWIP=y. Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> --- Changes in v2: - New patch doc/README.SNTP | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-)