1

I am modifying a Yocto .bb recipe file to add and enable 3 systemd services in my image. Below shows the bottom of my recipe file with just two services added and enabled. This works!

app1.service is a one shot basic service that runs once and app2.service waits for app1.service to complete first by using "After=app1.service" in the app2.service file. All this works fine without issues :

FILES_${PN} += "${sysconfdir} \
               ${systemd_unitdir}/system/app1.service \
               ${systemd_unitdir}/system/app2.service \
"
inherit systemd

SYSTEMD_SERVICE_${PN} = "app1.service app2.service"

Now, I add a third service called app3.service as shown below. This service should also wait for app1.service to complete first in the same manner

FILES_${PN} += "${sysconfdir} \
               ${systemd_unitdir}/system/app1.service \
               ${systemd_unitdir}/system/app2.service \
               ${systemd_unitdir}/system/app3.service \

"
inherit systemd

SYSTEMD_SERVICE_${PN} = "app1.service app2.service app3.service"

However, when I start my device, only app3.service runs, with app1.service and app2.service reporting the following as below which tells me that the service is not enabled somehow:

app1.service - app1
Loaded: loaded (/lib/systemd/system/app1.service; disabled; vendor 
preset: enabled)
Active: inactive (dead)

This I cannot understand. I would expect all three services to be enabled because I added them to SYSTEMD_SERVICE_${PN}.

Is there something wrong with adding three services in the manner in which I do in the .bb recipe file? Thanks

Engineer999
  • 1,111
  • 2
  • 15
  • 32

0 Answers0