[PATCH v2 12/13] Update doc/README.SNTP

Jerome Forissier jerome.forissier at linaro.org
Fri Jun 6 08:41:48 CEST 2025


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 at linaro.org>
---

Changes in v2:
- New patch

 doc/README.SNTP | 23 ++++++++++++++++-------
 1 file changed, 16 insertions(+), 7 deletions(-)

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.
-- 
2.43.0



More information about the U-Boot mailing list