代码拉取完成,页面将自动刷新
#!/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 "------------------------------------------------------"
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。