diff options
author | Sami Nurmenniemi <sami.nurmenniemi@qt.io> | 2017-05-22 10:18:58 +0300 |
---|---|---|
committer | Samuli Piippo <samuli.piippo@qt.io> | 2017-05-22 19:48:43 +0000 |
commit | c0b44006f45dfe12122967e52d4c15d67fd5b61b (patch) | |
tree | cd89274e3f5743f3c40017ed9a3aa5c8c4e53923 | |
parent | 29eec9e5acfd711572bb74863f4588a9be4a0ecc (diff) | |
download | meta-boot2qt-c0b44006f45dfe12122967e52d4c15d67fd5b61b.tar.gz |
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 <kari.oikarinen@qt.io>
Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
Reviewed-by: Kari Hormi <kari.hormi@qt.io>
-rw-r--r-- | recipes/systemd/systemd_%.bbappend | 9 |
1 files changed, 9 insertions, 0 deletions
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 += " \ | |||
34 | 34 | ||
35 | PACKAGECONFIG_append = " networkd" | 35 | PACKAGECONFIG_append = " networkd" |
36 | 36 | ||
37 | # By default sytemd uses it's build time as epoch. This causes problems when | ||
38 | # using yocto cache since systemd build time might be more than day older than | ||
39 | # the actual image build time. If that kind of image is booted with a device | ||
40 | # that does not have backup battery for RTC, the first fsck interprets successful | ||
41 | # result as failure because last mount time is in the future. This can be worked | ||
42 | # around by setting TIME_EPOCH to 0, which causes fsck to detect the system time as | ||
43 | # insane and ignore the mount time error. | ||
44 | EXTRA_OECONF_append = " --with-time-epoch=0" | ||
45 | |||
37 | do_install_append() { | 46 | do_install_append() { |
38 | # remove login from tty1 | 47 | # remove login from tty1 |
39 | rm -f ${D}${sysconfdir}/systemd/system/getty.target.wants/getty@tty1.service | 48 | rm -f ${D}${sysconfdir}/systemd/system/getty.target.wants/getty@tty1.service |