You are not logged in.

#1 2017-05-05 22:08:33

loqs
Member
Registered: 2014-03-06
Posts: 11,599

[arch-dev-public] Kernel 4.11 status

Tobias Powalowski wrote:

Hi,
Kernel package would be ready to push to [testing],
Problems with binary modules again:

nvidia:
I have not yet found a patch that applies with older versions.
Problematic with 4.11, license needs to be patched I don't think this is
legal.

Broken community modules:
- r8169
- vhba-module

Reading this patches are needed for nvidia, nvidia-340xx and nvidia-304xx, r8169 does not seem to exists so assume 8168 and vhba
Should I just email Tobias Powalowski as the mailing list is restricted or can a moderator forward the links / patches?

https://pkgs.rpmfusion.org/cgit/nonfree … 84bf865d93
https://pkgs.rpmfusion.org/cgit/nonfree … db9d26c165
https://github.com/manjaro/packages-ext … 4.11.patch

Alternative patches for nvidia with the legally dubious code in a separate patch

diff --git a/kernel/conftest.sh b/kernel/conftest.sh
index 3ad7567..64dd684 100755
--- a/kernel/conftest.sh
+++ b/kernel/conftest.sh
@@ -1598,7 +1598,12 @@ compile_test() {
             # Determine if fatal_signal_pending is present.
             #
             CODE="
+            #include <linux/version.h>
+            #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
+            #include <linux/sched/signal.h>
+            #else
             #include <linux/sched.h>
+            #endif
             void conftest_fatal_signal_pending(void) {
                 fatal_signal_pending();
             }"
@@ -2244,9 +2249,15 @@ compile_test() {
             #   2015-11-11  1eb83451ba55d7a8c82b76b1591894ff2d4a95f2
             #
             CODE="
+            #include <linux/version.h>
             #include <drm/drm_crtc_helper.h>
+            #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
+            void drm_helper_mode_fill_fb_struct(struct drm_device * dev,struct drm_framebuffer *fb,
+                                                const struct drm_mode_fb_cmd2 *mode_cmd)
+            #else
             void drm_helper_mode_fill_fb_struct(struct drm_framebuffer *fb,
                                                 const struct drm_mode_fb_cmd2 *mode_cmd)
+            #endif
             {
                 return;
             }"
diff --git a/kernel/nvidia-drm/nvidia-drm-drv.c b/kernel/nvidia-drm/nvidia-drm-drv.c
index faec9f7..ea1442c 100644
--- a/kernel/nvidia-drm/nvidia-drm-drv.c
+++ b/kernel/nvidia-drm/nvidia-drm-drv.c
@@ -398,7 +398,11 @@ static int nvidia_drm_load(struct drm_device *dev, unsigned long flags)
     return 0;
 }
 
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
+static void nvidia_drm_unload(struct drm_device *dev)
+#else
 static int nvidia_drm_unload(struct drm_device *dev)
+#endif
 {
 #if defined(NV_DRM_ATOMIC_MODESET_AVAILABLE)
     struct NvKmsKapiDevice *pDevice = NULL;
@@ -412,7 +416,11 @@ static int nvidia_drm_unload(struct drm_device *dev)
 
     if (!nvidia_drm_modeset_enabled(dev))
     {
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
+        return;
+#else
         return 0;
+#endif
     }
 
     mutex_lock(&nv_dev->lock);
@@ -445,7 +453,11 @@ static int nvidia_drm_unload(struct drm_device *dev)
 
 #endif /* NV_DRM_ATOMIC_MODESET_AVAILABLE */
 
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
+    return;
+#else
     return 0;
+#endif
 }
 
 #if defined(NV_DRM_ATOMIC_MODESET_AVAILABLE)
diff --git a/kernel/nvidia-drm/nvidia-drm-encoder.h b/kernel/nvidia-drm/nvidia-drm-encoder.h
index 9756e1b..821c7bf 100644
--- a/kernel/nvidia-drm/nvidia-drm-encoder.h
+++ b/kernel/nvidia-drm/nvidia-drm-encoder.h
@@ -29,6 +29,10 @@
 
 #include "nvidia-drm-priv.h"
 
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
+#include <drm/drm_encoder.h>
+#endif
+
 #include <drm/drmP.h>
 #include "nvkms-kapi.h"
 
diff --git a/kernel/nvidia-drm/nvidia-drm-fb.c b/kernel/nvidia-drm/nvidia-drm-fb.c
index 72fdedd..2fbb396 100644
--- a/kernel/nvidia-drm/nvidia-drm-fb.c
+++ b/kernel/nvidia-drm/nvidia-drm-fb.c
@@ -152,7 +152,11 @@ struct drm_framebuffer *nvidia_drm_internal_framebuffer_create(
 
     /* Fill out framebuffer metadata from the userspace fb creation request */
 
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
+    drm_helper_mode_fill_fb_struct(dev, &nv_fb->base, cmd);
+#else
     drm_helper_mode_fill_fb_struct(&nv_fb->base, cmd);
+#endif
 
     /* Initialize the base framebuffer object and add it to drm subsystem */
 
diff --git a/kernel/nvidia-drm/nvidia-drm-gem.c b/kernel/nvidia-drm/nvidia-drm-gem.c
index 2cb2ee7..acc7d52 100644
--- a/kernel/nvidia-drm/nvidia-drm-gem.c
+++ b/kernel/nvidia-drm/nvidia-drm-gem.c
@@ -511,11 +511,19 @@ static void nvidia_drm_vma_open(struct vm_area_struct *vma)
  * Note that nvidia_drm_vma_fault() can be called for different or same
  * ranges of the same drm_gem_object simultaneously.
  */
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
+static int nvidia_drm_vma_fault(struct vm_fault *vmf)
+#else
 static int nvidia_drm_vma_fault(struct vm_area_struct *vma,
                                 struct vm_fault *vmf)
+#endif
 {
     unsigned long address = nv_page_fault_va(vmf);
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
+    struct drm_gem_object *gem = vmf->vma->vm_private_data;
+#else
     struct drm_gem_object *gem = vma->vm_private_data;
+#endif
     struct nvidia_drm_gem_object *nv_gem =
                     DRM_GEM_OBJECT_TO_NV_GEM_OBJECT(gem);
     unsigned long page_offset, pfn;
@@ -526,7 +534,11 @@ static int nvidia_drm_vma_fault(struct vm_area_struct *vma,
 
     page_offset = vmf->pgoff - drm_vma_node_start(&gem->vma_node);
 
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
+    ret = vm_insert_pfn(vmf->vma, address, pfn + page_offset);
+#else
     ret = vm_insert_pfn(vma, address, pfn + page_offset);
+#endif
 
     switch (ret) {
         case 0:
diff --git a/kernel/nvidia-uvm/uvm8_gpu_isr.c b/kernel/nvidia-uvm/uvm8_gpu_isr.c
index 49418a2..8550f40 100644
--- a/kernel/nvidia-uvm/uvm8_gpu_isr.c
+++ b/kernel/nvidia-uvm/uvm8_gpu_isr.c
@@ -270,7 +270,11 @@ void uvm_gpu_replayable_faults_isr_lock(uvm_gpu_t *gpu)
 
 void uvm_gpu_replayable_faults_isr_unlock(uvm_gpu_t *gpu)
 {
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
+    UVM_ASSERT(atomic_read(&(gpu->gpu_kref.refcount.refs)) > 0);
+#else
     UVM_ASSERT(atomic_read(&gpu->gpu_kref.refcount) > 0);
+#endif
 
     uvm_spin_lock_irqsave(&gpu->isr.replayable_faults.interrupts_lock);
 
diff --git a/kernel/nvidia-uvm/uvm_linux.h b/kernel/nvidia-uvm/uvm_linux.h
index 5db7265..2e6d2b4 100644
--- a/kernel/nvidia-uvm/uvm_linux.h
+++ b/kernel/nvidia-uvm/uvm_linux.h
@@ -58,6 +58,10 @@
 
 #include <linux/percpu.h>
 
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
+#include <linux/sched/signal.h>
+#endif
+
 #if defined(NV_LINUX_PRINTK_H_PRESENT)
 #include <linux/printk.h>
 #endif
diff --git a/kernel/nvidia-drm/nvidia-drm-linux.c b/kernel/nvidia-drm/nvidia-drm-linux.c
index 30d5758..9336f18 100644
--- a/kernel/nvidia-drm/nvidia-drm-linux.c
+++ b/kernel/nvidia-drm/nvidia-drm-linux.c
@@ -185,7 +185,7 @@ module_init(nv_linux_drm_init);
 module_exit(nv_linux_drm_exit);
 
 #if defined(MODULE_LICENSE)
-  MODULE_LICENSE("MIT");
+  MODULE_LICENSE("Dual MIT/GPL");
 #endif
 #if defined(MODULE_INFO)
   MODULE_INFO(supported, "external");
diff --git a/kernel/nvidia-modeset/nvidia-modeset-linux.c b/kernel/nvidia-modeset/nvidia-modeset-linux.c
index 50d23b5..3655ab7 100644
--- a/kernel/nvidia-modeset/nvidia-modeset-linux.c
+++ b/kernel/nvidia-modeset/nvidia-modeset-linux.c
@@ -1285,7 +1285,7 @@ module_init(nvkms_init);
 module_exit(nvkms_exit);
 
 #if defined(MODULE_LICENSE)
-  MODULE_LICENSE("NVIDIA");
+  MODULE_LICENSE("Dual MIT/GPL");
 #endif
 #if defined(MODULE_INFO)
   MODULE_INFO(supported, "external");
diff --git a/kernel/nvidia-uvm/uvm_common.c b/kernel/nvidia-uvm/uvm_common.c
index 951e0a0..521b346 100644
--- a/kernel/nvidia-uvm/uvm_common.c
+++ b/kernel/nvidia-uvm/uvm_common.c
@@ -388,5 +388,5 @@ module_param(uvm_enable_builtin_tests, int, S_IRUGO);
 MODULE_PARM_DESC(uvm_enable_builtin_tests,
                  "Enable the UVM built-in tests. (This is a security risk)");
 
-MODULE_LICENSE("MIT");
+MODULE_LICENSE("Dual MIT/GPL");
 MODULE_INFO(supported, "external");

Edit:
r8168 patch so now everything should have a patch

diff --git a/src/r8168_n.c b/src/r8168_n.c
index 3c5a7e7..4086291 100755
--- a/src/r8168_n.c
+++ b/src/r8168_n.c
@@ -25731,8 +25731,9 @@ process_pkt:
 
                         if (rtl8168_rx_vlan_skb(tp, desc, skb) < 0)
                                 rtl8168_rx_skb(tp, skb);
-
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,11,0)
                         dev->last_rx = jiffies;
+#endif
                         RTLDEV->stats.rx_bytes += pkt_size;
                         RTLDEV->stats.rx_packets++;
                 }

Edit2:
Alternative patch for broadcom-wl-dkms similar to the r8168 dev->last_rx is never referenced so do not allocate an unreferenced replacement for it that is never freed

diff --git a/src/wl/sys/wl_cfg80211_hybrid.c b/src/wl/sys/wl_cfg80211_hybrid.c
index a9671e2..e2c69f9 100644
--- a/src/wl/sys/wl_cfg80211_hybrid.c
+++ b/src/wl/sys/wl_cfg80211_hybrid.c
@@ -38,6 +38,9 @@
 #include <wlioctl.h>
 #include <proto/802.11.h>
 #include <wl_cfg80211_hybrid.h>
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
+#include <linux/sched/signal.h>
+#endif
 
 #define EVENT_TYPE(e) dtoh32((e)->event_type)
 #define EVENT_FLAGS(e) dtoh16((e)->flags)
diff --git a/src/wl/sys/wl_linux.c b/src/wl/sys/wl_linux.c
index 4a99b9a..89e615b 100644
--- a/src/wl/sys/wl_linux.c
+++ b/src/wl/sys/wl_linux.c
@@ -2916,7 +2916,9 @@ wl_monitor(wl_info_t *wl, wl_rxsts_t *rxsts, void *p)
 	if (skb == NULL) return;
 
 	skb->dev = wl->monitor_dev;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0)
 	skb->dev->last_rx = jiffies;
+#endif
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 22)
 	skb_reset_mac_header(skb);
 #else

Edit3:
https://lkml.org/lkml/2017/3/8/129 ( restore kref_get and kref_put to non-GPL status )
Edit4:

Unable to replicate http://rglinuxtech.com/?p=1970
Expected

 Building modules, stage 2.
 MODPOST 3 modules
 CC /home/rgadsdon/kernel/NVIDIA-Linux-x86_64-375.66/kernel/nvidia-modeset.mod.o
 LD [M] /home/rgadsdon/kernel/NVIDIA-Linux-x86_64-375.66/kernel/nvidia-modeset.ko
 CC /home/rgadsdon/kernel/NVIDIA-Linux-x86_64-375.66/kernel/nvidia-uvm.mod.o
 LD [M] /home/rgadsdon/kernel/NVIDIA-Linux-x86_64-375.66/kernel/nvidia-uvm.ko
 CC /home/rgadsdon/kernel/NVIDIA-Linux-x86_64-375.66/kernel/nvidia.mod.o
 LD [M] /home/rgadsdon/kernel/NVIDIA-Linux-x86_64-375.66/kernel/nvidia.ko
make[2]: Leaving directory '/usr/src/linux-4.11'
make[1]: Leaving directory '/usr/src/linux-4.11'


Produced

  Building modules, stage 2.
  MODPOST 3 modules
FATAL: modpost: GPL-incompatible module nvidia-uvm.ko uses GPL-only symbol 'refcount_inc'
make[2]: *** [scripts/Makefile.modpost:91: __modpost] Error 1
make[1]: *** [Makefile:1496: modules] Error 2
make[1]: Leaving directory '/usr/lib/modules/4.11.0-1-ARCH/build'
make: *** [Makefile:81: modules] Error 2

Update5:
Update 4 used 378.13 by mistake instead of 375.66 now produced working driver without license issue,  negatives the nvidia-drm driver is not built and an epoch downgrade is required.

# $Id: PKGBUILD 291106 2017-03-20 13:41:15Z tpowa $
# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Thomas Baechler <thomas@archlinux.org>

pkgbase=nvidia
pkgname=(nvidia nvidia-dkms)
pkgver=375.66
_extramodules=extramodules-4.11-ARCH
pkgrel=1
epoch=1
pkgdesc="NVIDIA drivers for linux"
arch=('i686' 'x86_64')
url="http://www.nvidia.com/"
makedepends=('nvidia-libgl' "nvidia-utils=${pkgver}" 'linux' 'linux-headers>=4.11' 'linux-headers<4.12')
license=('custom')
options=('!strip')
source_i686=("http://us.download.nvidia.com/XFree86/Linux-x86/${pkgver}/NVIDIA-Linux-x86-${pkgver}.run")
source_x86_64=("http://us.download.nvidia.com/XFree86/Linux-x86_64/${pkgver}/NVIDIA-Linux-x86_64-${pkgver}-no-compat32.run")
md5sums_i686=('47dddb796fe39497cf6ae374591f6eb9')
md5sums_x86_64=('361843d4b714a9876b3599fd8dca2412')

[[ "$CARCH" = "i686" ]] && _pkg="NVIDIA-Linux-x86-${pkgver}"
[[ "$CARCH" = "x86_64" ]] && _pkg="NVIDIA-Linux-x86_64-${pkgver}-no-compat32"

prepare() {
    sh "${_pkg}.run" --extract-only
    cd "${_pkg}"

    cp -a kernel kernel-dkms
    cd kernel-dkms
    sed -i "s/__VERSION_STRING/${pkgver}/" dkms.conf
    sed -i 's/__JOBS/`nproc`/' dkms.conf
    sed -i 's/__DKMS_MODULES//' dkms.conf
    sed -i '$iBUILT_MODULE_NAME[0]="nvidia"\
DEST_MODULE_LOCATION[0]="/kernel/drivers/video"\
BUILT_MODULE_NAME[1]="nvidia-uvm"\
DEST_MODULE_LOCATION[1]="/kernel/drivers/video"\
BUILT_MODULE_NAME[2]="nvidia-modeset"\
DEST_MODULE_LOCATION[2]="/kernel/drivers/video"' dkms.conf
}

build() {
    _kernver="$(cat /usr/lib/modules/${_extramodules}/version)"
    cd "${_pkg}"/kernel
    make NV_EXCLUDE_KERNEL_MODULES=nvidia-drm SYSSRC=/usr/lib/modules/"${_kernver}/build" module
}

package_nvidia() {
    pkgdesc="NVIDIA drivers for linux"
    depends=('linux>=4.11' 'linux<4.12' "nvidia-utils=${pkgver}" 'libgl')
    install=nvidia.install

    install -D -m644 "${srcdir}/${_pkg}/kernel/nvidia.ko" \
        "${pkgdir}/usr/lib/modules/${_extramodules}/nvidia.ko"
    install -D -m644 "${srcdir}/${_pkg}/kernel/nvidia-modeset.ko" \
         "${pkgdir}/usr/lib/modules/${_extramodules}/nvidia-modeset.ko"

    if [[ "$CARCH" = "x86_64" ]]; then
        install -D -m644 "${srcdir}/${_pkg}/kernel/nvidia-uvm.ko" \
            "${pkgdir}/usr/lib/modules/${_extramodules}/nvidia-uvm.ko"
    fi

    gzip "${pkgdir}/usr/lib/modules/${_extramodules}/"*.ko
    install -d -m755 "${pkgdir}/usr/lib/modprobe.d"

    echo "blacklist nouveau" >> "${pkgdir}/usr/lib/modprobe.d/nvidia.conf"
}

package_nvidia-dkms() {
    pkgdesc="NVIDIA driver sources for linux"
    depends=('dkms' "nvidia-utils=$pkgver" 'libgl')
    optdepends=('linux-headers: Build the module for Arch kernel'
                'linux-lts-headers: Build the module for LTS Arch kernel')
    conflicts+=('nvidia')

    cd ${_pkg}
    install -dm 755 "${pkgdir}"/usr/{lib/modprobe.d,src}
    cp -dr --no-preserve='ownership' kernel-dkms "${pkgdir}/usr/src/nvidia-${pkgver}"
    echo 'blacklist nouveau' > "${pkgdir}/usr/lib/modprobe.d/nvidia.conf"
}

Update6:  new nvidia driver 381.22 similar to 375.66 with the exception the use of the epoch would not be required.

Last edited by loqs (2017-05-09 23:26:05)

Online

#2 2017-05-19 21:51:25

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,068
Website

Re: [arch-dev-public] Kernel 4.11 status

Did you consider opening a fly spray to share these patches with the packagers?


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#3 2017-05-19 22:18:58

loqs
Member
Registered: 2014-03-06
Posts: 11,599

Re: [arch-dev-public] Kernel 4.11 status

https://bugs.archlinux.org/task/54086 my understanding is it will not reach the maintainers until it is assigned.  Perhaps there is some deficiency in the report that is preventing assignment as more recently opened bug reports have been assigned.
I did not do a seperate report for 304xx due to https://bbs.archlinux.org/viewtopic.php?id=223872,  SanskritFritz is the only forum member that I am aware of with hardware for 304xx that could open one.

Online

#4 2017-05-19 22:20:36

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,068
Website

Re: [arch-dev-public] Kernel 4.11 status

OK.  For what it's worth, I am able to build the nvidia-xxx-ck drivers with the patches you linked and bumped the linux-ck series of packages in the AUR with a solicitation for feedback.  Thank you for posting.

graysky wrote:

Notes: I need some feedback on the 4.11 release, specifically the extra packages such as nvidia-304xx-ck, nvidia-340xx-ck, broadcom-wl-ck, and virtualbox-ck modules. I have successfully build all of these but can only test nvidia-ck and virtualbox-ck since I do not have older nvidia hardware nor broadcom-wl hardware. Once I get some positive feedback, I will build up the 4.11.x series in [repo-ck] but for now, will hold. Also 4.11.2 is due out tomorrow.

Last edited by graysky (2017-05-19 22:24:09)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#5 2017-05-20 22:26:29

loqs
Member
Registered: 2014-03-06
Posts: 11,599

Re: [arch-dev-public] Kernel 4.11 status

As requested by ropid https://www.reddit.com/r/archlinux/comm … odule_for/

$ curl -o 4.11_kernel.patch https://pkgs.rpmfusion.org/cgit/nonfree/nvidia-340xx-kmod.git/plain/4.11_kernel.patch?id=425e9ce06d39031f0ad07a8aaf5f1684bf865d93

To download the patch provided in the first link and save it as the name referenced in the following PKGBUILD

# $Id$
# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Thomas Baechler <thomas@archlinux.org>

pkgbase=nvidia-340xx
pkgname=(nvidia-340xx nvidia-340xx-dkms)
pkgver=340.102
_extramodules=extramodules-4.10-ARCH
pkgrel=6
arch=('i686' 'x86_64')
url="http://www.nvidia.com/"
makedepends=("nvidia-340xx-utils=${pkgver}" 'linux' 'linux-headers>=4.10' 'linux-headers<4.11')
conflicts=('nvidia')
license=('custom')
options=(!strip)
source=('fs52243.patch' '4.10.0_kernel.patch' '4.11_kernel.patch')
source_i686+=("http://us.download.nvidia.com/XFree86/Linux-x86/${pkgver}/NVIDIA-Linux-x86-${pkgver}.run")
source_x86_64+=("http://us.download.nvidia.com/XFree86/Linux-x86_64/${pkgver}/NVIDIA-Linux-x86_64-${pkgver}-no-compat32.run")
sha512sums=('de4f697d64f8e73c4aadec1a407884a6bc459c0020d4bfd19740fe4177a60bb801fe8a74ef6f7fa2e89c6cd648ea4daf152799ae344a145c06480a6eef0c5bca'
            '88a2b448c1e8445dc43820328e86d8f20eb7e3cb5774e704cd44191a9fa26064264510c1adc9ea938fa2c92075496f3a27bd52ae6e6f4ec5fa6d4a829dd961e8'
            '48eb48dfd118a5d76d0e01c3bb5aedb7e6ec153a40680c0ebd6842c74fe1dda49e1cc8dc2b2493b7355de47d3013c578a13c254c5bb3eecdbfcf8f4ebc7c7c34')
sha512sums_i686=('bea700c925a6044fcded40324bb389c5fa1aadc40831f685a76e7b0ded11161f492960950c201467e564d157dcbe0c330d13a2014f51d0073002c5a262a6f0ca')
sha512sums_x86_64=('2a29e6418244ea384e4237d74057bd8e56247b1c503cf623dea34a3b1065d8783879aa7e6a802dd31f0a10cf81cfcab2a1b1a8269b97996f15fa1838c0a3a44b')

[[ "$CARCH" = "i686" ]] && _pkg="NVIDIA-Linux-x86-${pkgver}"
[[ "$CARCH" = "x86_64" ]] && _pkg="NVIDIA-Linux-x86_64-${pkgver}-no-compat32"

prepare() {
    sh "${_pkg}.run" --extract-only
    cd "${_pkg}"
    # patches here

    patch -Np0 < "${srcdir}"/fs52243.patch
    patch -Np1 < "${srcdir}"/4.10.0_kernel.patch
    patch -Np1 < "${srcdir}"/4.11_kernel.patch

    cp -a kernel kernel-dkms
}

build() {
    _kernver="$(cat /usr/lib/modules/${_extramodules}/version)"
    cd "${_pkg}"/kernel
    make SYSSRC=/usr/lib/modules/"${_kernver}/build" module

    cd uvm
    make SYSSRC=/usr/lib/modules/"${_kernver}/build" module
}

package_nvidia-340xx() {
    pkgdesc="NVIDIA drivers for linux, 340xx legacy branch"
    depends=('linux>=4.10' 'linux<4.11' 'libgl' "nvidia-340xx-utils=${pkgver}")
    conflict+=('nvidia-340xx-dkms')
    install=nvidia-340xx.install

    install -D -m644 "${srcdir}/${_pkg}/kernel/nvidia.ko" \
        "${pkgdir}/usr/lib/modules/${_extramodules}/nvidia.ko"
    install -D -m644 "${srcdir}/${_pkg}/kernel/uvm/nvidia-uvm.ko" \
        "${pkgdir}/usr/lib/modules/${_extramodules}/nvidia-uvm.ko"
    gzip "${pkgdir}/usr/lib/modules/${_extramodules}/"*.ko
    install -d -m755 "${pkgdir}/usr/lib/modprobe.d"
    echo "blacklist nouveau" >> "${pkgdir}/usr/lib/modprobe.d/nvidia.conf"
}

package_nvidia-340xx-dkms() {
    pkgdesc="NVIDIA driver sources for linux, 340xx legacy branch"
    depends=('dkms' "nvidia-340xx-utils=$pkgver")
    optdepends=('linux-headers: Build the module for Arch kernel'
                'linux-lts-headers: Build the module for LTS Arch kernel')
    conflicts+=('nvidia-340xx')

    cd ${_pkg}
    install -dm 755 "${pkgdir}"/usr/{lib/modprobe.d,src}
    cp -dr --no-preserve='ownership' kernel-dkms "${pkgdir}"/usr/src/nvidia-${pkgver}
    echo 'blacklist nouveau' > "${pkgdir}"/usr/lib/modprobe.d/nvidia.conf
    cat "${pkgdir}"/usr/src/nvidia-${pkgver}/uvm/dkms.conf.fragment >> "${pkgdir}"/usr/src/nvidia-${pkgver}/dkms.conf
}

See also Patching_in_ABS Arch_Build_System Makepkg PKGBUILD

Online

#6 2017-05-22 11:50:42

mmd
Member
Registered: 2013-08-02
Posts: 4

Re: [arch-dev-public] Kernel 4.11 status

The fact that 4.11 is blocked does not excuse the maintainer from keeping the linux package updated to the newest 4.10 version, as currently it is already 4 revisions behind the latest.

Offline

#7 2017-05-22 12:33:07

mrunion
Member
From: Jonesborough, TN
Registered: 2007-01-26
Posts: 1,938
Website

Re: [arch-dev-public] Kernel 4.11 status

mmd wrote:

The fact that 4.11 is blocked does not excuse the maintainer from keeping the linux package updated to the newest 4.10 version, as currently it is already 4 revisions behind the latest.

Maybe not, but the fact that these are volunteers and doing things on their own time, with their own resources and energy does. It'll be "ready when it's ready".


Matt

"It is very difficult to educate the educated."

Offline

#8 2017-05-22 14:21:34

drcouzelis
Member
From: Connecticut, USA
Registered: 2009-11-09
Posts: 4,072
Website

Re: [arch-dev-public] Kernel 4.11 status

Thanks to how amazing and simple Arch Linux is, I was able to download the official Arch Linux kernel PKGBUILD file for 4.11 and build it myself. So easy! smile

Offline

#9 2017-05-22 14:26:22

loqs
Member
Registered: 2014-03-06
Posts: 11,599

Re: [arch-dev-public] Kernel 4.11 status

Packages are now in testing so somehow Tobias Powalowski has obtained the 4.11_kernel.patch for nvidia-304xx and nvidia-340xx.  (patches are the same verified by sha512)
Edit:
Should add this still leaves the question of how to foward such patches to the maintainer following a request on a closed list as both email and bugreport appear to have failed.

Last edited by loqs (2017-05-22 16:11:44)

Online

#10 2017-05-23 16:28:53

TheChickenMan
Member
From: United States
Registered: 2015-07-25
Posts: 353

Re: [arch-dev-public] Kernel 4.11 status

mmd wrote:

The fact that 4.11 is blocked does not excuse the maintainer from keeping the linux package updated to the newest 4.10 version, as currently it is already 4 revisions behind the latest.

Once the newer version has already been started to be worked on and put into testing it's really hard for them to push updates to the older, still in use, version. I think this is because it's the same package name and both versions would need somehow to go through testing (since the kernel is an important package). This problem happens every time there is a major update to the linux package and there is some kind of issue with the new version. I think a good way to fix this would be to add an "unstable testing" repo that things like new versions of linux or anything expected to be problematic for a long time could be added to.


If quantum mechanics hasn't profoundly shocked you, you haven't understood it yet.
Niels Bohr

Offline

Board footer

Powered by FluxBB