Skip to content
Permalink
Browse files

raspbiantools - downgrade firmware/kernel instead for stretch bt fix

 * 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 4d381594caa40720ede240df1953c5cdca17cbe7
Showing with 13 additions and 8 deletions.
  1. +13 −8 scriptmodules/supplementary/raspbiantools.sh
@@ -16,7 +16,7 @@ rp_module_flags="!x11 !mali"

function apt_upgrade_raspbiantools() {
# install a newer kernel/firmware for stretch to resolve sony bt issues
kernel_bt_fix_raspbiantools
stretch_fix_raspbiantools

aptUpdate
apt-get -y dist-upgrade
@@ -42,25 +42,30 @@ function disable_blanker_raspbiantools() {
sed -i 's/POWERDOWN_TIME=\d*/POWERDOWN_TIME=0/g' /etc/kbd/config
}

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
function stretch_fix_raspbiantools() {
local ver="1.20190401-1"
# install an older kernel/firmware for stretch to resolve sony bt, composite 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"
}

0 comments on commit 4d38159

Please sign in to comment.
You can’t perform that action at this time.