Emo At Boot Time - ICP DAS USA LinPAC-2841 Series User Manual

Implement industry control with linux technique
Table of Contents

Advertisement

3.2
Execute Demo at Boot Time
User can refer to below steps to auto-execute demo "helloworld" at boot time.
1. Copy SDK demo " lp2841-imx8mm-sdk/examples/common/helloworld" to "/usr/sbin"
2. Create script file in "/etc/init.d"
User can use "vi" command to create the script file in "/etc/init.d" and add below script language
to the file.
root@icpdas:~#
vi /lib/systemd/system/helloworld.service
[Unit]
Description=Run demo "helloworld" at boottime
[Service]
Type=oneshot
ExecStart=/usr/sbin/helloworld
[Install]
WantedBy=multi-user.target
3. Use "systemctl" command to add the script "helloworld.service" automatically.
root@icpdas:~#
systemctl enable helloworld.service
4. After setting the file, the LP-2841 will execute binary "helloworld" at boot time
LinPAC-2841 Series User Manual
Version 1.0
page: 14

Advertisement

Table of Contents
loading

This manual is also suitable for:

Linpac lp-2841m

Table of Contents