复制代码
写了个helloworld的服务,主要完成安装驱动,启动应用两个功能,应用就打印了**********hello world ***,直接运行sh没有问题,如果开机启动后,驱动安装可以,应用没有运行?
- root@ok5718-idk:~# pwd
- /home/root
- root@ok5718-idk:~# ls
- helloworld.sh mygpio567.ko read7606
- root@ok5718-idk:~# ./helloworld.sh
- [ 127.859672] my_gpio_init.
- [ 127.864383] Register MyGPIO platform_driver init.
- [ 127.869856] MyGPIO Probe.
- [ 127.877487] mygpio56 {
- [ 127.879865] pinctrl-names = " default " ;
- [ 127.889525] pinctrl-0 = " " ;
- [ 127.894133] mygpio568 {
- [ 127.897377] label = " mygpio569 " ;
- [ 127.903134] interrupt-parent = < c0395d80 c0395b88 ef2866e0 > ;
- [ 127.909865] };
- [ 127.909865] };
- [ 127.916089] pwm-fan pwm_fan: Could not get PWM
- **********hello world ***
- root@ok5718-idk:~#
- root@ok5718-idk:~# cat helloworld.sh
- #!/bin/bash
- cd /home/root/
- insmod mygpio567.ko
- sleep 3
- ./read7606
- root@ok5718-idk:~#