jamapii l33t
Joined: 16 Sep 2004 Posts: 637
|
Posted: Mon Apr 02, 2012 1:14 pm Post subject: [Solutions] nvidia-drivers on Linux 3.3 and 3.4 |
|
|
For Linux 3.3, I used a patch to the ebuild like this
Code: | elif use kernel_linux; then
+ export GCC_INCLUDE_DIR="${KERNEL_DIR}/arch/x86/include/generated/"
+ export C_INCLUDE_PATH="${KERNEL_DIR}/arch/x86/include/generated/"
linux-mod_src_compile
fi
|
Some other solutions are in the official portage tree and in the "init6" overlay, but not for old versions of the driver.
For Linux 3.4, I use
Code: | --- a/x11-drivers/nvidia-drivers/nvidia-drivers-295.33.ebuild
+++ b/x11-drivers/nvidia-drivers/nvidia-drivers-295.33.ebuild
@@ -293,6 +293,10 @@ src_prepare() {
# If greater than 2.6.5 use M= instead of SUBDIR=
convert_to_m "${NV_SRC}"/Makefile.kbuild
+
+ # remove asm/system.h
+ sed -i -e 's:#include <asm/system.h>::' "${NV_SRC}"/conftest.sh
+ sed -i -e 's:#include <asm/system.h>:#include <linux/irqflags.h>:' "${NV_SRC}"/nv-linux.h
fi
cat <<- EOF > "${S}"/nvidia.icd
/usr/$(get_libdir)/libcuda.so
|
|
|