diff --git a/core/linux-rpi/PKGBUILD b/core/linux-rpi/PKGBUILD index 61777f80f..ff8d888ca 100644 --- a/core/linux-rpi/PKGBUILD +++ b/core/linux-rpi/PKGBUILD @@ -5,12 +5,12 @@ # Contributer: Jan Alexander Steffens (heftig) pkgbase=linux-rpi -_commit=a6872b25f18fe46ef9979f9d4a3635a9c3966afd +_commit=5d87d7f91cb4f1d0f391f6fe9dd0524b363b78e3 _srcname=linux-${_commit} _kernelname=${pkgbase#linux} _regen= pkgver=6.1.66 -pkgrel=4 +pkgrel=5 pkgdesc='Linux' url="https://github.com/raspberrypi/linux" arch=(armv7h aarch64) @@ -32,7 +32,7 @@ source=("linux-$pkgver-${_commit:0:10}.tar.gz::https://github.com/raspberrypi/li 90-linux.hook archarm.diffconfig ) -md5sums=('9eb5fd545124c23fd64f299f93e7ad86' +md5sums=('598e42d4f36b533d9cb5f215a0ff5004' '3bab7426d8c8818dda8353da3892a41f' '16c484af9f72b9275afcf83a6b8eab36' 'f66a7ea3feb708d398ef57e4da4815e9' diff --git a/core/linux-rpi/linux-rpi.install b/core/linux-rpi/linux-rpi.install index a757ed304..baac270d9 100644 --- a/core/linux-rpi/linux-rpi.install +++ b/core/linux-rpi/linux-rpi.install @@ -1,8 +1,12 @@ disable_cma() { if [[ -f /boot/config.txt && $(grep '^cma' /boot/config.txt) != '' ]]; then - echo ">>> You appear to have dynamic memory (CMA) enabled, which is currently broken" - echo ">>> in newer kernels and will cause many issues if left enabled." - echo ">>> Disabling that for you now." + cat <>> You appear to have dynamic memory (CMA) enabled, which is currently broken + in newer kernels and will cause many issues if left enabled. Disabling that + for you now. + +END sed -i 's/^cma_/#cma_/g' /boot/config.txt fi } @@ -16,35 +20,37 @@ correct_fstab() { fi } -post_install () { - disable_cma +advertise_rpi5() { + if [[ -f /sys/firmware/devicetree/base/model ]]; then + if grep -a -q 5 /sys/firmware/devicetree/base/model; then + cat <>> For optimal performance on RPi5, consider installing the + linux-rpi-16k kernel package instead of linux-rpi. + +END + fi + fi +} + +post_install () { + post_upgrade } post_upgrade() { - if grep "^[^#]*[[:space:]]/boot" etc/fstab 2>&1 >/dev/null; then - if ! grep "[[:space:]]/boot" etc/mtab 2>&1 >/dev/null; then - echo "WARNING: /boot appears to be a separate partition but is not mounted." - echo " You probably just broke your system. Congratulations." - fi - fi - + advertise_rpi5 + correct_fstab disable_cma - if [ "$(vercmp $2 3.18.3)" -lt 0 ]; then - echo "________________________________________________________________________________" - echo "" - echo "WARNING: This kernel provides updated config.txt and cmdline.txt files." - echo " Check for pacnew files in /boot and merge or replace the existing files" - echo " with the new versions." - echo "________________________________________________________________________________" - echo "" - fi + if grep "^[^#]*[[:space:]]/boot" etc/fstab 2>&1 >/dev/null; then + if ! grep "[[:space:]]/boot" etc/mtab 2>&1 >/dev/null; then + cat <>> WARNING: /boot appears to be a separate partition but is not mounted. + You probably just broke your system. Congratulations. + +END + fi fi }