SYSTEMD_SERVICE_${PN} should just be set to the service name, not the full
path. So…
SYSTEMD_SERVICE_${PN} = "[email protected]"
Also, consider using ${systemd_system_unitdir} instead of
${systemd_unitdir}/system
Cheers!
-Sean McKay
From: [email protected] <[email protected]> On Behalf Of
Paul Wicks
Sent: Monday, February 8, 2021 5:44 PM
To: [email protected]
Subject: [yocto] Install systemd unit file into image from source?
I've got an application that I'd like to install into my custom image and that
application has a couple of associated systemd unit files that should be
installed as well. The application itself is a very simple cmake project. The
relevant bits of the recipe file look something like this:
```
<standard variables go here>
SRC_URI = "<git address goes here>"
S = "${WORKDIR}/git"
inherit systemd
SYSTEMD_AUTO_ENABLE = "enable"
# the service files are stored in the git repository in the misc folder
SYSTEMD_SERVICE_${PN} = "${S}/misc/[email protected]
${S}/misc/[email protected]<mailto:$%7bS%7d/misc/[email protected]%20$%7bS%7d/misc/[email protected]>"
do_install_append() {
install -d ${D}${systemd_unitdir}/system
install -m 0644
${S}/misc/[email protected]<mailto:$%7bS%7d/misc/[email protected]>
${D}${systemd_unitdir}/system/
install -m 0644
${S}/misc/[email protected]<mailto:$%7bS%7d/misc/[email protected]>
${D}${systemd_unitdir}/system/
}
inherit cmake
```
When i try to do do `bitbake testapp` to try out the recipe, I get an error
telling me that: SYSTEMD_SERVICE_testapp value
/projects/poky/build/tmp/work/core2-64-poky-linux/testapp/0.1-r0/git/misc/[email protected]
does not exist.
I'm using yocto 3.2.1 if that matters.
-Paul Wicks
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#52273): https://lists.yoctoproject.org/g/yocto/message/52273
Mute This Topic: https://lists.yoctoproject.org/mt/80494654/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-