|
楼主 |
发表于 2003-7-15 21:17:27
|
显示全部楼层
NVIDIA_kernel with Linux-2.6
In order to compile the NVIDIA_kernel OS interface for Linux-2.6
you need to get the patch for Linux-2.5 (you can find it at www.minion.de).
And of course you need the driver itself! Get it at www.nvidia.com
Once you have downloaded NVIDIA_kernel-1.0-XXXX.tar.gz and
NVIDIA_kernel-1.0-XXXX-X.X.diff unpack the source:
blight@tux downloads $ tar -zxvf NVIDIA_kernel-1.0-XXXX.tar.gz
NVIDIA_kernel-1.0-XXXX/
NVIDIA_kernel-1.0-XXXX/nv.c
NVIDIA_kernel-1.0-XXXX/os-agp.c
NVIDIA_kernel-1.0-XXXX/os-interface.c
NVIDIA_kernel-1.0-XXXX/os-registry.c
NVIDIA_kernel-1.0-XXXX/os-agp.h
NVIDIA_kernel-1.0-XXXX/os-interface.h
NVIDIA_kernel-1.0-XXXX/nv-linux.h
NVIDIA_kernel-1.0-XXXX/nv-misc.h
NVIDIA_kernel-1.0-XXXX/nv.h
NVIDIA_kernel-1.0-XXXX/rmretval.h
NVIDIA_kernel-1.0-XXXX/nvtypes.h
NVIDIA_kernel-1.0-XXXX/README
NVIDIA_kernel-1.0-XXXX/conftest.sh
NVIDIA_kernel-1.0-XXXX/makedevices.sh
NVIDIA_kernel-1.0-XXXX/Makefile
NVIDIA_kernel-1.0-XXXX/nv-kernel.o
Then patch the driver for Linux-2.5:
blight@tux downloads $ cd NVIDIA_kernel-1.0-XXXX
blight@tux NVIDIA_kernel-1.0-XXXX $ patch Makefile ../NVIDIA_kernel-1.0-XXXX-X.X.diff
patching file Makefile
patching file Makefile.kbuild
patching file Makefile.nvidia
patching file conftest.sh
patching file nv-linux.h
patching file nv.c
patching file os-agp.c
patching file os-interface.c
patching file os-registry.c
And finally make it work with Linux-2.6:
You have to edit the following part of nv-linux.h
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 3, 0)
# error This driver does not support 2.2.x kernels!
#elif LINUX_VERSION_CODE < KERNEL_VERSION(2, 4, 0)
# error This driver does not support 2.3.x kernels!
#elif LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0)
# define KERNEL_2_4
#elif LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0)
# define KERNEL_2_5
#else
# error This driver does not support development kernels!
#endif
And add the following before #else:
#elif LINUX_VERSION_CODE < KERNEL_VERSION(2, 7, 0)
# define KERNEL_2_5
Now compile the driver (you need root privileges or the
Makefile will refuse compiling):
blight@tux NVIDIA_kernel-1.0-XXXX $ ln -s Makefile.kbuild Makefile
# If Makefile.kbuild doesn't work try Makefile.nvidia
blight@tux NVIDIA_kernel-1.0-XXXX $ su
Password:
root@tux NVIDIA_kernel-1.0-XXXX # make KERNDIR=/usr/src/linux-2.6.0-test1
# You do not need to specify the KERNDIR if you are already running the target kernel!
...
And that's it! Now wasn't that easy? ;-)
-- blight (gregora ATnospam web.de) |
|