Buildroot: Respeaker: Change the way of loading seeed-voicecard

- Only mount things if seeed-voicecard is ran
- We can only start things so no need for start-stop-restart init
This commit is contained in:
Peter Steenbergen 2018-11-03 10:59:50 +01:00
parent d6f6c07c12
commit ceecabfe3c
3 changed files with 12 additions and 39 deletions

View File

@ -1,3 +1,8 @@
#!/bin/sh
#
# Load seeed-voicecard modules....
#
modprobe snd-soc-seeed-voicecard
modprobe snd-soc-ac108
modprobe snd-soc-wm8960

View File

@ -1,42 +1,11 @@
#!/bin/sh
#
# seeed-voicecard Starts seeed-voicecard.
# Configure seeed-voicecard....
#
umask 077
start() {
printf "Starting seeed-voicecard: "
mount -t configfs none /sys/kernel/config
/usr/bin/seeed-voicecard
touch /var/lock/seeed-voicecard
echo "OK"
}
stop() {
printf "Stopping seeed-voicecard: "
killall seeed-voicecard
rm -f /var/lock/seeed-voicecard
echo "OK"
}
restart() {
stop
start
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart|reload)
restart
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac
exit $?
echo "Starting seeed-voicecard..."
mount -t configfs none /sys/kernel/config
mkdir -p /boot
mount -t vfat /dev/mmcblk0p1 /boot
/usr/bin/seeed-voicecard
touch /var/lock/seeed-voicecard

View File

@ -1,6 +1,5 @@
# <file system> <mount pt> <type> <options> <dump> <pass>
/dev/root / ext2 rw,noauto 0 1
/dev/mmcblk0p1 /boot vfat defaults 0 2
proc /proc proc defaults 0 0
devpts /dev/pts devpts defaults,gid=5,mode=620,ptmxmode=0666 0 0
tmpfs /dev/shm tmpfs mode=0777 0 0