# AArch64 multi-platform # Maintainer: Kevin Mihelich # Maintainer: graysky buildarch=8 pkgbase=linux-aarch64 _srcname=linux-6.8 _kernelname=${pkgbase#linux} _desc="AArch64 multi-platform" pkgver=6.8.6 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' 'config' 'generate_chromebook_its.sh' 'kernel.keyblock' 'kernel_data_key.vbprivk' 'linux.preset') md5sums=('72d623b959a11850b57406f0b9fe3946' '0142493264333f7e26b16ddbf96bb843' '7b08a199a97e3e2288e5c03d8e8ded2d' 'c9d4e392555b77034e24e9f87c5ff0b3' '676066765ec9e73e3ae5f07458b26fc4' '7c97cf141750ad810235b1ad06eb9f75' '61c5ff73c136ed07a7aadbf58db3d96a' '584777ae88bce2c5659960151b64c7d8' '41cb5fef62715ead2dd109dbea8413d6') 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 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}" "WIREGUARD-MODULE") conflicts=('linux') backup=("etc/mkinitcpio.d/${pkgbase}.preset") 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