# / AArch64 multi-platform # Maintainer: Kevin Mihelich # Maintainer: graysky buildarch=8 pkgbase=linux-aarch64 _srcname=linux-6.10 _kernelname=${pkgbase#linux} _desc="AArch64 multi-platform" pkgver=6.10.10 pkgrel=1 arch=('aarch64') url="http://www.kernel.org/" license=('GPL2') makedepends=('xmlto' 'docbook-xsl' 'kmod' 'inetutils' 'bc' 'git' 'uboot-tools' 'vboot-utils' 'dtc') options=('!strip') source=("http://www.kernel.org/pub/linux/kernel/v6.x/${_srcname}.tar.xz" "http://www.kernel.org/pub/linux/kernel/v6.x/patch-${pkgver}.xz" '0001-net-smsc95xx-Allow-mac-address-to-be-set-as-a-parame.patch' '0002-arm64-dts-rockchip-disable-pwm0-on-rk3399-firefly.patch' '0003-pps-Compatibility-hack-should-be-X86-specific.patch' 'config' 'generate_chromebook_its.sh' 'kernel.keyblock' 'kernel_data_key.vbprivk' 'linux.preset') md5sums=('c0ce046a9a0d041e13cf222f81eae574' '922dc1dc2a26377c647b829ba347d1e4' '7b08a199a97e3e2288e5c03d8e8ded2d' 'c9d4e392555b77034e24e9f87c5ff0b3' 'a6abfb191ecb3d7d5f6ccdaca335a11d' '6a109693cfd1f5afcf3073ffdf13e911' '7c97cf141750ad810235b1ad06eb9f75' '61c5ff73c136ed07a7aadbf58db3d96a' '584777ae88bce2c5659960151b64c7d8' '33ba82001fca579d43172a6db25d6aca') prepare() { cd $_srcname echo "Setting version..." echo "-$pkgrel" > localversion.10-pkgrel echo "${pkgbase#linux}" > localversion.20-pkgname # add upstream patch git apply --whitespace=nowarn ../patch-${pkgver} # ALARM patches git apply ../0001-net-smsc95xx-Allow-mac-address-to-be-set-as-a-parame.patch git apply ../0002-arm64-dts-rockchip-disable-pwm0-on-rk3399-firefly.patch git apply ../0003-pps-Compatibility-hack-should-be-X86-specific.patch cat "${srcdir}/config" > ./.config } build() { cd ${_srcname} # get kernel version make prepare make -s kernelrelease > version # build! unset LDFLAGS make ${MAKEFLAGS} Image Image.gz modules # Generate device tree blobs with symbols to support applying device tree overlays in U-Boot make ${MAKEFLAGS} DTC_FLAGS="-@" dtbs } _package() { pkgdesc="The Linux Kernel and modules - ${_desc}" depends=('coreutils' 'linux-firmware' 'kmod' 'mkinitcpio>=0.7') optdepends=('wireless-regdb: to set the correct wireless channels of your country') provides=("linux=${pkgver}" "KSMBD-MODULE" "WIREGUARD-MODULE") conflicts=('linux') install=${pkgname}.install cd $_srcname local kernver="$( "${pkgdir}/usr/lib/initcpio/$( kernel.its mkimage -D "-I dts -O dtb -p 2048" -f kernel.its vmlinux.uimg dd if=/dev/zero of=bootloader.bin bs=512 count=1 echo "console=tty0 console=ttyS2,115200n8 earlyprintk=ttyS2,115200n8 console=ttyMSM0,115200n8 init=/sbin/init root=PARTUUID=%U/PARTNROFF=1 rootwait rw noinitrd" > cmdline vbutil_kernel \ --pack vmlinux.kpart \ --version 1 \ --vmlinuz vmlinux.uimg \ --arch aarch64 \ --keyblock ../kernel.keyblock \ --signprivate ../kernel_data_key.vbprivk \ --config cmdline \ --bootloader bootloader.bin cp vmlinux.kpart "${pkgdir}/boot" } pkgname=("${pkgbase}" "${pkgbase}-headers" "${pkgbase}-chromebook") for _p in ${pkgname[@]}; do eval "package_${_p}() { _package${_p#${pkgbase}} }" done