我用TI 的ti-processor-sdk-linux-am335x-evm-05.03.00.07做了一个文件系统,的步骤做了一个开机启动时运行的脚本,但是没有效果。板子重启并没有输出
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
我用TI 的ti-processor-sdk-linux-am335x-evm-05.03.00.07做了一个文件系统,的步骤做了一个开机启动时运行的脚本,但是没有效果。板子重启并没有输出
(1)我进入到system目录
root@am335x-evm:~# cd /lib/systemd/system
(2)新建一个start_task.service
root@am335x-evm:/lib/systemd/system# vi start_task.service
(3)start_task.service内容如下:
[Unit]
Description=start user task service
After=network.target
[Service]
ExecStart=/usr/ubin/start_task
[Install]
WantedBy=multi-user.target
(4)设置开机启动服务
systemctl daemon-reload
systemctl enable start_task.service
systemctl start start_task.service
(5)在/usr/ubin新建start_task文件
root@am335x-evm:/usr/ubin# vi start_task
(6)start_task文件内容如下
#!/bin/sh
echo ""
echo "Hello from Sitara!!!"
echo ""
(7)更改权限chmod +x start_task
(8)板子重新上电,并没有输出"Hello from Sitara!!!"信息。0702.YYY - 副本.log
参考这个帖子看看:blog.csdn.net/.../75043945