# / AArch64 multi-platform # Maintainer: Kevin Mihelich # Maintainer: graysky buildarch=8 pkgbase=linux-aarch64 _srcname=linux-6.11 _kernelname=${pkgbase#linux} _desc="AArch64 multi-platform" pkgver=6.11.7 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=('612a9feef07be8663098a0a58cddf7a6' 'b53937e19176a3ed2061020198adc559' '7862339da94da0b7958e61e2210760a7' 'c064a0a49f4ed7d487d482ca73c75178' '416b7c6ef37cc0edb6cb67cf618360f5' '35aa6f8dcf28387e5505e8c76fbfea2d' '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