mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-08 22:45:43 +00:00
core/linux-rpi to 6.1.66-5
Upstream bump and modernize and rework $pkgname.install to use EOF statements and to advertise linux-rpi-16k for users of RPi5
This commit is contained in:
parent
fe15f2654e
commit
534261c88c
2 changed files with 34 additions and 28 deletions
|
@ -5,12 +5,12 @@
|
|||
# Contributer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
|
||||
|
||||
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'
|
||||
|
|
|
@ -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 <<END
|
||||
|
||||
>>> 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 <<END
|
||||
|
||||
# coming from linux-aarch64 also needs a padded zero in the path to /boot
|
||||
correct_fstab
|
||||
>>> 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 <<END
|
||||
|
||||
if [ "$(vercmp $2 5.10.0)" -lt 0 ]; then
|
||||
correct_fstab
|
||||
>>> WARNING: /boot appears to be a separate partition but is not mounted.
|
||||
You probably just broke your system. Congratulations.
|
||||
|
||||
END
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue