# AArch64 multi-platform # Maintainer: Kevin Mihelich buildarch=8 _rcver=6.0 _rcrel=3 pkgbase=linux-aarch64-rc _srcname=linux-${_rcver}-rc${_rcrel} _kernelname=${pkgbase#linux} _desc="AArch64 multi-platform (release candidate)" pkgver=${_rcver}.rc${_rcrel} 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=("https://git.kernel.org/torvalds/t/${_srcname}.tar.gz" '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' '60-linux.hook' '90-linux.hook') md5sums=('a1d6b495f43263ac013e6cbad1282c73' '7b08a199a97e3e2288e5c03d8e8ded2d' 'c9d4e392555b77034e24e9f87c5ff0b3' 'd5e40fb35bb43b4bc45ddb644654759c' '7c97cf141750ad810235b1ad06eb9f75' '61c5ff73c136ed07a7aadbf58db3d96a' '584777ae88bce2c5659960151b64c7d8' '41cb5fef62715ead2dd109dbea8413d6' '0a5f16bfec6ad982a2f6782724cca8ba' '3dc88030a8f2f5a5f97266d99b149f77') prepare() { cd $_srcname echo "Setting version..." scripts/setlocalversion --save-scmversion echo "-$pkgrel" > localversion.10-pkgrel echo "${pkgbase#linux}" > localversion.20-pkgname # 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=('crda: to set the correct wireless channels of your country') provides=("linux=${pkgver}" "WIREGUARD-MODULE") replaces=('linux-armv8-rc') conflicts=('linux') backup=("etc/mkinitcpio.d/${pkgbase}.preset") install=${pkgname}.install cd $_srcname local kernver="$( 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