Fix /boot/config.txt for bookworm installs
This commit is contained in:
parent
4ab8158c18
commit
58082f3fe8
2 changed files with 7 additions and 5 deletions
|
@ -26,7 +26,7 @@ fi
|
||||||
|
|
||||||
#
|
#
|
||||||
# make sure that we are on something ARM/Raspberry related
|
# make sure that we are on something ARM/Raspberry related
|
||||||
# either a bare metal Raspberry or a qemu session with
|
# either a bare metal Raspberry or a qemu session with
|
||||||
# Raspberry stuff available
|
# Raspberry stuff available
|
||||||
# - check for /boot/overlays
|
# - check for /boot/overlays
|
||||||
# - dtparam and dtoverlay is available
|
# - dtparam and dtoverlay is available
|
||||||
|
@ -107,7 +107,7 @@ which apt &>/dev/null
|
||||||
if [[ $? -eq 0 ]]; then
|
if [[ $? -eq 0 ]]; then
|
||||||
apt update -y
|
apt update -y
|
||||||
# Raspbian kernel packages
|
# Raspbian kernel packages
|
||||||
apt-get -y install raspberrypi-kernel-headers raspberrypi-kernel
|
apt-get -y install raspberrypi-kernel-headers raspberrypi-kernel
|
||||||
# Recent Raspbian has 64-bit kernel on 32-bit userspace
|
# Recent Raspbian has 64-bit kernel on 32-bit userspace
|
||||||
apt-get -y install gcc-aarch64-linux-gnu
|
apt-get -y install gcc-aarch64-linux-gnu
|
||||||
# Ubuntu kernel packages
|
# Ubuntu kernel packages
|
||||||
|
@ -177,10 +177,11 @@ grep -q "^snd-soc-seeed-voicecard$" /etc/modules || \
|
||||||
grep -q "^snd-soc-ac108$" /etc/modules || \
|
grep -q "^snd-soc-ac108$" /etc/modules || \
|
||||||
echo "snd-soc-ac108" >> /etc/modules
|
echo "snd-soc-ac108" >> /etc/modules
|
||||||
grep -q "^snd-soc-wm8960$" /etc/modules || \
|
grep -q "^snd-soc-wm8960$" /etc/modules || \
|
||||||
echo "snd-soc-wm8960" >> /etc/modules
|
echo "snd-soc-wm8960" >> /etc/modules
|
||||||
|
|
||||||
#set dtoverlays
|
#set dtoverlays
|
||||||
CONFIG=/boot/config.txt
|
CONFIG=/boot/config.txt
|
||||||
|
[ -f /boot/firmware/config.txt ] && CONFIG=/boot/firmware/config.txt
|
||||||
[ -f /boot/firmware/usercfg.txt ] && CONFIG=/boot/firmware/usercfg.txt
|
[ -f /boot/firmware/usercfg.txt ] && CONFIG=/boot/firmware/usercfg.txt
|
||||||
|
|
||||||
sed -i -e 's:#dtparam=i2c_arm=on:dtparam=i2c_arm=on:g' $CONFIG || true
|
sed -i -e 's:#dtparam=i2c_arm=on:dtparam=i2c_arm=on:g' $CONFIG || true
|
||||||
|
@ -213,7 +214,7 @@ git --git-dir=/etc/voicecard/.git --work-tree=/etc/voicecard/ commit -m "origin
|
||||||
|
|
||||||
cp seeed-voicecard /usr/bin/
|
cp seeed-voicecard /usr/bin/
|
||||||
cp seeed-voicecard.service /lib/systemd/system/
|
cp seeed-voicecard.service /lib/systemd/system/
|
||||||
systemctl enable seeed-voicecard.service
|
systemctl enable seeed-voicecard.service
|
||||||
systemctl start seeed-voicecard
|
systemctl start seeed-voicecard
|
||||||
|
|
||||||
echo "------------------------------------------------------"
|
echo "------------------------------------------------------"
|
||||||
|
|
|
@ -14,6 +14,7 @@ fi
|
||||||
uname_r=$(uname -r)
|
uname_r=$(uname -r)
|
||||||
|
|
||||||
CONFIG=/boot/config.txt
|
CONFIG=/boot/config.txt
|
||||||
|
[ -f /boot/firmware/config.txt ] && CONFIG=/boot/firmware/config.txt
|
||||||
[ -f /boot/firmware/usercfg.txt ] && CONFIG=/boot/firmware/usercfg.txt
|
[ -f /boot/firmware/usercfg.txt ] && CONFIG=/boot/firmware/usercfg.txt
|
||||||
|
|
||||||
get_overlay() {
|
get_overlay() {
|
||||||
|
@ -70,7 +71,7 @@ rm -rf /etc/voicecard/ || true
|
||||||
|
|
||||||
echo "disabled seeed-voicecard.service "
|
echo "disabled seeed-voicecard.service "
|
||||||
systemctl stop seeed-voicecard.service
|
systemctl stop seeed-voicecard.service
|
||||||
systemctl disable seeed-voicecard.service
|
systemctl disable seeed-voicecard.service
|
||||||
|
|
||||||
echo "remove seeed-voicecard"
|
echo "remove seeed-voicecard"
|
||||||
rm /usr/bin/seeed-voicecard || true
|
rm /usr/bin/seeed-voicecard || true
|
||||||
|
|
Loading…
Reference in a new issue