Merge branch 'v5.5' into v5.7
This commit is contained in:
commit
1452d85e0f
2 changed files with 9 additions and 3 deletions
|
@ -66,6 +66,7 @@ function get_kernel_version() {
|
||||||
_VER_RUN=""
|
_VER_RUN=""
|
||||||
[ -z "$_VER_RUN" ] && {
|
[ -z "$_VER_RUN" ] && {
|
||||||
ZIMAGE=/boot/kernel.img
|
ZIMAGE=/boot/kernel.img
|
||||||
|
[ -f /boot/firmware/vmlinuz ] && ZIMAGE=/boot/firmware/vmlinuz
|
||||||
IMG_OFFSET=$(LC_ALL=C grep -abo $'\x1f\x8b\x08\x00' $ZIMAGE | head -n 1 | cut -d ':' -f 1)
|
IMG_OFFSET=$(LC_ALL=C grep -abo $'\x1f\x8b\x08\x00' $ZIMAGE | head -n 1 | cut -d ':' -f 1)
|
||||||
_VER_RUN=$(dd if=$ZIMAGE obs=64K ibs=4 skip=$(( IMG_OFFSET / 4)) | zcat | grep -a -m1 "Linux version" | strings | awk '{ print $3; }')
|
_VER_RUN=$(dd if=$ZIMAGE obs=64K ibs=4 skip=$(( IMG_OFFSET / 4)) | zcat | grep -a -m1 "Linux version" | strings | awk '{ print $3; }')
|
||||||
}
|
}
|
||||||
|
|
11
uninstall.sh
11
uninstall.sh
|
@ -14,6 +14,8 @@ fi
|
||||||
uname_r=$(uname -r)
|
uname_r=$(uname -r)
|
||||||
|
|
||||||
CONFIG=/boot/config.txt
|
CONFIG=/boot/config.txt
|
||||||
|
[ -f /boot/firmware/usercfg.txt ] && CONFIG=/boot/firmware/usercfg.txt
|
||||||
|
|
||||||
get_overlay() {
|
get_overlay() {
|
||||||
ov=$1
|
ov=$1
|
||||||
if grep -q -E "^dtoverlay=$ov" $CONFIG; then
|
if grep -q -E "^dtoverlay=$ov" $CONFIG; then
|
||||||
|
@ -55,9 +57,12 @@ echo "remove dtbos"
|
||||||
for i in $RPI_HATS; do
|
for i in $RPI_HATS; do
|
||||||
dtoverlay -r $i
|
dtoverlay -r $i
|
||||||
done
|
done
|
||||||
rm /boot/overlays/seeed-2mic-voicecard.dtbo || true
|
OVERLAYS=/boot/overlays
|
||||||
rm /boot/overlays/seeed-4mic-voicecard.dtbo || true
|
[ -d /boot/firmware/overlays ] && OVERLAYS=/boot/firmware/overlays
|
||||||
rm /boot/overlays/seeed-8mic-voicecard.dtbo || true
|
|
||||||
|
rm ${OVERLAYS}/seeed-2mic-voicecard.dtbo || true
|
||||||
|
rm ${OVERLAYS}/seeed-4mic-voicecard.dtbo || true
|
||||||
|
rm ${OVERLAYS}/seeed-8mic-voicecard.dtbo || true
|
||||||
|
|
||||||
echo "remove alsa configs"
|
echo "remove alsa configs"
|
||||||
rm -rf /etc/voicecard/ || true
|
rm -rf /etc/voicecard/ || true
|
||||||
|
|
Loading…
Reference in a new issue