2 Star 0 Fork 0

科艺创想/WM8960-Audio-HAT

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
uninstall.sh 1.27 KB
一键复制 编辑 原始数据 按行查看 历史
waveshare 提交于 2019-05-24 06:29 +08:00 . 190524
#!/bin/bash
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root (use sudo)" 1>&2
exit 1
fi
is_Raspberry=$(cat /proc/device-tree/model | awk '{print $1}')
if [ "x${is_Raspberry}" != "xRaspberry" ] ; then
echo "Sorry, this drivers only works on raspberry pi"
exit 1
fi
uname_r=$(uname -r)
echo "remove dtbos"
rm /boot/overlays/wm8960-soundcard.dtbo || true
sed -i '/dtoverlay=wm8960-soundcard/d' /boot/config.txt
echo "remove alsa configs"
rm -rf /etc/wm8960-soundcard/ || true
echo "disabled service "
systemctl disable wm8960-soundcard.service
echo "remove wm8960-soundcard"
rm /usr/bin/wm8960-soundcard || true
rm /lib/systemd/system/wm8960-soundcard.service || true
echo "remove dkms"
dkms remove wm8960-soundcard/1.0 --all
rm -rf /var/lib/dkms/wm8960-soundcard || true
echo "remove kernel modules"
rm /lib/modules/${uname_r}/kernel/sound/soc/codecs/snd-soc-wm8960.ko || true
rm /lib/modules/${uname_r}/kernel/sound/soc/codecs/snd-soc-wm8960-soundcard.ko || true
sed -i '/snd-soc-wm8960/d' /etc/modules
sed -i '/snd-soc-wm8960-soundcard/d' /etc/modules
echo "------------------------------------------------------"
echo "Please reboot your raspberry pi to apply all settings"
echo "Thank you!"
echo "------------------------------------------------------"
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/kxdev/WM8960-Audio-HAT.git
git@gitee.com:kxdev/WM8960-Audio-HAT.git
kxdev
WM8960-Audio-HAT
WM8960-Audio-HAT
master

搜索帮助