diff --git a/linux/PKGBUILD b/linux/PKGBUILD index 614e0c5..a4bae0a 100644 --- a/linux/PKGBUILD +++ b/linux/PKGBUILD @@ -5,7 +5,7 @@ pkgbase=linux # Build stock -ARCH kernel #pkgbase=linux-custom # Build kernel with a different name _srcname=linux -pkgver=4.15rc5.r0.g464e1d5f23cc +pkgver=4.15rc7.r111.g5f615b97cdea pkgrel=1 arch=('x86_64') url="https://www.kernel.org/" @@ -38,6 +38,7 @@ prepare() { # add upstream patch #patch -p1 -i ../patch-${pkgver} + chmod +x tools/objtool/sync-check.sh # GNU patch doesn't support git-style file mode # security patches @@ -96,32 +97,26 @@ _package() { _basekernel=${_kernver%%-*} _basekernel=${_basekernel%.*} - mkdir -p "${pkgdir}"/{boot,lib/{modules,firmware},usr} - make LOCALVERSION= INSTALL_MOD_PATH="${pkgdir}" modules_install + mkdir -p "${pkgdir}"/{boot,usr/lib/modules} + make LOCALVERSION= INSTALL_MOD_PATH="${pkgdir}/usr" modules_install cp arch/x86/boot/bzImage "${pkgdir}/boot/vmlinuz-${pkgbase}" # make room for external modules local _extramodules="extramodules-${_basekernel}${_kernelname:--ARCH}" - ln -s "../${_extramodules}" "${pkgdir}/lib/modules/${_kernver}/extramodules" + ln -s "../${_extramodules}" "${pkgdir}/usr/lib/modules/${_kernver}/extramodules" # add real version for building modules and running depmod from hook echo "${_kernver}" | - install -Dm644 /dev/stdin "${pkgdir}/lib/modules/${_extramodules}/version" + install -Dm644 /dev/stdin "${pkgdir}/usr/lib/modules/${_extramodules}/version" # remove build and source links - rm "${pkgdir}"/lib/modules/${_kernver}/{source,build} - - # remove the firmware - rm -r "${pkgdir}/lib/firmware" + rm "${pkgdir}"/usr/lib/modules/${_kernver}/{source,build} # now we call depmod... - depmod -b "${pkgdir}" -F System.map "${_kernver}" + depmod -b "${pkgdir}/usr" -F System.map "${_kernver}" # add vmlinux - install -Dt "${pkgdir}/lib/modules/${_kernver}/build" -m644 vmlinux - - # move module tree /lib -> /usr/lib - mv -t "${pkgdir}/usr" "${pkgdir}/lib" + install -Dt "${pkgdir}/usr/lib/modules/${_kernver}/build" -m644 vmlinux # sed expression for following substitutions local _subst=" @@ -170,7 +165,6 @@ _package-headers() { install -Dt "${_builddir}/drivers/media/dvb-core" -m644 drivers/media/dvb-core/*.h # http://bugs.archlinux.org/task/13146 - install -Dt "${_builddir}/drivers/media/dvb-frontends" -m644 drivers/media/dvb-frontends/lgdt330x.h install -Dt "${_builddir}/drivers/media/i2c" -m644 drivers/media/i2c/msp3400-driver.h # http://bugs.archlinux.org/task/20402 @@ -197,6 +191,9 @@ _package-headers() { # remove files already in linux-docs package rm -r "${_builddir}/Documentation" + # remove now broken symlinks + find -L "${_builddir}" -type l -printf 'Removing %P\n' -delete + # Fix permissions chmod -R u=rwX,go=rX "${_builddir}" diff --git a/nvidia/4-15.patch b/nvidia/4-15.patch deleted file mode 100644 index ce9e602..0000000 --- a/nvidia/4-15.patch +++ /dev/null @@ -1,136 +0,0 @@ -diff -u -r NVIDIA-Linux-x86_64-387.22/kernel/nvidia-drm/nvidia-drm-connector.c NVIDIA-Linux-x86_64-387.22.patched/kernel/nvidia-drm/nvidia-drm-connector.c ---- a/nvidia-drm/nvidia-drm-connector.c 2017-10-26 09:29:25.000000000 +0200 -+++ b/nvidia-drm/nvidia-drm-connector.c 2017-11-16 20:15:35.123121624 +0100 -@@ -107,7 +107,7 @@ - break; - } - -- encoder = drm_encoder_find(dev, id); -+ encoder = drm_encoder_find(dev, NULL, id); - - if (encoder == NULL) - { -diff -u -r NVIDIA-Linux-x86_64-387.22/kernel/nvidia-drm/nvidia-drm-crtc.c NVIDIA-Linux-x86_64-387.22.patched/kernel/nvidia-drm/nvidia-drm-crtc.c ---- a/nvidia-drm/nvidia-drm-crtc.c 2017-10-26 09:29:25.000000000 +0200 -+++ b/nvidia-drm/nvidia-drm-crtc.c 2017-11-17 01:06:06.298997404 +0100 -@@ -434,7 +434,7 @@ - goto done; - } - -- crtc = drm_crtc_find(dev, params->crtc_id); -+ crtc = drm_crtc_find(dev, NULL, params->crtc_id); - if (!crtc) { - NV_DRM_DEV_LOG_DEBUG(nv_dev, "Unknown CRTC ID %d\n", params->crtc_id); - ret = -ENOENT; -diff -u -r NVIDIA-Linux-x86_64-387.22/kernel/nvidia-drm/nvidia-drm-modeset.c NVIDIA-Linux-x86_64-387.22.patched/kernel/nvidia-drm/nvidia-drm-modeset.c ---- a/nvidia-drm/nvidia-drm-modeset.c 2017-10-26 09:29:25.000000000 +0200 -+++ b/nvidia-drm/nvidia-drm-modeset.c 2017-11-17 01:16:51.188958966 +0100 -@@ -252,7 +252,7 @@ - - /* Loops over all crtcs and fill head configuration for changes */ - -- for_each_crtc_in_state(state, crtc, crtc_state, i) -+ for_each_new_crtc_in_state(state, crtc, crtc_state, i) - { - struct nvidia_drm_crtc *nv_crtc; - struct NvKmsKapiHeadRequestedConfig *head_requested_config; -@@ -303,7 +303,7 @@ - - head_requested_config->flags.displaysChanged = NV_TRUE; - -- for_each_connector_in_state(state, connector, connector_state, j) { -+ for_each_new_connector_in_state(state, connector, connector_state, j) { - if (connector_state->crtc != crtc) { - continue; - } -@@ -324,7 +324,7 @@ - - /* Loops over all planes and fill plane configuration for changes */ - -- for_each_plane_in_state(state, plane, plane_state, i) -+ for_each_new_plane_in_state(state, plane, plane_state, i) - { - struct NvKmsKapiHeadRequestedConfig *head_requested_config; - -@@ -634,7 +634,7 @@ - nvidia_drm_write_combine_flush(); - } - -- for_each_crtc_in_state(state, crtc, crtc_state, i) { -+ for_each_new_crtc_in_state(state, crtc, crtc_state, i) { - struct nvidia_drm_crtc *nv_crtc = DRM_CRTC_TO_NV_CRTC(crtc); - struct nv_drm_crtc_state *nv_crtc_state = to_nv_crtc_state(crtc->state); - struct nv_drm_flip *nv_flip = nv_crtc_state->nv_flip; -diff -u -r NVIDIA-Linux-x86_64-387.22/kernel/nvidia-uvm/uvm8_va_block.c NVIDIA-Linux-x86_64-387.22.patched/kernel/nvidia-uvm/uvm8_va_block.c ---- a/nvidia-uvm/uvm8_va_block.c 2017-10-26 09:29:23.000000000 +0200 -+++ b/nvidia-uvm/uvm8_va_block.c 2017-11-14 01:43:56.176693556 +0100 -@@ -36,6 +36,8 @@ - #include "uvm8_perf_prefetch.h" - #include "uvm8_mem.h" - -+#include -+ - typedef enum - { - BLOCK_PTE_OP_MAP, ---- a/nvidia/nv.c 2017-11-25 07:14:29.000000000 -0600 -+++ b/nvidia/nv.c 2017-11-27 00:09:01.948814571 -0600 -@@ -320,7 +320,7 @@ - #else - static irqreturn_t nvidia_isr (int, void *); - #endif --static void nvidia_rc_timer (unsigned long); -+static void nvidia_rc_timer (struct timer_list *t); - - static int nvidia_ctl_open (struct inode *, struct file *); - static int nvidia_ctl_close (struct inode *, struct file *); -@@ -2472,10 +2472,10 @@ - - static void - nvidia_rc_timer( -- unsigned long data -+ struct timer_list *t - ) - { -- nv_linux_state_t *nvl = (nv_linux_state_t *) data; -+ nv_linux_state_t *nvl = from_timer(nvl, t, rc_timer); - nv_state_t *nv = NV_STATE_PTR(nvl); - nvidia_stack_t *sp = nvl->sp[NV_DEV_STACK_TIMER]; - -@@ -3386,9 +3386,7 @@ - return -1; - - nv_printf(NV_DBG_INFO, "NVRM: initializing rc timer\n"); -- init_timer(&nvl->rc_timer); -- nvl->rc_timer.function = nvidia_rc_timer; -- nvl->rc_timer.data = (unsigned long) nvl; -+ timer_setup(&nvl->rc_timer, nvidia_rc_timer, 0); - nv->rc_timer_enabled = 1; - mod_timer(&nvl->rc_timer, jiffies + HZ); /* set our timeout for 1 second */ - nv_printf(NV_DBG_INFO, "NVRM: rc timer initialized\n"); ---- a/nvidia-modeset/nvidia-modeset-linux.c 2017-11-25 07:14:29.000000000 -0600 -+++ b/nvidia-modeset/nvidia-modeset-linux.c 2017-11-27 00:19:36.006798982 -0600 -@@ -566,9 +566,9 @@ - WARN_ON(!ret); - } - --static void nvkms_timer_callback(unsigned long arg) -+static void nvkms_timer_callback(struct timer_list *t) - { -- struct nvkms_timer_t *timer = (struct nvkms_timer_t *) arg; -+ struct nvkms_timer_t *timer = from_timer(timer, t, kernel_timer); - - /* In softirq context, so schedule nvkms_kthread_q_callback(). */ - nvkms_queue_work(&nvkms_kthread_q, &timer->nv_kthread_q_item); -@@ -606,10 +606,8 @@ - timer->kernel_timer_created = NV_FALSE; - nvkms_queue_work(&nvkms_kthread_q, &timer->nv_kthread_q_item); - } else { -- init_timer(&timer->kernel_timer); -+ timer_setup(&timer->kernel_timer, nvkms_timer_callback, 0); - timer->kernel_timer_created = NV_TRUE; -- timer->kernel_timer.function = nvkms_timer_callback; -- timer->kernel_timer.data = (unsigned long) timer; - mod_timer(&timer->kernel_timer, jiffies + NVKMS_USECS_TO_JIFFIES(usec)); - } - spin_unlock_irqrestore(&nvkms_timers.lock, flags); diff --git a/nvidia/PKGBUILD b/nvidia/PKGBUILD index 3df24d4..fdd50af 100644 --- a/nvidia/PKGBUILD +++ b/nvidia/PKGBUILD @@ -5,7 +5,7 @@ pkgbase=nvidia pkgname=(nvidia nvidia-dkms) -pkgver=387.34 +pkgver=390.12 _extramodules=extramodules-4.15-ARCH pkgrel=99 pkgdesc="NVIDIA drivers for linux" @@ -14,9 +14,8 @@ url="http://www.nvidia.com/" makedepends=('nvidia-libgl' "nvidia-utils=${pkgver}" 'linux' 'linux-headers>=4.14' 'linux-headers<4.15') license=('custom') options=('!strip') -source=("http://us.download.nvidia.com/XFree86/Linux-x86_64/${pkgver}/NVIDIA-Linux-x86_64-${pkgver}-no-compat32.run" "4-15.patch") -sha256sums=('d540908e76aeecb1f4a2812acf5ad37346934a6b7c8043c8b3ce230a48ceb440' - 'a8ae8b03825fb6ec130d1c883f5dd87db7f4cfb8b38d71530062f45c00f50271') +source=("http://us.download.nvidia.com/XFree86/Linux-x86_64/${pkgver}/NVIDIA-Linux-x86_64-${pkgver}-no-compat32.run") +sha256sums=('68c744abc7f42eaa9e640d90ecd3c7691a74b84584b83b776488ef1916f8eb43') _pkg="NVIDIA-Linux-x86_64-${pkgver}-no-compat32" @@ -45,7 +44,7 @@ DEST_MODULE_LOCATION[3]="/kernel/drivers/video"' dkms.conf sed -i 's/NV_EXCLUDE_BUILD_MODULES/IGNORE_PREEMPT_RT_PRESENCE=1 NV_EXCLUDE_BUILD_MODULES/' dkms.conf cd ../kernel - patch -p1 -i ../../../4-15.patch + #patch -p1 -i ../../../4-15.patch } build() {