[PATCH v2 0/2] rtc: provide an emulated RTC

Heinrich Schuchardt xypron.glpk at gmx.de
Sun Oct 25 08:13:14 CET 2020


On a board without hardware clock this software real time clock can be
used. The build time is used to initialize the RTC. So you will have
to adjust the time either manually using the 'date' command  or use
the 'sntp' to update the RTC with the time from a network time server.
See CONFIG_CMD_SNTP and CONFIG_BOOTP_NTPSERVER. The RTC time is
advanced according to CPU ticks.

v2:
	more elaborate Kconfig message
	adjust device name properties
	use build time as initial time

Heinrich Schuchardt (2):
  Makefile: provide constant with seconds since epoch
  rtc: provide an emulated RTC

 MAINTAINERS            |  1 +
 Makefile               |  2 ++
 drivers/rtc/Kconfig    | 11 ++++++
 drivers/rtc/Makefile   |  1 +
 drivers/rtc/emul_rtc.c | 80 ++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 95 insertions(+)
 create mode 100644 drivers/rtc/emul_rtc.c

--
2.28.0



More information about the U-Boot mailing list