# AArch64 multi-platform # Maintainer: Kevin Mihelich buildarch=8 _rcver=6.12 _rcrel=7 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' '0003-pps-Compatibility-hack-should-be-X86-specific.patch' 'config' 'generate_chromebook_its.sh' 'kernel.keyblock' 'kernel_data_key.vbprivk' 'linux.preset') md5sums=('290ab74cf5ed24b8025c261ce350035e' '7b08a199a97e3e2288e5c03d8e8ded2d' 'c9d4e392555b77034e24e9f87c5ff0b3' 'a6abfb191ecb3d7d5f6ccdaca335a11d' 'daafb26260be1c1009174efb07254daa' '7c97cf141750ad810235b1ad06eb9f75' '61c5ff73c136ed07a7aadbf58db3d96a' '584777ae88bce2c5659960151b64c7d8' '33ba82001fca579d43172a6db25d6aca') prepare() { cd $_srcname echo "Setting version..." 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 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}" "WIREGUARD-MODULE") replaces=('linux-armv8-rc') 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