Hi @yipingwang ,
As per your reply i go through below link :
https://linuxconfig.org/how-to-run-script-on-startup-on-ubuntu-22-04-jammy-jellyfish-server-desktop
and did below things to enable autoboot of application.
1.Created autoboot.sh script file under flexbuild_lsdk2012/packages/rfs/initrd/YoctoRfsTiny/etc/systemd/system directory and wrote below script in autoboot.sh:
--------------------------------------------------------
[Unit]
After=network.target
[Service]
ExecStart=/flexbuild_lsdk2012/packages/rfs/initrd/YoctoRfsTiny/etc/init.d/autoboot_sms.sh
[Install]
WantedBy=default.target
---------------------------------------------------------
2.Created autoboot_sms.sh file in /flexbuild_lsdk2012/packages/rfs/initrd/YoctoRfsTiny/etc/init.d/ to run the application and written below things inside autoboot_sms.sh:
--------------------------------------------------
#!/bin/bash
echo "*******Auto-Boot Enable****************"
User=root
PATH:/usr/sbin
chmod a+x /usr/sbin/SMSAppV0p4
cd /usr/sbin/
./SMSAppV0p4 &
----------------------------------------------------
3.Change the file permissions for both, the Systemd service unit and script::
sudo chmod 777 rfs/initrd/YoctoRfsTiny/etc/systemd/system/autoboot.sh
sudo chmod 777 rfs/initrd/YoctoRfsTiny/etc/init.d/autoboot_sms.sh
4.enable the service unit:
sudo systemctl daemon-reload
sudo systemctl enable autoboot_sms.sh
After this changes i generated linux images and loaded in board and observed that no script is getting executed so no echo print was observed.
But manually when i executed this script ,application was running.
Apart from this i have also created script in etc/rcS.d, etc/rc5.d, and etc/profile and added print using echo command but after loading i did not observed any prints.
Where i am doing wrong ??
Why any script under RFS is not getting executed??
Regards,
Amit Keshri