#mainteiner CarlosRFS pkgbase=linux pkgver=5.19.0.arch1 pkgrel=1 pkgdesc='Linux' _srctag=riscv/d1-wip url="https://github.com/smaeul/linux/commits/$_srctag" arch=(riscv64) license=(GPL2) makedepends=( bc libelf pahole cpio perl tar xz xmlto python-sphinx python-sphinx_rtd_theme graphviz imagemagick texlive-latexextra git ) options=('!strip') _srcname=linux DLAGENTS='linux::/usr/bin/git clone --depth 1 https://github.com/smaeul/linux.git -b riscv/d1-wip' source=( "$_srcname::linux://linux" ) noextract=('linux:') validpgpkeys=( 'ABAF11C65A2970B130ABE3C479BE3E4300411886' # Linus Torvalds '647F28654894E3BD457199BE38DBBDC86092693E' # Greg Kroah-Hartman 'A2FF3A36AAA56654109064AB19802F8B0D70FC30' # Jan Alexander Steffens (heftig) 'C7E7849466FE2358343588377258734B41C31549' # David Runge ) sha256sums=('SKIP') export KBUILD_BUILD_HOST=archlinux-smaeul export KBUILD_BUILD_USER=$pkgbase-smaeul export KBUILD_BUILD_TIMESTAMP="$(date -Ru${SOURCE_DATE_EPOCH:+d @$SOURCE_DATE_EPOCH})" prepare() { ls mv "${srcdir}/../linux:/$pkgname" "${srcdir}/$pkgname" cd ${pkgname} 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..." echo "CONFIG_LOCALVERSION=${KERNEL_RELEASE}" >> arch/riscv/configs/nezha_defconfig # enable WiFi echo 'CONFIG_WIRELESS=y' >> arch/riscv/configs/nezha_defconfig echo 'CONFIG_CFG80211=m' >> arch/riscv/configs/nezha_defconfig # enable /proc/config.gz echo 'CONFIG_IKCONFIG_PROC=y' >> arch/riscv/configs/nezha_defconfig # There is no LAN. so let there be USB-LAN echo 'CONFIG_USB_NET_DRIVERS=m' >> arch/riscv/configs/nezha_defconfig echo 'CONFIG_USB_CATC=m' >> arch/riscv/configs/nezha_defconfig echo 'CONFIG_USB_KAWETH=m' >> arch/riscv/configs/nezha_defconfig echo 'CONFIG_USB_PEGASUS=m' >> arch/riscv/configs/nezha_defconfig echo 'CONFIG_USB_RTL8150=m' >> arch/riscv/configs/nezha_defconfig echo 'CONFIG_USB_RTL8152=m' >> arch/riscv/configs/nezha_defconfig echo 'CONFIG_USB_LAN78XX=m' >> arch/riscv/configs/nezha_defconfig echo 'CONFIG_USB_USBNET=m' >> arch/riscv/configs/nezha_defconfig echo 'CONFIG_USB_NET_AX8817X=m' >> arch/riscv/configs/nezha_defconfig echo 'CONFIG_USB_NET_AX88179_178A=m' >> arch/riscv/configs/nezha_defconfig echo 'CONFIG_USB_NET_CDCETHER=m' >> arch/riscv/configs/nezha_defconfig echo 'CONFIG_USB_NET_CDC_EEM=m' >> arch/riscv/configs/nezha_defconfig echo 'CONFIG_USB_NET_CDC_NCM=m' >> arch/riscv/configs/nezha_defconfig echo 'CONFIG_USB_NET_HUAWEI_CDC_NCM=m' >> arch/riscv/configs/nezha_defconfig echo 'CONFIG_USB_NET_CDC_MBIM=m' >> arch/riscv/configs/nezha_defconfig echo 'CONFIG_USB_NET_DM9601=m' >> arch/riscv/configs/nezha_defconfig echo 'CONFIG_USB_NET_SR9700=m' >> arch/riscv/configs/nezha_defconfig echo 'CONFIG_USB_NET_SR9800=m' >> arch/riscv/configs/nezha_defconfig echo 'CONFIG_USB_NET_SMSC75XX=m' >> arch/riscv/configs/nezha_defconfig echo 'CONFIG_USB_NET_SMSC95XX=m' >> arch/riscv/configs/nezha_defconfig echo 'CONFIG_USB_NET_GL620A=m' >> arch/riscv/configs/nezha_defconfig echo 'CONFIG_USB_NET_NET1080=m' >> arch/riscv/configs/nezha_defconfig echo 'CONFIG_USB_NET_PLUSB=m' >> arch/riscv/configs/nezha_defconfig echo 'CONFIG_USB_NET_MCS7830=m' >> arch/riscv/configs/nezha_defconfig echo 'CONFIG_USB_NET_RNDIS_HOST=m' >> arch/riscv/configs/nezha_defconfig echo 'CONFIG_USB_NET_CDC_SUBSET_ENABLE=m' >> arch/riscv/configs/nezha_defconfig echo 'CONFIG_USB_NET_CDC_SUBSET=m' >> arch/riscv/configs/nezha_defconfig echo 'CONFIG_USB_ALI_M5632=y' >> arch/riscv/configs/nezha_defconfig echo 'CONFIG_USB_AN2720=y' >> arch/riscv/configs/nezha_defconfig echo 'CONFIG_USB_BELKIN=y' >> arch/riscv/configs/nezha_defconfig echo 'CONFIG_USB_ARMLINUX=y' >> arch/riscv/configs/nezha_defconfig echo 'CONFIG_USB_EPSON2888=y' >> arch/riscv/configs/nezha_defconfig echo 'CONFIG_USB_KC2190=y' >> arch/riscv/configs/nezha_defconfig echo 'CONFIG_USB_NET_ZAURUS=m' >> arch/riscv/configs/nezha_defconfig echo 'CONFIG_USB_NET_CX82310_ETH=m' >> arch/riscv/configs/nezha_defconfig echo 'CONFIG_USB_NET_KALMIA=m' >> arch/riscv/configs/nezha_defconfig echo 'CONFIG_USB_NET_QMI_WWAN=m' >> arch/riscv/configs/nezha_defconfig echo 'CONFIG_USB_NET_INT51X1=m' >> arch/riscv/configs/nezha_defconfig echo 'CONFIG_USB_IPHETH=m' >> arch/riscv/configs/nezha_defconfig echo 'CONFIG_USB_SIERRA_NET=m' >> arch/riscv/configs/nezha_defconfig echo 'CONFIG_USB_VL600=m' >> arch/riscv/configs/nezha_defconfig echo 'CONFIG_USB_NET_CH9200=m' >> arch/riscv/configs/nezha_defconfig echo 'CONFIG_USB_NET_AQC111=m' >> arch/riscv/configs/nezha_defconfig echo 'CONFIG_USB_RTL8153_ECM=m' >> arch/riscv/configs/nezha_defconfig # enable systemV IPC (needed by fakeroot during makepkg) echo 'CONFIG_SYSVIPC=y' >> arch/riscv/configs/nezha_defconfig echo 'CONFIG_SYSVIPC_SYSCTL=y' >> arch/riscv/configs/nezha_defconfig # enable swap echo 'CONFIG_SWAP=y' >> arch/riscv/configs/nezha_defconfig echo 'CONFIG_ZSWAP=y' >> arch/riscv/configs/nezha_defconfig #enable Cedrus VPU Drivers echo 'CONFIG_MEDIA_SUPPORT=y' >> arch/riscv/configs/nezha_defconfig echo 'CONFIG_MEDIA_CONTROLLER=y' >> arch/riscv/configs/nezha_defconfig echo 'CONFIG_MEDIA_CONTROLLER_REQUEST_API=y' >> arch/riscv/configs/nezha_defconfig echo 'CONFIG_V4L_MEM2MEM_DRIVERS=y' >> arch/riscv/configs/nezha_defconfig echo 'CONFIG_VIDEO_SUNXI_CEDRUS=y' >> arch/riscv/configs/nezha_defconfig make ARCH=riscv nezha_defconfig make -s kernelrelease > version echo "Prepared $pkgbase version $(