From 6689a4fdcd76dbbab777803493873f65e127e3e6 Mon Sep 17 00:00:00 2001 From: Ben Westover Date: Fri, 18 Mar 2022 22:37:35 -0400 Subject: [PATCH] addpkg: linux-nezha-git --- linux-nezha-git/PKGBUILD | 195 + linux-nezha-git/config | 9735 +++++++++++++++++++++++++++++ linux-nezha-git/pthread-fix.patch | 13 + 3 files changed, 9943 insertions(+) create mode 100644 linux-nezha-git/PKGBUILD create mode 100644 linux-nezha-git/config create mode 100644 linux-nezha-git/pthread-fix.patch diff --git a/linux-nezha-git/PKGBUILD b/linux-nezha-git/PKGBUILD new file mode 100644 index 000000000..674a8b02f --- /dev/null +++ b/linux-nezha-git/PKGBUILD @@ -0,0 +1,195 @@ +# Maintainer: Ben Westover + +pkgbase=linux-nezha-git +pkgver=r1030658.012f5a3d01be +pkgrel=1 +pkgdesc='Linux for the Nezha, from a WIP repo by Cezarus27' +url="https://www.kernel.org" +arch=(riscv64) +license=(GPL2) +makedepends=( + bc kmod libelf git pahole + xmlto python-sphinx python-sphinx_rtd_theme graphviz imagemagick +) +options=('!strip') +_srcname=linux +source=( + 'git+https://github.com/Cezarus27/linux#branch=riscv/d1-wip' + config # the main kernel config file + pthread-fix.patch +) +sha256sums=('SKIP' + '9b5dcb99d17292522bbfb8b3b1c844a4ac58f44e4b3f10e0f934c4b1fe83db23' + '41c0c6bd825ec704fefbf4fa78883cf13b2925528192e94606288a3da5b95b3f') + +export KBUILD_BUILD_HOST=archlinux +export KBUILD_BUILD_USER=$pkgbase +export KBUILD_BUILD_TIMESTAMP="$(date -Ru${SOURCE_DATE_EPOCH:+d @$SOURCE_DATE_EPOCH})" + +pkgver() { + cd $_srcname + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +prepare() { + cd $_srcname + + echo "Setting version..." + scripts/setlocalversion --save-scmversion + echo "-$pkgrel" > localversion.10-pkgrel + echo "${pkgbase#linux}" > localversion.20-pkgname + + local src + for src in "${source[@]}"; do + src="${src%%::*}" + src="${src##*/}" + [[ $src = *.patch ]] || continue + echo "Applying patch $src..." + patch -Np1 < "../$src" + done + + echo "Setting config..." + cp ../config .config + make olddefconfig + + make -s kernelrelease > version + echo "Prepared $pkgbase version $(