如何基于AM437x开发板上电自动运行程序

2018年05月17日 14:50    发布者:zhiwing
本次经验基于创龙TL437x-IDK开发板,对上电动运行程序进行步骤分析,希望能帮助大家~创龙TL437x-IDK开发板基于TI AM4379 ARM Cortex-A9 CPU,主频高达1GHz,低功耗DDR3L,这里就不细说,可自百度搜索,图片如下:进入主题,步骤如下:将可执行文件helloworld复制到开发板文件系统"/home/root/"目录下。进入开发板系统,在"/lib/systemd/system/"目录下新建和可执行文件名对应的service文件,比如helloworld.service。 Target#        cd /lib/systemd/system/ Target#        vi helloworld.service  service文件添加如下代码: Description=helloworld           //可执行文件名称,请根据实际情况修改 After=basic.service X.service thermal-zone-init.service Environment=DISPLAY=0:0 ExecStartPre=/bin/echo "****Start to run myscript.service****" ExecStart=/home/root/helloworld        //可执行文件路径,请根据实际情况修改 StandardOutput=tty KillMode=process KillSignal=SIGKILL SendSIGKILL=yes WantedBy=multi-user.target输入以下命令使能该服务:Target#        systemctl -f enable /lib/systemd/system/helloworld.service  重启开发板后可看到helloworld程序已经自动启动