Now there should be a second systemd service bar.service which shall only be installed when the package foo-dev is added to the image. But this service should not be activated automatically.
Hi, I’m the Toradex AI Assistant. The Toradex Support team will follow up with you shortly!
Did you like my answer?
Hello Markus,
To address the issue with your Yocto recipe where bar.service is not being installed as part of the foo-dev package, please follow these steps:
Verify File Location: Ensure bar.service is in the correct directory within your layer, ideally alongside foo.service, or ensure it is correctly referenced in your SRC_URI.
Correct SRC_URI Syntax: Modify the syntax for appending to SRC_URI. Instead of SRC_URI:{PN}-dev += "file://bar.service", use:
SRC_URI_append_${PN}-dev = " file://bar.service"
Note the use of _append and the space before file://bar.service.
Ensure File is Packaged: Confirm that bar.service is included in the foo-dev package by checking the do_package task logs.
Check SYSTEMD_SERVICE Variable: Verify that SYSTEMD_SERVICE:${PN}-dev is set to bar.service, ensuring the build system looks for it in the foo-dev package.
Disable Auto-Enable: You have correctly set SYSTEMD_AUTO_ENABLE:${PN}-dev = "disable", which should prevent bar.service from being enabled by default.
Rebuild the Image: After making these changes, clean and rebuild your image to apply all modifications:
By following these steps, bar.service should be included in the foo-dev package and installed in the root filesystem when the package is added to the image. If issues persist, double-check the file paths and ensure all syntax is correct in your recipe.
Best regards,
Toradex AI Assistant
Please, also check if these links can help you solve your problem:
I’m not a Yocto expert (and most of our team is busy attending Embedded World right now!), but looking into some recipes that we have in the layers, I have an idea that this might work: