# Maintainer: graysky # Maintainer: Kevin Mihelich # Maintainer: Oleg Rakhmanov # Maintainer: Dave Higham # Contributer: Jan Alexander Steffens (heftig) pkgbase=linux-rpi _commit=cc63d552b9aab92fb581dfb08267d5af697f477b _srcname=linux-${_commit} _kernelname=${pkgbase#linux} _regen= pkgver=6.6.51 pkgrel=3 pkgdesc='Linux' url="https://github.com/raspberrypi/linux" arch=(armv7h aarch64) license=(GPL2) makedepends=( bc kmod inetutils ) options=('!strip') source_armv7h=('config') source_aarch64=('config8') source=("linux-$pkgver-${_commit:0:10}.tar.gz::https://github.com/raspberrypi/linux/archive/${_commit}.tar.gz" cmdline.txt config.txt 0001-Make-proc-cpuinfo-consistent-on-arm64-and-arm.patch linux.preset archarm.diffconfig ) md5sums=('c4e2925a6e9b1bf3261006c3bae13571' '3bab7426d8c8818dda8353da3892a41f' '16c484af9f72b9275afcf83a6b8eab36' 'a157c5bfc0f03d0728c92bd953b06265' '8b93b6ca167f70c60277f352f7b78024' '467709b52aff45a30b6e379e175026a9') md5sums_armv7h=('c72353f5b06c1188d089f3f870788e96') md5sums_aarch64=('944e1b8dc8b661dd45c598da80998623') # setup vars if [[ $CARCH == "armv7h" ]]; then _kernel=kernel7.img KARCH=arm _image=zImage _config=config elif [[ $CARCH == "aarch64" ]]; then _kernel=kernel8.img KARCH=arm64 _image=Image _config=config8 fi prepare() { cd "${srcdir}/${_srcname}" # consistent behavior of lscpu on arm/arm64 patch -p1 -i ../0001-Make-proc-cpuinfo-consistent-on-arm64-and-arm.patch echo "Setting version..." echo "-$pkgrel" > 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 olddefconfig if [[ $CARCH == "armv7h" ]]; then # https://archlinuxarm.org/forum/viewtopic.php?f=23&t=16373 scripts/config --enable CONFIG_BCM2835_THERMAL # re-enable LRU_GEN by default as the intial observation that it was to blame # for triggering OOM was likely a false positive, see: # https://github.com/raspberrypi/linux/issues/5395#issuecomment-1854410361 # https://archlinuxarm.org/forum/viewtopic.php?f=23&t=16377 scripts/config --enable CONFIG_LRU_GEN_ENABLED fi # bcm2711_defconfig inserts either -v7l or -v8 for CONFIG_LOCALVERSION= so set this to null sed '/^CONFIG_LOCALVERSION=/s,.*$,CONFIG_LOCALVERSION="",' .config >$startdir/newconfig.$_config echo "verify that newconfig.$_config is fit for purpose then redefine $_config" exit else echo "Setting config..." cp ../"$_config" .config make olddefconfig diff -u ../"$_config" .config || : make -s kernelrelease > version echo "Prepared $pkgbase version $(=0.7' raspberrypi-bootloader ) optdepends=( 'wireless-regdb: to set the correct wireless channels of your country' ) provides=( linux="${pkgver}" KSMBD-MODULE WIREGUARD-MODULE ) conflicts=( linux linux-rpi-16k uboot-raspberrypi ) install=${pkgname}.install backup=( boot/config.txt boot/cmdline.txt ) cd "${srcdir}/${_srcname}" local modulesdir="$pkgdir/usr/lib/modules/$(