From c0b44006f45dfe12122967e52d4c15d67fd5b61b Mon Sep 17 00:00:00 2001 From: Sami Nurmenniemi Date: Mon, 22 May 2017 10:18:58 +0300 Subject: Fix failing filesystem check for devices without working RTC Devices without working RTC (or backup battery) forced system time during the boot to the build time of systemd. This interfered with the fsck ability to detect insane system times. As a result the boot time filesystem check failed because last mount time was in the future. Task-number: QTBUG-60587 Change-Id: I4c41a5183d56a6dd29707e5557781f722bd363c1 Reviewed-by: Kari Oikarinen Reviewed-by: Samuli Piippo Reviewed-by: Kari Hormi --- recipes/systemd/systemd_%.bbappend | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/recipes/systemd/systemd_%.bbappend b/recipes/systemd/systemd_%.bbappend index 1ba27fe..96b8910 100644 --- a/recipes/systemd/systemd_%.bbappend +++ b/recipes/systemd/systemd_%.bbappend @@ -34,6 +34,15 @@ SRC_URI += " \ PACKAGECONFIG_append = " networkd" +# By default sytemd uses it's build time as epoch. This causes problems when +# using yocto cache since systemd build time might be more than day older than +# the actual image build time. If that kind of image is booted with a device +# that does not have backup battery for RTC, the first fsck interprets successful +# result as failure because last mount time is in the future. This can be worked +# around by setting TIME_EPOCH to 0, which causes fsck to detect the system time as +# insane and ignore the mount time error. +EXTRA_OECONF_append = " --with-time-epoch=0" + do_install_append() { # remove login from tty1 rm -f ${D}${sysconfdir}/systemd/system/getty.target.wants/getty@tty1.service -- cgit v1.2.3-54-g00ecf