Hello,

I have a problem enabling a simple systemd service.

I need a manual "systemctl enable" once after boot to enable my service.

If anybody has an idea, it would be very cool.

Here are my files.

*distro conf:*

DISTRO_FEATURES:append = " systemd"
DISTRO_FEATURES_BACKFILL_CONSIDERED += "sysvinit"
VIRTUAL-RUNTIME_init_manager = "systemd"
VIRTUAL-RUNTIME_initscripts = "systemd-compat-units"

*schedulingrealtime.bb:*

DESCRIPTION = "Setup a realtime sheduling"
LICENSE = "CLOSED"

inherit systemd
NATIVE_SYSTEMD_SUPPORT = "1"
SYSTEMD_PACKAGES = "${PN}"
SYSTEMD_AUTO_ENABLE = "enable"
SYSTEMD_SERVICE_${PN} = "schedulingrealtime.service"

FILESEXTRAPATHS:prepend := "${THISDIR}:"
SRC_URI = " \
file://schedulingrealtime.service \
"

do_install () {
install -d ${D}${systemd_system_unitdir}

install -m 0755 ${WORKDIR}/schedulingrealtime.service 
${D}${systemd_system_unitdir}
}

FILES:${PN} += "\
${systemd_system_unitdir}/schedulingrealtime.service \

*schedulingrealtime.service*

[Unit]
Description=modify scheduling parameter for realtime threads

[Service]
Type=oneshot
ExecStart=/bin/bash -c "echo -1 > /proc/sys/kernel/sched_rt_runtime_us && echo 
-1 > /proc/sys/kernel/sched_rt_period_us"

[Install]
WantedBy=multi-user.target *
*
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#60681): https://lists.yoctoproject.org/g/yocto/message/60681
Mute This Topic: https://lists.yoctoproject.org/mt/100441626/21656
Mute #kirkstone:https://lists.yoctoproject.org/g/yocto/mutehashtag/kirkstone
Mute #systemd:https://lists.yoctoproject.org/g/yocto/mutehashtag/systemd
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to