summaryrefslogtreecommitdiffstats
path: root/meta/classes/image.bbclass
diff options
context:
space:
mode:
authorAlex Kiernan <alex.kiernan@hivehome.com>2019-05-02 22:09:44 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-05-03 06:11:57 +0100
commit665fd0ae236e2bd57075ce01a920ab6be61527d3 (patch)
tree1b1d42f3a23f3b40f07b9929126c0d5e91de330a /meta/classes/image.bbclass
parent925e30cb104ece7bfa48b78144e758a46dc9ec3f (diff)
downloadpoky-665fd0ae236e2bd57075ce01a920ab6be61527d3.tar.gz
image: call systemctl preset-all for images
Rather than rely on systemd's default invocation of preset-all at runtime, we pre-populate the symlink tree as part of of the image. This is done late so any overrides of presets during rootfs construction should already have happened. Whilst we don't strictly need this for the read-write root case, it avoids boot time churn; for read-only root we have to do it here. (From OE-Core rev: a57678a076109c42fbdf7531e90ff4491b387d53) Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/image.bbclass')
-rw-r--r--meta/classes/image.bbclass9
1 files changed, 8 insertions, 1 deletions
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 276d0d31f4..a23403c082 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -664,6 +664,13 @@ reproducible_final_image_task () {
664 find ${IMAGE_ROOTFS} -exec touch -h --date=@$REPRODUCIBLE_TIMESTAMP_ROOTFS {} \; 664 find ${IMAGE_ROOTFS} -exec touch -h --date=@$REPRODUCIBLE_TIMESTAMP_ROOTFS {} \;
665 fi 665 fi
666} 666}
667IMAGE_PREPROCESS_COMMAND_append = " reproducible_final_image_task; " 667
668IMAGE_EXTRADEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd-systemctl-native', '', d)}"
669
670systemd_preset_all () {
671 systemctl --root="${IMAGE_ROOTFS}" --preset-mode=enable-only preset-all
672}
673
674IMAGE_PREPROCESS_COMMAND_append = " ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd_preset_all;', '', d)} reproducible_final_image_task; "
668 675
669CVE_PRODUCT = "" 676CVE_PRODUCT = ""