Re: [opensuse-factory] Documentation for patching kernel
On Monday, September 30, 2013 01:28:59 PM Roman Bysh wrote:
On Mon 30 Sep 2013 01:25:30 PM EDT, Upscope wrote:
On Sunday, September 29, 2013 05:46:30 PM Thomas Taylor wrote:
On Sun, 29 Sep 2013 08:58:54 -0700
Upscope <upscope@nwi.net> wrote:
On Sunday, September 29, 2013 01:45:56 PM Sid Boyce wrote:
On 29/09/13 07:13, Thomas Taylor wrote:
It has been many years since I had to patch a kernel and need to have a location for the requisite documentation.
I have obtained "kernel_v3.11.patch" but in searching the SUSE documentation have not found the official procedure to apply this patch. Would someone please supply an URL or location where that patch application is provided?
Thanks, Tom
Are you sure that patch is a kernel patch? The title seems to suggest it's a patch for the NVidia proprietary drivers and it would depend on which driver you need to patch.
For the 325.15 driver package. "sh NVIDIA-Linux-x86_64-325.15.run --apply-patch kernel_3.11.patch"
There are a couple of patches with that name, this is the shortest of them. # less kernel_v3.11.patch --- a/kernel/nv-linux.h +++ b/kernel/nv-linux.h @@ -957,7 +957,11 @@ static inline int nv_execute_on_all_cpus
#endif
#if !defined(NV_VMWARE)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 11, 0) +#define NV_NUM_PHYSPAGES get_num_physpages() +#else
#define NV_NUM_PHYSPAGES num_physpages
+#endif
#define NV_GET_CURRENT_PROCESS() current->tgid #define NV_IN_ATOMIC() in_atomic() #define NV_LOCAL_BH_DISABLE() local_bh_disable()
Regards Sid.
-- Sid Boyce ... Hamradio License G3VBV, Licensed Private Pilot Emeritus IBM/Amdahl Mainframes and Sun/Fujitsu Servers Tech Support Senior Staff Specialist, Cricket Coach Microsoft Windows Free Zone - Linux used for all Computing Tasks
-- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
Not sure if you can answer this. The patch I got for 325.15 has the following: CODE: ------------ nvidia-3.11.patch Index: NVIDIA-Linux-x86_64-325.15/kernel/nv-linux.h
===================================================================
--- NVIDIA-Linux-x86_64-325.15.orig/kernel/nv-linux.h +++ NVIDIA-Linux-x86_64-325.15/kernel/nv-linux.h @@ -958,7 +958,11 @@ static inline int nv_execute_on_all_cpus
#endif
#if !defined(NV_VMWARE)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 11, 0) +#define NV_NUM_PHYSPAGES get_num_physpages() +#else
#define NV_NUM_PHYSPAGES num_physpages
+#endif
#define NV_GET_CURRENT_PROCESS() current->tgid #define NV_IN_ATOMIC() in_atomic() #define NV_LOCAL_BH_DISABLE() local_bh_disable()
---------- Is the line starting with @@ correct in the your version or mine? My version works with 3.11.0 but not later3.11 versions.
Thanks Russ Sorry first time I hit wrong button and sent this direct to Sid.
Thanks for all the replies. Yes, it is a patch for the Nvidia run file and not the kernel. My mistake.
The version of the patch file is different from both of yours:
My version: 0f "kernel-v3.11.patch
--- a/kernel/nv-linux.h +++ b/kernel/nv-linux.h @@ -957,7 +957,11 @@ static inline int nv_execute_on_all_cpus
#endif
#if !defined(NV_VMWARE)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 11, 0) +#define NV_NUM_PHYSPAGES get_num_physpages() +#else
#define NV_NUM_PHYSPAGES num_physpages
+#endif
#define NV_GET_CURRENT_PROCESS() current->tgid #define NV_IN_ATOMIC() in_atomic() #define NV_LOCAL_BH_DISABLE() local_bh_disable()
--- a/kernel/nv-drm.c +++ b/kernel/nv-drm.c @@ -106,7 +106,11 @@ static const struct file_operations nv_d
.unlocked_ioctl = drm_ioctl, .mmap = drm_gem_mmap, .poll = drm_poll,
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 12, 0) +// .fasync = drm_fasync, +#else
.fasync = drm_fasync,
+#endif
.read = drm_read, .llseek = noop_llseek,
};
@@ -202,12 +206,16 @@ RM_STATUS NV_API_CALL nv_alloc_os_descri
memset(&nv_obj->base, 0, sizeof(nv_obj->base)); nv_obj->pages = pages;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 12, 0) + drm_gem_private_object_init(nvl->drm, &nv_obj->base, size); +#else
ret = drm_gem_private_object_init(nvl->drm, &nv_obj->base, size);
if (ret)
{
status = RM_ERR_OPERATING_SYSTEM; goto done;
}
+#endif
ret = drm_gem_handle_create(file_priv, &nv_obj->base, handle); if (ret)
--- a/kernel/nv.c +++ b/kernel/nv.c @@ -16,8 +16,12 @@
#include "rmil.h"
#if defined(MODULE_LICENSE)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 12, 0) +MODULE_LICENSE("GPL"); +#else
MODULE_LICENSE("NVIDIA"); #endif
+#endif
#if defined(MODULE_INFO) MODULE_INFO(supported, "external"); #endif
Not sure if you trimmed your listings or are there really different versions floating around with the same title?
Anyway, when II attempted to use either method suggested they both failed with mainly "file not found" errors.
Thanks, Tom
-- The foolish man seeks happiness in the distance. The wise man grows it under his feet.
- James Oppenheim
^^ --... ...-- / -.- --. --... -.-. ..-. -.-.
^^^^ Tom Taylor - retired penguin - KG7CFC AMD Phenom II x4 955 -- 4GB RAM -- 2x1.5TB sata2 openSUSE 13.1_M4-x86_64 KDE 4.11.00, FF 22.0, claws-mail 3.9.2 registered linux user 263467 -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
Tom: I will try your much larger patch. The patch I used patch: CODE: --------- NVIDIA-Linux-x86_64-325.15/kernel/nv-linux.h _______ which is extracted from the NVIDIA-Linux-x86_64-325.15.run file. it works fine on 3.11.0. I will try your more complete patch on 3.11. latest update of the 12.3 kernel. If that works and I get my 13.1 Beta 1 to work I'll try it there. its on a seperate disk..
Will post result.
Thanks for the quick response. Russ
Are you using Tumbleweed kernels. What's the exact kernel?
-- Cheers!
Roman This is the one that is working on 12.3 now, No Tumbleweed installed:
CODE: ----------- uname -a Linux linux-rpl7 3.11.0-2.g0a1c41f-desktop #1 SMP PREEMPT Thu Sep 5 10:20:59 UTC 2013 (0a1c41f) x86_64 x86_64 x86_64 GNU/Linux _______ Others installed are from: http://download.opensuse.org/repositories/Kernel:/stable/standard/ There is an update waiting to download now: 3.11.1-3.1.gfeffbf9 (3.11.2-1.1.g4c1fc5a) I have two other 3.11.1-3 and 3.11.1-2 which I will uninstall. Thanks for your continuing input. Russ -- openSUSE 12.3(Linux 3.11.0-2.g0a1c41f-desktop)|KDE 4.11.1 |Intel core2duo 2.5 MHZ,|8GB DDR3|GeForce 8400GS (NVIDIA-Linux-x86_64-325.15 Patched) -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
* Upscope <upscope@nwi.net> [09-30-13 17:30]:
This is the one that is working on 12.3 now, No Tumbleweed installed:
CODE: ----------- uname -a Linux linux-rpl7 3.11.0-2.g0a1c41f-desktop #1 SMP PREEMPT Thu Sep 5 10:20:59 UTC 2013 (0a1c41f) x86_64 x86_64 x86_64 GNU/Linux _______
Others installed are from: http://download.opensuse.org/repositories/Kernel:/stable/standard/
There is an update waiting to download now: 3.11.1-3.1.gfeffbf9 (3.11.2-1.1.g4c1fc5a)
I have two other 3.11.1-3 and 3.11.1-2 which I will uninstall.
Thanks for your continuing input.
Seven quoting levels (fully quoted) removed. Don't you believe this a little absurd? Please be a little more considerate. -- (paka)Patrick Shanahan Plainfield, Indiana, USA @ptilopteri http://en.opensuse.org openSUSE Community Member facebook/ptilopteri http://wahoo.no-ip.org Photo Album: http://wahoo.no-ip.org/gallery2 Registered Linux User #207535 @ http://linuxcounter.net -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On 09/30/2013 05:27 PM, Upscope wrote:
This is the one that is working on 12.3 now, No Tumbleweed installed:
CODE: ----------- uname -a Linux linux-rpl7 3.11.0-2.g0a1c41f-desktop #1 SMP PREEMPT Thu Sep 5 10:20:59 UTC 2013 (0a1c41f) x86_64 x86_64 x86_64 GNU/Linux _______
Others installed are from: http://download.opensuse.org/repositories/Kernel:/stable/standard/
There is an update waiting to download now: 3.11.1-3.1.gfeffbf9 (3.11.2-1.1.g4c1fc5a)
I have two other 3.11.1-3 and 3.11.1-2 which I will uninstall.
Thanks for your continuing input.
Russ
The patch works with the two kernels that you are removing. -- Cheers! Roman ------------------------------------------- openSUSE -- Get it! Discover it! Share it! ------------------------------------------- http://linuxcounter.net/ #179293 -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On 09/30/2013 05:27 PM, Upscope wrote:
This is the one that is working on 12.3 now, No Tumbleweed installed:
CODE: ----------- uname -a Linux linux-rpl7 3.11.0-2.g0a1c41f-desktop #1 SMP PREEMPT Thu Sep 5 10:20:59 UTC 2013 (0a1c41f) x86_64 x86_64 x86_64 GNU/Linux _______
Others installed are from: http://download.opensuse.org/repositories/Kernel:/stable/standard/
There is an update waiting to download now: 3.11.1-3.1.gfeffbf9 (3.11.2-1.1.g4c1fc5a)
I have two other 3.11.1-3 and 3.11.1-2 which I will uninstall.
Thanks for your continuing input.
Russ
The patch works with the two kernels that you are removing.
-- Cheers!
Roman ------------------------------------------- openSUSE -- Get it! Discover it! Share it! ------------------------------------------- http://linuxcounter.net/ #179293 -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org Thanks Roman, I have the 3.11.1-3.gfeffbf9-desktop(x86_64) working with
On Monday, September 30, 2013 07:48:43 PM Roman Bysh wrote: the kernel_v3.11.patch on 12.3. I also got 13.1 Beta 1 installed from the DVD after failing update of 13.1 MS4. Will try the patch there. It should work. Thanks again Appreciate all the input I recieved. -- openSUSE 12.3(Linux 3.11.1-3.gfeffbf9-desktop)|KDE 4.11.1 |Intel core2duo 2.5 MHZ,|8GB DDR3|GeForce 8400GS (NVIDIA-Linux-x86_64-325.15 Patched) -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On 10/03/2013 01:28 PM, Upscope wrote:
On 09/30/2013 05:27 PM, Upscope wrote:
This is the one that is working on 12.3 now, No Tumbleweed installed:
CODE: ----------- uname -a Linux linux-rpl7 3.11.0-2.g0a1c41f-desktop #1 SMP PREEMPT Thu Sep 5 10:20:59 UTC 2013 (0a1c41f) x86_64 x86_64 x86_64 GNU/Linux _______
Others installed are from: http://download.opensuse.org/repositories/Kernel:/stable/standard/
There is an update waiting to download now: 3.11.1-3.1.gfeffbf9 (3.11.2-1.1.g4c1fc5a)
I have two other 3.11.1-3 and 3.11.1-2 which I will uninstall.
Thanks for your continuing input.
Russ
The patch works with the two kernels that you are removing.
-- Cheers!
Roman ------------------------------------------- openSUSE -- Get it! Discover it! Share it! ------------------------------------------- http://linuxcounter.net/ #179293 -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org Thanks Roman, I have the 3.11.1-3.gfeffbf9-desktop(x86_64) working with
On Monday, September 30, 2013 07:48:43 PM Roman Bysh wrote: the kernel_v3.11.patch on 12.3. I also got 13.1 Beta 1 installed from the DVD after failing update of 13.1 MS4. Will try the patch there. It should work.
Thanks again
Appreciate all the input I received.
No problem. I'm very happy with it as it address more than the simpler patch for the /kernel/nv-linux.h file. The latter patch works with the newer Tumbleweed kernels. -- Cheers! Roman -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On 10/03/2013 01:28 PM, Upscope wrote:
On 09/30/2013 05:27 PM, Upscope wrote:
This is the one that is working on 12.3 now, No Tumbleweed installed:
CODE: ----------- uname -a Linux linux-rpl7 3.11.0-2.g0a1c41f-desktop #1 SMP PREEMPT Thu Sep 5 10:20:59 UTC 2013 (0a1c41f) x86_64 x86_64 x86_64 GNU/Linux _______
Others installed are from: http://download.opensuse.org/repositories/Kernel:/stable/standard/
There is an update waiting to download now: 3.11.1-3.1.gfeffbf9 (3.11.2-1.1.g4c1fc5a)
I have two other 3.11.1-3 and 3.11.1-2 which I will uninstall.
Thanks for your continuing input.
Russ
The patch works with the two kernels that you are removing.
-- Cheers!
Roman ------------------------------------------- openSUSE -- Get it! Discover it! Share it! ------------------------------------------- http://linuxcounter.net/ #179293 -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org Thanks Roman, I have the 3.11.1-3.gfeffbf9-desktop(x86_64) working with
On Monday, September 30, 2013 07:48:43 PM Roman Bysh wrote: the kernel_v3.11.patch on 12.3. I also got 13.1 Beta 1 installed from the DVD after failing update of 13.1 MS4. Will try the patch there. It should work.
Thanks again
Appreciate all the input I recieved.
You are welcome. We're getting the driver working faster than the full-time engineers ant nVidia. -- Cheers! Roman -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
participants (3)
-
Patrick Shanahan
-
Roman Bysh
-
Upscope