Navigation Menu

Skip to content

Commit

Permalink
raspbiantools - downgrade package instead for stretch bt fix
Browse files Browse the repository at this point in the history
 * there are additional issues with the newer kernel including overscan problems
 * add option to pass parameter to apt-mark to hold/unhold and hold downgraded packages
  • Loading branch information
joolswills committed Jul 7, 2019
1 parent e4b973a commit 9e34a9d
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions scriptmodules/supplementary/raspbiantools.sh
Expand Up @@ -43,24 +43,29 @@ function disable_blanker_raspbiantools() {
}

function kernel_bt_fix_raspbiantools() {
# install a newer kernel/firmware for stretch to resolve sony bt issues
if isPlatform "rpi" && [[ "$__os_debian_ver" -eq 9 ]] && hasPackage raspberrypi-kernel 1.20190620+1-1 lt; then
install_firmware_raspbiantools 1.20190620+1-1
local ver="1.20190401-1"
# install an older kernel/firmware for stretch to resolve sony bt and overscan issues
if isPlatform "rpi" && [[ "$__os_debian_ver" -eq 9 ]] && hasPackage raspberrypi-kernel "$ver" ne; then
install_firmware_raspbiantools "$ver" hold
fi
}

function install_firmware_raspbiantools() {
local ver="$1"
local state="$2"
[[ -z "$ver" ]] && return 1
local url="http://archive.raspberrypi.org/debian/pool/main/r/raspberrypi-firmware"
mkdir -p "$md_build"
pushd "$md_build" >/dev/null
local pkg
local deb
for pkg in raspberrypi-bootloader libraspberrypi0 libraspberrypi-doc libraspberrypi-dev libraspberrypi-bin raspberrypi-kernel-headers raspberrypi-kernel; do
wget -O"${pkg}_${ver}_armhf.deb" "$url/${pkg}_${ver}_armhf.deb"
deb="${pkg}_${ver}_armhf.deb"
wget -O"$deb" "$url/$deb"
dpkg -i "$deb"
[[ -n "$state" ]] && apt-mark "$state" "$pkg"
rm "$deb"
done
dpkg -i *.deb
rm *.deb
popd >/dev/null
rm -rf "$md_build"
}
Expand Down

0 comments on commit 9e34a9d

Please sign in to comment.