# Maintainer: graysky # Maintainer: Kevin Mihelich # Maintainer: Oleg Rakhmanov # Maintainer: Dave Higham # Contributer: Jan Alexander Steffens (heftig) pkgbase=linux-rpi _commit=655fc658a15ae7a6f37103754adb39ba52a9a14e _srcname=linux-${_commit} _kernelname=${pkgbase#linux} _regen= pkgver=6.1.47 pkgrel=1 pkgdesc='Linux' url="http://www.kernel.org/" arch=(armv7h aarch64) license=(GPL2) makedepends=( bc kmod inetutils ) options=('!strip') source_armv7h=('config' 'config.txt') source_aarch64=('config8' 'config8.txt') source=("linux-$pkgver-${_commit:0:10}.tar.gz::https://github.com/raspberrypi/linux/archive/${_commit}.tar.gz" cmdline.txt 0001-Make-proc-cpuinfo-consistent-on-arm64-and-arm.patch linux.preset 60-linux.hook 90-linux.hook archarm.diffconfig ) md5sums=('01e6c3157827bf17fe8097671a96d565' '3bab7426d8c8818dda8353da3892a41f' 'f66a7ea3feb708d398ef57e4da4815e9' '86d4a35722b5410e3b29fc92dae15d4b' '0a5f16bfec6ad982a2f6782724cca8ba' '441ec084c47cddc53e592fb0cbce4edf' 'c8f84694321e249492c80149833671d7') md5sums_armv7h=('b7517575796de6d5d19003560b965b29' 'a99311daa39248cfc9b6541a0a0a5f09') md5sums_aarch64=('94f6a57768c36a88d8740c61bc44e698' '7e4403dea857e40005bf76beda9927ff') # setup vars if [[ $CARCH == "armv7h" ]]; then _kernel=kernel7.img KARCH=arm _image=zImage _config=config _bconfig=config.txt elif [[ $CARCH == "aarch64" ]]; then _kernel=kernel8.img KARCH=arm64 _image=Image _config=config8 _bconfig=config8.txt fi _make() { test -s version make KERNELRELEASE="$( localversion.10-pkgrel echo "${pkgbase#linux}" > localversion.20-pkgname if [[ $_regen -eq 1 ]]; then # useful on two point releases to keep shit straight echo "Applying custom shit to bcm2711_defconfig" make bcm2711_defconfig cat ../archarm.diffconfig >> .config make oldconfig if [[ $CARCH == "armv7h" ]]; then # https://archlinuxarm.org/forum/viewtopic.php?f=23&t=16373 scripts/config --enable CONFIG_BCM2835_THERMAL # workaround OOM killer issue # https://github.com/raspberrypi/linux/issues/5395 # https://archlinuxarm.org/forum/viewtopic.php?f=23&t=16377 scripts/config --disable CONFIG_LRU_GEN_ENABLED fi sed '/^CONFIG_LOCALVERSION=/s,.*$,CONFIG_LOCALVERSION="-ARCH",' .config >$startdir/newconfig.$_config echo "verify that newconfig.$_config is fit for purpose then redefine $_config" exit else make bcm2711_defconfig make -s kernelrelease | sed 's/rpi-.*$/rpi-ARCH/' > version make mrproper echo "Setting config..." cp ../"$_config" .config _make olddefconfig diff -u ../"$_config" .config || : echo "Prepared $pkgbase version $(=0.7' ) optdepends=( 'wireless-regdb: to set the correct wireless channels of your country' ) provides=( linux="${pkgver}" WIREGUARD-MODULE ) conflicts=( linux uboot-raspberrypi ) replaces=( linux-raspberrypi-latest linux-raspberrypi4 ) install=${pkgname}.install backup=( boot/config.txt boot/cmdline.txt ) cd "${srcdir}/${_srcname}" local modulesdir="$pkgdir/usr/lib/modules/$(