diff options
Diffstat (limited to 'system')
-rw-r--r-- | system/nvidia-legacy304-kernel/changelog.txt | 2 | ||||
-rw-r--r-- | system/nvidia-legacy304-kernel/disable-mtrr.patch | 25 | ||||
-rw-r--r-- | system/nvidia-legacy304-kernel/nvidia-legacy304-kernel.SlackBuild | 6 |
3 files changed, 30 insertions, 3 deletions
diff --git a/system/nvidia-legacy304-kernel/changelog.txt b/system/nvidia-legacy304-kernel/changelog.txt index f0e784494e3a0..91222c8feaa3b 100644 --- a/system/nvidia-legacy304-kernel/changelog.txt +++ b/system/nvidia-legacy304-kernel/changelog.txt @@ -13,3 +13,5 @@ 3.2 08-FEB-2015 version update, restored 32-bit compatibility 3.3 05-SEP-2015 version update 3.4 13-DEC-2015 version update, X.org 1.18 +3.5 26-JUL-2016 Patched to not use deprecated kernel mtrr API in >=4.3.x kernels --rworkman + diff --git a/system/nvidia-legacy304-kernel/disable-mtrr.patch b/system/nvidia-legacy304-kernel/disable-mtrr.patch new file mode 100644 index 0000000000000..326c287ec3914 --- /dev/null +++ b/system/nvidia-legacy304-kernel/disable-mtrr.patch @@ -0,0 +1,25 @@ +Author: Luca Boccassi <luca.boccassi@gmail.com> +Description: Disable MTRR on kernel >= 4.3 + From kernel 4.3 and newer (commit 2baa891e42d84) mtrr_add and mtrr_del are no + longer exported. The Nvidia kernel shim still uses it as of 304.131, causing + the module to error out when loading. Disable MTRR if running on 4.3 or greater + until upstream fixes it. + +--- a/nv-linux.h ++++ b/nv-linux.h +@@ -256,6 +256,15 @@ + #include <linux/seq_file.h> + #endif + ++/* ++ * As of version 304.131, os-agp.c and os-mtrr.c still use deprecated ++ * kernel APIs for mtrr which are no longer exported since 4.3, causing ++ * the module to error out when loaded. ++ */ ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,3,0) ++#undef CONFIG_MTRR ++#endif ++ + #if !defined(NV_VMWARE) && defined(CONFIG_MTRR) + #include <asm/mtrr.h> + #endif diff --git a/system/nvidia-legacy304-kernel/nvidia-legacy304-kernel.SlackBuild b/system/nvidia-legacy304-kernel/nvidia-legacy304-kernel.SlackBuild index 8b48c3c9eb369..ad1af699e17ce 100644 --- a/system/nvidia-legacy304-kernel/nvidia-legacy304-kernel.SlackBuild +++ b/system/nvidia-legacy304-kernel/nvidia-legacy304-kernel.SlackBuild @@ -23,13 +23,11 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# Thanks to Robby Workman for suggestions to improve this script. -# # See changelog.txt PRGNAM=nvidia-legacy304-kernel VERSION=${VERSION:-304.131} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} KERNEL=${KERNEL:-$(uname -r)} @@ -79,6 +77,8 @@ find -L . \ cd kernel || exit 1 +patch -p1 < $CWD/disable-mtrr.patch || exit 1 + make SYSSRC=$KERNELPATH module || exit 1 mkdir -p $PKG/lib/modules/$KERNEL/kernel/drivers/video |