From c78433d945b3df558d5f5e90a0ee1c9fe2d393a7 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Wed, 20 Aug 2014 23:33:17 +0200 Subject: [PATCH] systemd-compat-units: Add alignment service and replicate others We need to replicate the other services that were included with *.service. Install an additional alignment.service that is required for ARM. The actual service file is from Daniel and copied from the postinst and sysmobts service. --- .../systemd-compat-units/alignment.service | 17 +++++++++++++++++ .../systemd/systemd-compat-units_sysmocom.inc | 18 +++++++++++++++++- 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 recipes-fixes/systemd/systemd-compat-units/alignment.service diff --git a/recipes-fixes/systemd/systemd-compat-units/alignment.service b/recipes-fixes/systemd/systemd-compat-units/alignment.service new file mode 100644 index 0000000..10e13f7 --- /dev/null +++ b/recipes-fixes/systemd/systemd-compat-units/alignment.service @@ -0,0 +1,17 @@ +[Unit] +Description=Handle unaligned access in kernel +DefaultDependencies=no +After=systemd-remount-fs.service systemd-tmpfiles-setup.service tmp.mount +Before=sysinit.target +ConditionPathExists=|/proc/cpu/alignment + +[Service] +Type=oneshot +RemainAfterExit=no +ExecStart=/bin/sh -c 'echo 3 > /proc/cpu/alignment' +StandardOutput=syslog +TimeoutSec=0 + +[Install] +WantedBy=basic.target +WantedBy=sysinit.target diff --git a/recipes-fixes/systemd/systemd-compat-units_sysmocom.inc b/recipes-fixes/systemd/systemd-compat-units_sysmocom.inc index b656e1e..b8e86fe 100644 --- a/recipes-fixes/systemd/systemd-compat-units_sysmocom.inc +++ b/recipes-fixes/systemd/systemd-compat-units_sysmocom.inc @@ -1,5 +1,21 @@ -PRINC="1" +PRINC="2" # We need networking to run as we have no native services yet SYSTEMD_DISABLED_SYSV_SERVICES_remove = "networking" +S_THISDIR := "${@os.path.dirname(bb.data.getVar('FILE', d, True))}" +FILESPATH =. "${@base_set_filespath(["${S_THISDIR}/${PN}"], d)}:" +SRC_URI = "\ + file://machineid.service \ + file://run-postinsts.service \ + file://alignment.service" + + +do_install_append() { + install -d ${D}${systemd_unitdir}/system/basic.target.wants + install -d ${D}${systemd_unitdir}/system/sysinit.target.wants/ + + install -m 0644 ${WORKDIR}/alignment.service ${D}${systemd_unitdir}/system + ln -sf ../alignment.service ${D}${systemd_unitdir}/system/basic.target.wants/ + ln -sf ../alignment.service ${D}${systemd_unitdir}/system/sysinit.target.wants/ +}