I am not able to get nvidia-kernel-1.0.6629-r3 compiled with kernel 2.6.11-rc2-mm2. Maybe a problem only with mm-kernel. Reproducible: Always Steps to Reproduce: emerge =media-video/nvidia-kernel-1.0.6629-r3 also: # FEATURES="-*" CFLAGS="-march=pentium3 -O2 -pipe -fomit-frame-pointer" CXXFLAGS="-march=pentium3 -O2 -pipe -fomit-frame-pointer" emerge =media-video/nvidia-kernel-1.0.6629-r3 Actual Results: # emerge =media-video/nvidia-kernel-1.0.6629-r3 Calculating dependencies ...done! >>> emerge (1 of 1) media-video/nvidia-kernel-1.0.6629-r3 to / >>> md5 src_uri ;-) NVIDIA-Linux-x86-1.0-6629-pkg1.run * Determining the location of the kernel source code * Found kernel source directory: * /usr/src/linux * Found sources for kernel version: * 2.6.11-rc2-mm2 * Checking for MTRR support... [ ok ] >>> Unpacking source... Creating directory NVIDIA-Linux-x86-1.0-6629-pkg1 Verifying archive integrity... OK Uncompressing NVIDIA Accelerated Graphics Driver for Linux-x86 1.0-6629..................................................................................... .................................................................................................................... * Applying nv-shutup-warnings.patch ... [ ok ] * Applying NVIDIA_kernel-1.0-6629-1155389.patch ... [ ok ] * Applying NVIDIA_kernel-1.0-6629-1165235.patch ... [ ok ] * Applying NVIDIA_kernel-1.0-6629-1171869.patch ... [ ok ] * Applying NVIDIA_kernel-1.0-6629-1175225.patch ... [ ok ] * Applying NVIDIA_kernel-1.0-6629-1182399.patch ... [ ok ] * Applying NVIDIA_kernel-1.0-6629-1189413.patch ... [ ok ] * Applying NVIDIA_kernel-1.0-6629-1201042.diff ... [ ok ] * Applying 2.6 kernel patches * Applying conftest_koutput_includes.patch ... [ ok ] * Applying nv-disable-preempt-on-smp_processor_id.patch ... [ ok ] * Applying NVIDIA_kernel-1.0-6629-1161283.patch ... [ ok ] * Converting NVIDIA-Linux-x86-1.0-6629-pkg1/usr/src/nv/Makefile.kbuild to use M= instead of SUBDIRS=... [ ok ] >>> Source unpacked. * Preparing nvidia module NVIDIA: calling KBUILD... make CC=cc KBUILD_VERBOSE=1 -C /usr/src/linux M=/var/tmp/portage/nvidia-kernel-1.0.6629-r3/work/NVIDIA-Linux-x86-1.0-6629-pkg1/usr/src/nv modules make[2]: warning: jobserver unavailable: using -j1. Add `+' to parent make rule. mkdir -p /var/tmp/portage/nvidia-kernel-1.0.6629-r3/work/NVIDIA-Linux-x86-1.0-6629-pkg1/usr/src/nv/.tmp_versions make -f scripts/Makefile.build obj=/var/tmp/portage/nvidia-kernel-1.0.6629-r3/work/NVIDIA-Linux-x86-1.0-6629-pkg1/usr/src/nv echo \#define NV_COMPILER \"`cc -v 2>&1 | tail -n 1`\" > /var/tmp/portage/nvidia-kernel-1.0.6629-r3/work/NVIDIA-Linux-x86-1.0-6629-pkg1/usr/src/nv/nv_compiler.h cc -Wp,-MD,/var/tmp/portage/nvidia-kernel-1.0.6629-r3/work/NVIDIA-Linux-x86-1.0-6629-pkg1/usr/src/nv/.nv.o.d -nostdinc -isystem /usr/lib/gcc/i686-pc-linux-gnu/3.4.3/include -D__KERNEL__ -Iinclude -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -ffreestanding -O2 -fomit-frame-pointer -pipe -msoft-float -mpreferred-stack-boundary=2 -fno-unit-at-a-time -march=i686 -mtune=pentium3 -mregparm=3 -Iinclude/asm-i386/mach-default -Wdeclaration-after-statement -I/var/tmp/portage/nvidia-kernel-1.0.6629-r3/work/NVIDIA-Linux-x86-1.0-6629-pkg1/usr/src/nv -Wall -Wimplicit -Wreturn-type -Wswitch -Wformat -Wchar-subscripts -Wparentheses -Wno-multichar -Werror -O -fno-common -MD -Wno-cast-qual -Wno-error -D_LOOSE_KERNEL_NAMES -D__KERNEL__ -DMODULE -DNTRM -D_GNU_SOURCE -D_LOOSE_KERNEL_NAMES -D__KERNEL__ -DMODULE -DNV_MAJOR_VERSION=1 -DNV_MINOR_VERSION=0 -DNV_PATCHLEVEL=6629 -DNV_UNIX -DNV_LINUX -DNV_INT64_OK -DNVCPU_X86 -UDEBUG -U_DEBUG -DNDEBUG -DNV_REMAP_PFN_RANGE_PRESENT -DNV_CHANGE_PAGE_ATTR_PRESENT -DNV_PCI_DISABLE_DEVICE_PRESENT -DNV_CLASS_SIMPLE_CREATE_PRESENT -DNV_PCI_GET_CLASS_PRESENT -DMODULE -DKBUILD_BASENAME=nv -DKBUILD_MODNAME=nvidia -c -o /var/tmp/portage/nvidia-kernel-1.0.6629-r3/work/NVIDIA-Linux-x86-1.0-6629-pkg1/usr/src/nv/nv.o /var/tmp/portage/nvidia-kernel-1.0.6629-r3/work/NVIDIA-Linux-x86-1.0-6629-pkg1/usr/src/nv/nv.c distcc[13084] ERROR: compile /root/.ccache/nv.tmp.pluto3.12964.i on localhost failed /var/tmp/portage/nvidia-kernel-1.0.6629-r3/work/NVIDIA-Linux-x86-1.0-6629-pkg1/usr/src/nv/nv.c: In function `nv_agp_init': /var/tmp/portage/nvidia-kernel-1.0.6629-r3/work/NVIDIA-Linux-x86-1.0-6629-pkg1/usr/src/nv/nv.c:3025: error: too few arguments to function `agp_backend_acquire' /var/tmp/portage/nvidia-kernel-1.0.6629-r3/work/NVIDIA-Linux-x86-1.0-6629-pkg1/usr/src/nv/nv.c:3025: warning: assignment makes integer from pointer without a cast /var/tmp/portage/nvidia-kernel-1.0.6629-r3/work/NVIDIA-Linux-x86-1.0-6629-pkg1/usr/src/nv/nv.c:3027: error: too few arguments to function `agp_backend_release' make[3]: *** [/var/tmp/portage/nvidia-kernel-1.0.6629-r3/work/NVIDIA-Linux-x86-1.0-6629-pkg1/usr/src/nv/nv.o] Error 1 make[2]: *** [_module_/var/tmp/portage/nvidia-kernel-1.0.6629-r3/work/NVIDIA-Linux-x86-1.0-6629-pkg1/usr/src/nv] Error 2 NVIDIA: left KBUILD. nvidia.ko failed to build! make[1]: *** [module] Error 1 make: *** [module] Error 2 !!! ERROR: media-video/nvidia-kernel-1.0.6629-r3 failed. !!! Function linux-mod_src_compile, Line 417, Exitcode 2 !!! Unable to make IGNORE_CC_MISMATCH=yes V=1 SYSSRC=/usr/src/linux SYSOUT=/usr/src/linux clean module. !!! If you need support, post the topmost build error, NOT this status message. Expected Results: compile with no errors # emerge --info Portage 2.0.51-r15 (default-linux/x86/2004.2/gcc34, gcc-3.4.3, glibc-2.3.4.20041102-r0, 2.6.11-rc2-mm2 i686) ================================================================= System uname: 2.6.11-rc2-mm2 i686 Intel(R) Pentium(R) M processor 1.40GHz Gentoo Base System version 1.4.16 Python: dev-lang/python-2.3.4-r1 [2.3.4 (#1, Feb 7 2005, 13:19:57)] distcc 2.16 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled] ccache version 2.3 [enabled] dev-lang/python: 2.3.4-r1 sys-devel/autoconf: 2.13, 2.59-r6 sys-devel/automake: 1.4_p6, 1.7.9-r1, 1.8.5-r3, 1.6.3, 1.9.4, 1.5 sys-devel/binutils: 2.15.92.0.2-r1 sys-devel/libtool: 1.5.10-r4 virtual/os-headers: 2.6.8.1-r2 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-march=pentium-m -mtune=pentium-m -O3 -pipe -fomit-frame-pointer -fprefetch-loop-arrays -funroll-loops -ftracer -ffast-math" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-march=pentium-m -mtune=pentium-m -O3 -pipe -fomit-frame-pointer -fprefetch-loop-arrays -funroll-loops -ftracer -ffast-math" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs autoconfig ccache distcc distlocks sandbox sfperms" GENTOO_MIRRORS=" #ftp://dblx/pub/gentoo #ftp://pahboo/pub/gentoo #ftp://agamemnon/pub/gentoo #ftp://ftp.wh2.tu-dresden.de/pub/mirrors/gentoo/ ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo ftp://ftp.tu-clausthal.de/pub/linux/gentoo #ftp://ftp.snt.utwente.nl/pub/os/linux/gentoo #http://gentoo.oregonstate.edu #http://distro.ibiblio.org/gentoo " LANG="de_DE@euro" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/overlays/bmg-gnome-current /usr/local/overlays/bmg-main /usr/local/overlays/gentoo-de /usr/local/overlays/dnjl-portage /usr/local/overlays/fluidportage" SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage" USE="x86 X aalib acpi adns alsa apache2 avi bash-completion berkdb bitmap-fonts bonobo crypt cups dga dhcp directfb divx4linux dvd dvdread encode esd ethereal evo f77 fam fbcon fbdev flac font-server foomaticdb fortran freetds gb gd gdbm ggi gif gnome gnutls gpm gtk gtk2 gtkhtml guile hbci i8x0 imagemagick imap imlib ipv6 java jpeg kerberos ldap libg++ libwww live mad mbox mikmod mmx motif mpeg mppe-mppc mysql ncurses network nls nptl oggvorbis opengl pam pcmcia pdflib perl png ppds python quicktime readline rtc samba sdl slang snmp spell sse ssl svga tcltk tcpd theora threads tiff truetype truetype-fonts type1-fonts unicode usb userlocales xanim xface xml xml2 xmms xosd xv xvid xvmc zlib linguas_de" Unset: ASFLAGS, CBUILD, CTARGET, LC_ALL, LDFLAGS
fails on 2.6.10-mm2 as well.
Not really a solution, but I switched to no-sources that also supports reiser4, has a new kickass scheduler and nvidia-kernel works with it. Join #no-sources on freenode.
It's a known problem with mm-sources; they include a patch to allow more than 1 AGP backend, and it screws up the AGP API. I found a fix here: http://www.nvnews.net/vbulletin/showthread.php?t=43716 Unfortunately it seems to be incompatible with Gentoo's current patches which are necessary to fix other parts of the kernel. It could probably be adapted, however.
Why don't you have a go at porting it?
This is the patch that was linked in an above, month old, post. The gentoo patches don't seem to match the same structure as the patches on the nvnews site. I can't track down agp_bridge either, I wonder if perhaps their other patches create this? When I compile, my errors come from nv.c, specifically agp_backend_acquire() now requires a pci_dev. However it's being used to detect if AGPGART is loaded, and giving it a device doesn't seem a valid way of answering that in my mind. Though I don't know enough about the way this works to find the valid way. --- /usr/src/nv/os-agp.c.6629 2005-01-09 15:28:42.000000000 -0500 +++ /usr/src/nv/os-agp.c 2005-01-09 15:30:00.000000000 -0500 @@ -82,7 +82,7 @@ * the memory controller. */ - if (drm_agp_p->acquire()) + if (drm_agp_p->acquire(agp_bridge)) { nv_printf(NV_DBG_ERRORS, "NVRM: AGPGART: backend in use\n"); inter_module_put("drm_agp"); @@ -110,7 +110,7 @@ */ drm_agp_p->copy_info(&agpinfo); #else - if (drm_agp_p->copy_info(&agpinfo)) { + if (drm_agp_p->copy_info(agp_bridge, &agpinfo)) { nv_printf(NV_DBG_ERRORS, "NVRM: AGPGART: kernel reports chipset as unsupported\n"); goto failed; @@ -170,7 +170,7 @@ if (!(agp_rate & 0x00000004)) agpinfo.mode &= ~0x00000004; if (!(agp_rate & 0x00000002)) agpinfo.mode &= ~0x00000002; - drm_agp_p->enable(agpinfo.mode); + drm_agp_p->enable(agp_bridge, agpinfo.mode); *ap_phys_base = (void*) agpinfo.aper_base; *ap_mapped_base = (void*) gart.aperture; @@ -182,7 +182,7 @@ failed: MTRR_DEL(gart); /* checks gart.mtrr */ - drm_agp_p->release(); + drm_agp_p->release(agp_bridge); inter_module_put("drm_agp"); return -1; @@ -213,7 +213,7 @@ NV_IOUNMAP(gart.aperture, RM_PAGE_SIZE); } - drm_agp_p->release(); + drm_agp_p->release(agp_bridge); inter_module_put("drm_agp"); @@ -262,7 +262,7 @@ return RM_ERROR; } - ptr = drm_agp_p->allocate_memory(PageCount, AGP_NORMAL_MEMORY); + ptr = drm_agp_p->allocate_memory(agp_bridge, PageCount, AGP_NORMAL_MEMORY); if (ptr == NULL) { *pAddress = (void*) 0;@@ -262,7 +262,7 @@ return RM_ERROR; }
Looks like azarah beat me to it and committed -r4 last night.