Buildroot: Initial start of the respeaker package

- Download latest code from github
- Compile and install kernel modules
- Init script to load the modules
- Copy over all overlays and configuration files
- Init script to start seeed-voicecard bash script

< ... This now needs testing ... >
This commit is contained in:
Peter Steenbergen 2018-11-02 17:07:53 +01:00
parent 9cad1ffb89
commit 69521b374f
7 changed files with 97 additions and 1 deletions

View File

@ -1,4 +1,4 @@
menu "Additional libraries and applications"
menu "Additional drivers, libraries and/or applications"
source "$BR2_EXTERNAL_MYCROFTOS_PATH/package/fann/Config.in"
source "$BR2_EXTERNAL_MYCROFTOS_PATH/package/respeaker/Config.in"
endmenu

View File

@ -24,3 +24,8 @@ dtparam=audio=on
# Disable rainbow color splash
disable_splash=1
# Enable some optional hardware interfaces
dtparam=i2c_arm=on
dtoverlay=i2s-mmap
dtparam=i2s=on

View File

@ -0,0 +1,14 @@
config BR2_PACKAGE_RESPEAKER
bool "respeaker"
help
The ReSpeaker series is a family of
development boards designed to enable
a future where voice interface is part
of everyday human-device interaction.
Designed to be easily integrated (and
customized) into products, but also to
allow other services and products to be
easily integrated into it.
https://respeaker.io/

View File

@ -0,0 +1,3 @@
snd-soc-seeed-voicecard
snd-soc-ac108
snd-soc-wm8960

View File

@ -0,0 +1,41 @@
#!/bin/sh
#
# seeed-voicecard Starts seeed-voicecard.
#
umask 077
start() {
printf "Starting seeed-voicecard: "
/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 $?

View File

@ -0,0 +1,2 @@
# Locally computed
sha256 9f38d832acbfc7f07a58f15222d2fdcc0a9215ede488ccafb5c89a3e8223883d respeaker-be0812c70be29b0666a89f22a9d403cfb4c48fca.tar.gz

View File

@ -0,0 +1,31 @@
################################################################################
#
# respeaker
#
################################################################################
RESPEAKER_VERSION = be0812c70be29b0666a89f22a9d403cfb4c48fca
RESPEAKER_SITE = $(call github,respeaker,seeed-voicecard,$(RESPEAKER_VERSION))
RESPEAKER_LICENSE = GNU General Public License v3.0
RESPEAKER_DEPENDENCIES = rpi-firmware
$(eval $(kernel-module))
define RESPEAKER_INSTALL_TARGET_CMDS
$(INSTALL) -D -m 0755 $(BR2_EXTERNAL_MYCROFTOS_PATH)/package/respeaker/S16respeaker_modules \
$(TARGET_DIR)/etc/init.d/S16respeaker_modules
$(INSTALL) -D -m 0755 $(BR2_EXTERNAL_MYCROFTOS_PATH)/package/respeaker/S60seeed_voicecard \
$(TARGET_DIR)/etc/init.d/S60seeed_voicecard
mkdir -p $(TARGET_DIR)/etc/voicecard
rm $(@D)/dkms.conf
$(INSTALL) -D -m 0644 $(@D)/*.conf $(TARGET_DIR)/etc/voicecard
$(INSTALL) -D -m 0644 $(@D)/*.state $(TARGET_DIR)/etc/voicecard
$(INSTALL) -D -m 0755 $(@D)/seeed-voicecard $(TARGET_DIR)/usr/bin
$(INSTALL) -D -m 0644 $(@D)/seeed-2mic-voicecard.dtbo $(BINARIES_DIR)/rpi-firmware/overlays/
$(INSTALL) -D -m 0644 $(@D)/seeed-4mic-voicecard.dtbo $(BINARIES_DIR)/rpi-firmware/overlays/
$(INSTALL) -D -m 0644 $(@D)/seeed-8mic-voicecard.dtbo $(BINARIES_DIR)/rpi-firmware/overlays/
endef
$(eval $(generic-package))