I have built Yocto Hardknott imx-5.10.35
https://github.com/varigit/variscite-bsp-platform.git -b fsl-hardknott -m imx-5.10.35-2.0.0-var01.xml
with MACHINE=imx8mp-var-dart DISTRO=fsl-imx-xwayland . var-setup-release.sh -b build_xwayland
image fsl-image-qt5
And I can not add service to autostart.
I write simple script
/opt/App/to_log.sh:
#!/bin/bash
echo log $(date) >> /opt/App/log.txt
And App_launcher.service is
[Unit]
Description=Start App application, restart by request, poweroff from application
#After=graphical.target
#After=weston.service
[Service]
Type=simple
ExecStart=/opt/App/to_log.sh
#ExecStart=/opt/App/App_launcher.sh
[Install]
WantedBy=multi-user.service
App_launcher.service in the /lib/systemd/system/ folder
Then I try to enable service:
~# sudo systemctl daemon-reload
[ 1249.464158] systemd-sysv-generator[1115]: SysV service '/etc/init.d/reboot' lacks a native systemd unit file. Automatically generating a unit file for compatibility. Please update package to include a native systemd unit file, in order to make it more safe and robust.
[ 1249.488415] systemd-sysv-generator[1115]: SysV service '/etc/init.d/save-rtc.sh' lacks a native systemd unit file. Automatically generating a unit file for compatibility. Please update package to include a native systemd unit file, in order to make it more safe and robust.
...(and other services)
~# cat /opt/App/log.txt
log Fri Aug 27 18:53:38 MSK 2021
~# sudo systemctl enable App_launcher
[ 1433.903998] systemd-sysv-generator[1142]: SysV service '/etc/init.d/reboot' lacks a native systemd unit file. Automatically generating a unit file for compatibility. Please update package to include a native systemd unit file, in order to make it more safe and robust.
[ 1433.928120] systemd-sysv-generator[1142]: SysV service '/etc/init.d/save-rtc.sh' lacks a native systemd unit file. Automatically generating a unit file for compatibility. Please update package to include a native systemd unit file, in order to make it more safe and robust.
...(and other services)
~# sudo systemctl status App_launcher
* App.service - Start App application, restart by request, poweroff from application
Loaded: loaded (/lib/systemd/system/App.service; enabled; vendor preset: disabled)
Active: inactive (dead)
Aug 27 18:35:48 imx8mp-var-dart systemd[1]: App.service: Succeeded.
Status is
(... vendor preset: disabled)
Active: inactive (dead)
And I can not set vendor preset to enabled.
After the reboot application does not starts, log.txt does not change.
How can autostart an application?
Any updates on this issue? I am facing a similar issue.