hi,NXP expert:
we are developping an application based on i.MX8MQEVK board. and we want to make this application auto-started along with linux booting. below is our doings we have done now:
1.follow the Yocto guide to build a embedded linux image(fsl-image-validation-imx,DISTRO=fsl-imx-wayland) based on i.MX8MQEVK successfully.
2.build a new service file(myapp.service) in dir of /ect/systemd/system , which will call a shell script to startup our GUI application based gtk+ with wayland backend.
3.use systemctl command to enable it (systemctl enable myapp.service)
4.poweroff and re-poweron,to check the status of myapp.service.
the power-on boot process run our myapp.service , but failed with error info : code=exited status=1/Failure. and we try to find the cause, it seem that when our application execute the lib func of gtk_init(), out application exits. but if we start our application by manual (click to start a weston-terminal, and type to start our application by shell cmd line in the started weston-terminal), our application can run successfully and, everything is OK.
so , could you please give us some advice about how to setup an auto-startup service which will start a GUI application based on gtk+ with wayland backend on i.MX8MQ evk?
thanks.
已解决! 转到解答。