diff options
author | Gaël PORTAY <gael.portay+rtone@gmail.com> | 2024-11-12 20:22:14 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-11-19 11:26:24 +0000 |
commit | 7c03445fb79f812c3f5acc9b7bbc35f5b306e888 (patch) | |
tree | 89402eade41b7fdd293903eb4f35b687b55abe1f /scripts/contrib/patchreview.py | |
parent | b6f5bc7bc79cec7b0adc1b1540d9f43e015241f7 (diff) | |
download | poky-7c03445fb79f812c3f5acc9b7bbc35f5b306e888.tar.gz |
systemd: set better sane time at startup
When systemd is started, it sets the system clock to epoch to ensure the
system clock is reasonably initialized if no working RTC.
As init process, systemd sets epoch very early to the more recent
timestamp of[1]:
- the build time of systemd (-Dtime-epoch)
- the modification time ("mtime") of /var/lib/systemd/timesync/clock
(systemd-timesyncd)
- the modification time ("mtime") of /usr/lib/clock-epoch (systemd)
The first epoch timestamp is hard-coded at build-time by the systemd
recipe (using either SOURCE_DATE_EPOCH, git-tag, or NEWS modification
time[2]).
The second epoch timestamp is maintained at run-time if the system runs
systemd-timesyncd.
This implements the third epoch timestamp at image build-time, by
touching the timestamp file /usr/lib/clock-epoch from the package
post-install script.
[1]: https://github.com/systemd/systemd/commit/863098fdc9cd91e4f760085356ac02c4b7ba6df1
[2]: https://github.com/systemd/systemd/blob/v256/meson.build#L804-L825
(From OE-Core rev: 0f51fee4a5408c17cbaf827053f13d6c3b9dbc2c)
Signed-off-by: Gaël PORTAY <gael.portay+rtone@gmail.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/contrib/patchreview.py')
0 files changed, 0 insertions, 0 deletions