From ec0a126053325c716454436bbffbdb8137e8ba6e Mon Sep 17 00:00:00 2001 From: Paul Menzel Date: Thu, 16 Jun 2016 14:20:18 +0200 Subject: [PATCH 1/8] linux: Add version 4.6.3 From Kernel Newbies [1]: > Linux 4.6 was released on Sun, 15 May 2016. > > Summary: This release adds support for USB 3.1 SuperSpeedPlus (10 > Gbps), the new distributed file system OrangeFS, a more reliable > out-of-memory handling, support for Intel memory protection keys, a > facility to make easier and faster implementations of application > layer protocols, support for 802.1AE MAC-level encryption (MACsec), > support for the version V of the BATMAN protocol, a OCFS2 online inode > checker, support for cgroup namespaces, support for the pNFS SCSI > layout, and many other improvements and new drivers. Copy bee file from Linux kernel 4.4.11-88. [1] http://kernelnewbies.org/Linux_4.6 --- linux-4.6.3-91.bee | 82 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100755 linux-4.6.3-91.bee diff --git a/linux-4.6.3-91.bee b/linux-4.6.3-91.bee new file mode 100755 index 000000000..ba3ec5485 --- /dev/null +++ b/linux-4.6.3-91.bee @@ -0,0 +1,82 @@ +#!/bin/env beesh + +# note: CONFIG=/boot/config-WHATEVER BEE_MAKEFLAGS='-j 40' ./linux-xxx.bee + +KERNELVERSION=${PKGVERSION} +if [ -z "${PKGVERSION[3]}" ] ; then + KERNELVERSION=${KERNELVERSION}.0 +fi + +echo $KERNELVERSION + +SRCURL[0]="http://www.kernel.org/pub/linux/kernel/v${PKGVERSION[1]}.x/linux-${PKGVERSION}.tar.xz" + +# backported to stable # PATCHURL+=(/src/mariux/patches/linux-0001-NFS-Fix-attribute-cache-revalidation.patch) +PATCHURL+=(/src/mariux/patches/linux-0002-NFS-Ensure-we-revalidate-attributes-before-using-exe.patch) +PATCHURL+=(/src/mariux/patches/linux-0003-NFSv4-Don-t-perform-cached-access-checks-before-we-v.patch) +PATCHURL+=(/src/mariux/patches/linux-0001-net-better-skb-sender_cpu-and-skb-napi_id-cohabitati.patch) + +# EXCLUDE="" + +#CONFIG= + +KERNELLOCAL=".mx64.${PKGREVISION}" +FULLKERNELVERSION="${KERNELVERSION}${KERNELLOCAL}" + +B=${S} + +mee_patch() { + echo "PATCH $@" + bee_patch $@ +} + +mee_configure() { + echo "configure $@" + if [ -e /proc/config.gz ] ; then + zcat /proc/config.gz >config-current + RUNNING=config-current + else + RUNNING=/boot/config-$(uname -r) + fi + + : ${CONFIG:=${RUNNING}} + + if [ ! -e ${CONFIG} ] ; then + echo "can't find config '${CONFIG}'" + exit 1 + fi + + cp -v ${CONFIG} .config + + LOCALVERSION="\"${KERNELLOCAL}\"" + sed -i -e "s@CONFIG_LOCALVERSION=.*@CONFIG_LOCALVERSION=${LOCALVERSION}@" .config + + echo "doing make -C ${S} olddefconfig in ${PWD} .." + + make olddefconfig + + echo "doing make -C ${S} menuconfig in ${PWD} .." + + make menuconfig +} + +mee_build() { + echo "build $@" + make ${BEE_MAKEFLAGS} +} + +mee_install() { + echo "install $@" + + make modules_install INSTALL_MOD_PATH=${D} + make install INSTALL_PATH=${D}/boot +# make firmware_install INSTALL_MOD_PATH=${D} + + rm -v ${D}/lib/modules/${FULLKERNELVERSION}/{source,build} + + ln -sv /usr/src/linux/${PKGALLPKG}/source ${D}/lib/modules/${FULLKERNELVERSION}/source + ln -sv /usr/src/linux/${PKGALLPKG}/build ${D}/lib/modules/${FULLKERNELVERSION}/build + + ln -sv bzImage-${FULLKERNELVERSION} ${D}/boot/mariux.${PKGREVISION} +} + From 5c008dbfee7bfc5120531cd8c7fd9f3b69cee549 Mon Sep 17 00:00:00 2001 From: Paul Menzel Date: Thu, 16 Jun 2016 14:20:34 +0200 Subject: [PATCH 2/8] linux-4.6.3: Use HTTPS to download archive --- linux-4.6.3-91.bee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux-4.6.3-91.bee b/linux-4.6.3-91.bee index ba3ec5485..54a8181d4 100755 --- a/linux-4.6.3-91.bee +++ b/linux-4.6.3-91.bee @@ -9,7 +9,7 @@ fi echo $KERNELVERSION -SRCURL[0]="http://www.kernel.org/pub/linux/kernel/v${PKGVERSION[1]}.x/linux-${PKGVERSION}.tar.xz" +SRCURL[0]="https://www.kernel.org/pub/linux/kernel/v${PKGVERSION[1]}.x/linux-${PKGVERSION}.tar.xz" # backported to stable # PATCHURL+=(/src/mariux/patches/linux-0001-NFS-Fix-attribute-cache-revalidation.patch) PATCHURL+=(/src/mariux/patches/linux-0002-NFS-Ensure-we-revalidate-attributes-before-using-exe.patch) From fd19ce47633a71e9a9e6ec8cf61d40321f44cd42 Mon Sep 17 00:00:00 2001 From: Paul Menzel Date: Thu, 16 Jun 2016 14:46:00 +0200 Subject: [PATCH 3/8] linux-4.6.3: Remove already applied patches --- linux-4.6.3-91.bee | 6 ------ 1 file changed, 6 deletions(-) diff --git a/linux-4.6.3-91.bee b/linux-4.6.3-91.bee index 54a8181d4..031c740d1 100755 --- a/linux-4.6.3-91.bee +++ b/linux-4.6.3-91.bee @@ -11,11 +11,6 @@ echo $KERNELVERSION SRCURL[0]="https://www.kernel.org/pub/linux/kernel/v${PKGVERSION[1]}.x/linux-${PKGVERSION}.tar.xz" -# backported to stable # PATCHURL+=(/src/mariux/patches/linux-0001-NFS-Fix-attribute-cache-revalidation.patch) -PATCHURL+=(/src/mariux/patches/linux-0002-NFS-Ensure-we-revalidate-attributes-before-using-exe.patch) -PATCHURL+=(/src/mariux/patches/linux-0003-NFSv4-Don-t-perform-cached-access-checks-before-we-v.patch) -PATCHURL+=(/src/mariux/patches/linux-0001-net-better-skb-sender_cpu-and-skb-napi_id-cohabitati.patch) - # EXCLUDE="" #CONFIG= @@ -79,4 +74,3 @@ mee_install() { ln -sv bzImage-${FULLKERNELVERSION} ${D}/boot/mariux.${PKGREVISION} } - From 3b7ce73043f10750e96e597f923c43f90bfe7b91 Mon Sep 17 00:00:00 2001 From: Paul Menzel Date: Tue, 5 Jul 2016 13:38:58 +0200 Subject: [PATCH 4/8] linux-4.6.3: Strip trailing whitespace Execute `StripWhitespace` from *Vim Better Whitespace Plugin* [1]. [1] https://github.com/ntpeters/vim-better-whitespace --- linux-4.6.3-91.bee | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/linux-4.6.3-91.bee b/linux-4.6.3-91.bee index 031c740d1..93a6fd876 100755 --- a/linux-4.6.3-91.bee +++ b/linux-4.6.3-91.bee @@ -33,25 +33,25 @@ mee_configure() { else RUNNING=/boot/config-$(uname -r) fi - + : ${CONFIG:=${RUNNING}} - + if [ ! -e ${CONFIG} ] ; then echo "can't find config '${CONFIG}'" exit 1 fi - + cp -v ${CONFIG} .config - + LOCALVERSION="\"${KERNELLOCAL}\"" sed -i -e "s@CONFIG_LOCALVERSION=.*@CONFIG_LOCALVERSION=${LOCALVERSION}@" .config echo "doing make -C ${S} olddefconfig in ${PWD} .." make olddefconfig - + echo "doing make -C ${S} menuconfig in ${PWD} .." - + make menuconfig } @@ -66,11 +66,11 @@ mee_install() { make modules_install INSTALL_MOD_PATH=${D} make install INSTALL_PATH=${D}/boot # make firmware_install INSTALL_MOD_PATH=${D} - + rm -v ${D}/lib/modules/${FULLKERNELVERSION}/{source,build} - - ln -sv /usr/src/linux/${PKGALLPKG}/source ${D}/lib/modules/${FULLKERNELVERSION}/source + + ln -sv /usr/src/linux/${PKGALLPKG}/source ${D}/lib/modules/${FULLKERNELVERSION}/source ln -sv /usr/src/linux/${PKGALLPKG}/build ${D}/lib/modules/${FULLKERNELVERSION}/build - + ln -sv bzImage-${FULLKERNELVERSION} ${D}/boot/mariux.${PKGREVISION} } From e54893690c3f3f55d05018dd68d7b2af56aba16c Mon Sep 17 00:00:00 2001 From: Paul Menzel Date: Tue, 5 Jul 2016 14:05:45 +0200 Subject: [PATCH 5/8] nvidia_linux: Add version 367.27 for Linux 4.6.3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adapt and run Donald’s script `build-nvidia.pl`. --- nvidia_linux-4.6.3-91-367.27-0.bee | 88 ++++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100755 nvidia_linux-4.6.3-91-367.27-0.bee diff --git a/nvidia_linux-4.6.3-91-367.27-0.bee b/nvidia_linux-4.6.3-91-367.27-0.bee new file mode 100755 index 000000000..a1efa971c --- /dev/null +++ b/nvidia_linux-4.6.3-91-367.27-0.bee @@ -0,0 +1,88 @@ +#!/bin/env beesh + +# calculate package extra versions and legacy level +# - use extraversions to define nvidia extraversion and/or legacy level +# - legacy level should be the last part of extraversion +# - legacy level 2 to 5 will be calculated from version number.. + +mxnvversion=${PKGEXTRAVERSION##*_} +: ${mxnvversion=current} + +nvextraversion="${PKGEXTRAVERSION_DASH}" + +if [ "${mxnvversion:0:6}" = "legacy" -o "${mxnvversion}" = "current" ] ; then + nvextraversion="${nvextraversion%_*}" + nvextraversion="${nvextraversion#-${mxnvversion}}" +else + if [ "${PKGVERSION:0:4}" = "340." ] ; then + mxnvversion="legacy5" + elif [ "${PKGVERSION:0:4}" = "304." ] ; then + mxnvversion="legacy4" + elif [ "${PKGVERSION:0:7}" = "173.14." ] ; then + mxnvversion="legacy3" + elif [ "${PKGVERSION:0:6}" = "96.43." ] ; then + mxnvversion="legacy2" + else + mxnvversion="current" + fi +fi + +print_info "calculated mxnvversion = '${mxnvversion}'" +print_info "calculated nvextraversion = '${nvextraversion}'" + +NVIDIA_ARCHIVE="NVIDIA-Linux-x86_64-${PKGVERSION}${nvextraversion}.run" + +SRCURL[0]="ftp://download.nvidia.com/XFree86/Linux-x86_64/${PKGVERSION}/${NVIDIA_ARCHIVE}" +#PATCHURL+=('/src/mariux/patches/nvidia-linux-readcr4_writecr4.patch') + +LINUXPKG=${PKGEXTRANAME}.${ARCH} + +LINUXKLOCALVER=$(beeversion --format "%v.mx64.%r" "${LINUXPKG}") + +# '4.4.mx64.75' to '4.4.0.mx64.75' +if [[ $LINUXKLOCALVER =~ ^([0-9]+\.[0-9]+)(\.mx64.*) ]]; then + LINUXKLOCALVER="${BASH_REMATCH[1]}.0${BASH_REMATCH[2]}" +fi + + +build_in_sourcedir +sourcesubdir_append kernel + +: ${BEE_TMP_TMPDIR:=/tmp} + +mee_extract() { + LINUXBUILDARCHIVE="${BEE_BUILDARCHIVEDIR}/${LINUXPKG}.beebuild.tar.bz2" + + print_info "extracting nvidia archive .." + + start_cmd rmdir ${S} + start_cmd sh ${F}/${NVIDIA_ARCHIVE} -x --target ${S} + + if [ -d "/usr/src/linux/${LINUXPKG}/source" ] ; then + LINUXSRCDIR="/usr/src/linux/${LINUXPKG}/source" + elif [ -d "${BEE_TMP_TMPDIR}/${LINUXPKG}/source" ] ; then + LINUXSRCDIR="${BEE_TMP_TMPDIR}/${LINUXPKG}/source" + else + print_info "extracting linux build ${LINUXPKG} .." + start_cmd gtar -xf "${LINUXBUILDARCHIVE}" -C ${BEE_TMP_TMPDIR} + LINUXSRCDIR="${BEE_TMP_TMPDIR}/${LINUXPKG}/source" + fi + + print_info "using kernel sources from ${LINUXSRCDIR} .." +} + +mee_build_pre() { + ln -s ${LINUXSRCDIR}/include ${S}/include +} + +mee_build() { + start_cmd make SYSSRC=${LINUXSRCDIR} module +} + +mee_install() { + mkdir -pv ${D}${DATAROOTDIR}/nvidia/kernel/${LINUXKLOCALVER}/${PKGVERSION} + + cp -v *.ko ${D}${DATAROOTDIR}/nvidia/kernel/${LINUXKLOCALVER}/${PKGVERSION}/ + + ln -s ${PKGVERSION} ${D}${DATAROOTDIR}/nvidia/kernel/${LINUXKLOCALVER}/${mxnvversion} +} From b1df083962af03540282547ccf8cf64f8b971b88 Mon Sep 17 00:00:00 2001 From: Paul Menzel Date: Tue, 5 Jul 2016 14:16:59 +0200 Subject: [PATCH 6/8] nvidia_linux: Add version 340.96 for Linux 4.6.3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adapt and run Donald’s script `build-nvidia.pl`. Unfortunately, it fails to build with the errors below as reported on the Web already in May 2016 [1][2][3]. ``` […] /scratch/local/bee-root/nvidia/nvidia_linux-4.6.3-91-340.96-0/source/kernel/os-mlock.c:48:11: error: too many arguments to function ‘get_user_pages’ ret = get_user_pages(current, mm, (unsigned long)address, ^ In file included from /scratch/local/bee-root/nvidia/nvidia_linux-4.6.3-91-340.96-0/source/kernel/nv-linux.h:68:0, from /scratch/local/bee-root/nvidia/nvidia_linux-4.6.3-91-340.96-0/source/kernel/os-mlock.c:15: include/linux/mm.h:1266:6: note: declared here long get_user_pages(unsigned long start, unsigned long nr_pages, ^ /scratch/local/bee-root/nvidia/nvidia_linux-4.6.3-91-340.96-0/source/kernel/os-mlock.c:61:13: error: implicit declaration of function ‘page_cache_release’ [-Werror=implicit-function-declaration] page_cache_release(user_pages[i]); ^ cc1: some warnings being treated as errors scripts/Makefile.build:291: recipe for target '/scratch/local/bee-root/nvidia/nvidia_linux-4.6.3-91-340.96-0/source/kernel/os-mlock.o' failed make[2]: *** [/scratch/local/bee-root/nvidia/nvidia_linux-4.6.3-91-340.96-0/source/kernel/os-mlock.o] Error 1 Makefile:1429: recipe for target '_module_/scratch/local/bee-root/nvidia/nvidia_linux-4.6.3-91-340.96-0/source/kernel' failed make[1]: *** [_module_/scratch/local/bee-root/nvidia/nvidia_linux-4.6.3-91-340.96-0/source/kernel] Error 2 make[1]: Leaving directory '/scratch/local/linux-4.6.3-91.x86_64/source' NVIDIA: left KBUILD. nvidia.ko failed to build! Makefile:184: recipe for target 'nvidia.ko' failed make: *** [nvidia.ko] Error 1 ``` [1] https://github.com/manjaro/packages-extra/issues/71 [2] https://bugs.launchpad.net/ubuntu/+source/nvidia-graphics-drivers-361/+bug/1573508 [3] https://devtalk.nvidia.com/default/topic/936310/nvidia-drivers-do-not-install-with-kernel-4-6/ --- nvidia_linux-4.6.3-91-340.96-0.bee | 88 ++++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100755 nvidia_linux-4.6.3-91-340.96-0.bee diff --git a/nvidia_linux-4.6.3-91-340.96-0.bee b/nvidia_linux-4.6.3-91-340.96-0.bee new file mode 100755 index 000000000..a1efa971c --- /dev/null +++ b/nvidia_linux-4.6.3-91-340.96-0.bee @@ -0,0 +1,88 @@ +#!/bin/env beesh + +# calculate package extra versions and legacy level +# - use extraversions to define nvidia extraversion and/or legacy level +# - legacy level should be the last part of extraversion +# - legacy level 2 to 5 will be calculated from version number.. + +mxnvversion=${PKGEXTRAVERSION##*_} +: ${mxnvversion=current} + +nvextraversion="${PKGEXTRAVERSION_DASH}" + +if [ "${mxnvversion:0:6}" = "legacy" -o "${mxnvversion}" = "current" ] ; then + nvextraversion="${nvextraversion%_*}" + nvextraversion="${nvextraversion#-${mxnvversion}}" +else + if [ "${PKGVERSION:0:4}" = "340." ] ; then + mxnvversion="legacy5" + elif [ "${PKGVERSION:0:4}" = "304." ] ; then + mxnvversion="legacy4" + elif [ "${PKGVERSION:0:7}" = "173.14." ] ; then + mxnvversion="legacy3" + elif [ "${PKGVERSION:0:6}" = "96.43." ] ; then + mxnvversion="legacy2" + else + mxnvversion="current" + fi +fi + +print_info "calculated mxnvversion = '${mxnvversion}'" +print_info "calculated nvextraversion = '${nvextraversion}'" + +NVIDIA_ARCHIVE="NVIDIA-Linux-x86_64-${PKGVERSION}${nvextraversion}.run" + +SRCURL[0]="ftp://download.nvidia.com/XFree86/Linux-x86_64/${PKGVERSION}/${NVIDIA_ARCHIVE}" +#PATCHURL+=('/src/mariux/patches/nvidia-linux-readcr4_writecr4.patch') + +LINUXPKG=${PKGEXTRANAME}.${ARCH} + +LINUXKLOCALVER=$(beeversion --format "%v.mx64.%r" "${LINUXPKG}") + +# '4.4.mx64.75' to '4.4.0.mx64.75' +if [[ $LINUXKLOCALVER =~ ^([0-9]+\.[0-9]+)(\.mx64.*) ]]; then + LINUXKLOCALVER="${BASH_REMATCH[1]}.0${BASH_REMATCH[2]}" +fi + + +build_in_sourcedir +sourcesubdir_append kernel + +: ${BEE_TMP_TMPDIR:=/tmp} + +mee_extract() { + LINUXBUILDARCHIVE="${BEE_BUILDARCHIVEDIR}/${LINUXPKG}.beebuild.tar.bz2" + + print_info "extracting nvidia archive .." + + start_cmd rmdir ${S} + start_cmd sh ${F}/${NVIDIA_ARCHIVE} -x --target ${S} + + if [ -d "/usr/src/linux/${LINUXPKG}/source" ] ; then + LINUXSRCDIR="/usr/src/linux/${LINUXPKG}/source" + elif [ -d "${BEE_TMP_TMPDIR}/${LINUXPKG}/source" ] ; then + LINUXSRCDIR="${BEE_TMP_TMPDIR}/${LINUXPKG}/source" + else + print_info "extracting linux build ${LINUXPKG} .." + start_cmd gtar -xf "${LINUXBUILDARCHIVE}" -C ${BEE_TMP_TMPDIR} + LINUXSRCDIR="${BEE_TMP_TMPDIR}/${LINUXPKG}/source" + fi + + print_info "using kernel sources from ${LINUXSRCDIR} .." +} + +mee_build_pre() { + ln -s ${LINUXSRCDIR}/include ${S}/include +} + +mee_build() { + start_cmd make SYSSRC=${LINUXSRCDIR} module +} + +mee_install() { + mkdir -pv ${D}${DATAROOTDIR}/nvidia/kernel/${LINUXKLOCALVER}/${PKGVERSION} + + cp -v *.ko ${D}${DATAROOTDIR}/nvidia/kernel/${LINUXKLOCALVER}/${PKGVERSION}/ + + ln -s ${PKGVERSION} ${D}${DATAROOTDIR}/nvidia/kernel/${LINUXKLOCALVER}/${mxnvversion} +} From ff9ea8d5ee9cabc69f4770ca73f7c9dc60cb1da9 Mon Sep 17 00:00:00 2001 From: Paul Menzel Date: Tue, 5 Jul 2016 17:16:19 +0200 Subject: [PATCH 7/8] nvidia_linux 340.90: Fix build error with Linux 4.6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix the error below [1]. ``` […] /scratch/local/bee-root/nvidia/nvidia_linux-4.6.3-91-340.96-0/source/kernel/os-mlock.c:48:11: error: too many arguments to function ‘get_user_pages’ ret = get_user_pages(current, mm, (unsigned long)address, ^ In file included from /scratch/local/bee-root/nvidia/nvidia_linux-4.6.3-91-340.96-0/source/kernel/nv-linux.h:68:0, from /scratch/local/bee-root/nvidia/nvidia_linux-4.6.3-91-340.96-0/source/kernel/os-mlock.c:15: include/linux/mm.h:1266:6: note: declared here long get_user_pages(unsigned long start, unsigned long nr_pages, ^ /scratch/local/bee-root/nvidia/nvidia_linux-4.6.3-91-340.96-0/source/kernel/os-mlock.c:61:13: error: implicit declaration of function ‘page_cache_release’ [-Werror=implicit-function-declaration] page_cache_release(user_pages[i]); ^ cc1: some warnings being treated as errors scripts/Makefile.build:291: recipe for target '/scratch/local/bee-root/nvidia/nvidia_linux-4.6.3-91-340.96-0/source/kernel/os-mlock.o' failed make[2]: *** [/scratch/local/bee-root/nvidia/nvidia_linux-4.6.3-91-340.96-0/source/kernel/os-mlock.o] Error 1 Makefile:1429: recipe for target '_module_/scratch/local/bee-root/nvidia/nvidia_linux-4.6.3-91-340.96-0/source/kernel' failed make[1]: *** [_module_/scratch/local/bee-root/nvidia/nvidia_linux-4.6.3-91-340.96-0/source/kernel] Error 2 make[1]: Leaving directory '/scratch/local/linux-4.6.3-91.x86_64/source' NVIDIA: left KBUILD. nvidia.ko failed to build! Makefile:184: recipe for target 'nvidia.ko' failed make: *** [nvidia.ko] Error 1 ``` [1] https://github.com/manjaro/packages-extra/commit/ddae91f20ddf82874fce8604f86c12711f718994 --- nvidia_linux-4.6.3-91-340.96-0.bee | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/nvidia_linux-4.6.3-91-340.96-0.bee b/nvidia_linux-4.6.3-91-340.96-0.bee index a1efa971c..5721d14dc 100755 --- a/nvidia_linux-4.6.3-91-340.96-0.bee +++ b/nvidia_linux-4.6.3-91-340.96-0.bee @@ -71,6 +71,11 @@ mee_extract() { print_info "using kernel sources from ${LINUXSRCDIR} .." } +mee_patch() { + # get_user_pages() to not pass tsk/mm; d4edcf0d56958db0aca0196314ca38a5e730ea92 + sed -i 's|get_user_pages(current, mm, |get_user_pages(|g' "${S}"/os-mlock.c +} + mee_build_pre() { ln -s ${LINUXSRCDIR}/include ${S}/include } From 8572e8943d22a79dd914072dda7b8ea48cb47139 Mon Sep 17 00:00:00 2001 From: Paul Menzel Date: Tue, 5 Jul 2016 17:25:40 +0200 Subject: [PATCH 8/8] nvidia_linux 340.96: Fix build error with Linux 4.6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix the build errors below [1][2]. ``` […] /dev/shm/bee-root/nvidia/nvidia_linux-4.6.3-91-340.96-0/source/kernel/os-mlock.c: In function ‘os_lock_user_pages’: /dev/shm/bee-root/nvidia/nvidia_linux-4.6.3-91-340.96-0/source/kernel/os-mlock.c:61:13: error: implicit declaration of function ‘page_cache_release’ [-Werror=implicit-function-declaration] page_cache_release(user_pages[i]); ^ cc1: some warnings being treated as errors scripts/Makefile.build:291: recipe for target '/dev/shm/bee-root/nvidia/nvidia_linux-4.6.3-91-340.96-0/source/kernel/os-mlock.o' failed make[2]: *** [/dev/shm/bee-root/nvidia/nvidia_linux-4.6.3-91-340.96-0/source/kernel/os-mlock.o] Error 1 Makefile:1429: recipe for target '_module_/dev/shm/bee-root/nvidia/nvidia_linux-4.6.3-91-340.96-0/source/kernel' failed make[1]: *** [_module_/dev/shm/bee-root/nvidia/nvidia_linux-4.6.3-91-340.96-0/source/kernel] Error 2 make[1]: Leaving directory '/dev/shm/linux-4.6.3-91.x86_64/source' NVIDIA: left KBUILD. nvidia.ko failed to build! Makefile:184: recipe for target 'nvidia.ko' failed make: *** [nvidia.ko] Error 1 ``` [1] https://github.com/manjaro/packages-extra/blame/ddae91f20ddf82874fce8604f86c12711f718994/linux46-extramodules/nvidia-340xx/PKGBUILD [2] https://github.com/manjaro/packages-extra/issues/68 --- nvidia_linux-4.6.3-91-340.96-0.bee | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nvidia_linux-4.6.3-91-340.96-0.bee b/nvidia_linux-4.6.3-91-340.96-0.bee index 5721d14dc..6fbfd0c29 100755 --- a/nvidia_linux-4.6.3-91-340.96-0.bee +++ b/nvidia_linux-4.6.3-91-340.96-0.bee @@ -72,6 +72,9 @@ mee_extract() { } mee_patch() { + # page_cache_release() -> put_page(); 09cbfeaf1a5a67bfb3201e0c83c810cecb2efa5a + sed -i 's|page_cache_release|put_page|g' "${S}"/os-mlock.c + # get_user_pages() to not pass tsk/mm; d4edcf0d56958db0aca0196314ca38a5e730ea92 sed -i 's|get_user_pages(current, mm, |get_user_pages(|g' "${S}"/os-mlock.c }