diff -ruN linux-2.6.0-test1/Makefile linux-2.6.0-test1-LNX2/Makefile
--- linux-2.6.0-test1/Makefile	2003-07-13 23:35:55.000000000 -0400
+++ linux-2.6.0-test1-LNX2/Makefile	2003-07-26 13:51:47.000000000 -0400
@@ -805,7 +805,7 @@
 	@find . $(RCS_FIND_IGNORE) \
 	 	\( -name '*.[oas]' -o -name '*.ko' -o -name '.*.cmd' \
 		-o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \) \
-		-type f -print | xargs rm -f
+		-type f -print | grep -v nv-kernel.o | xargs rm -f
 
 # mrproper
 #
@@ -818,7 +818,7 @@
 		-o -name '*.bak' -o -name '#*#' -o -name '.*.orig' \
 	 	-o -name '.*.rej' -o -size 0 \
 		-o -name '*%' -o -name '.*.cmd' -o -name 'core' \) \
-		-type f -print | xargs rm -f
+		-type f -print | grep -v nv-kernel.o | xargs rm -f
 
 # Generate tags for editors
 # ---------------------------------------------------------------------------
diff -ruN linux-2.6.0-test1/drivers/char/Kconfig linux-2.6.0-test1-LNX2/drivers/char/Kconfig
--- linux-2.6.0-test1/drivers/char/Kconfig	2003-07-13 23:29:27.000000000 -0400
+++ linux-2.6.0-test1-LNX2/drivers/char/Kconfig	2003-07-26 13:54:06.000000000 -0400
@@ -947,6 +947,8 @@
 
 endmenu
 
+source "drivers/char/nvidia/Kconfig"
+
 source "drivers/char/agp/Kconfig"
 
 source "drivers/char/drm/Kconfig"
diff -ruN linux-2.6.0-test1/drivers/char/Makefile linux-2.6.0-test1-LNX2/drivers/char/Makefile
--- linux-2.6.0-test1/drivers/char/Makefile	2003-07-13 23:38:37.000000000 -0400
+++ linux-2.6.0-test1-LNX2/drivers/char/Makefile	2003-07-26 13:52:47.000000000 -0400
@@ -72,6 +72,7 @@
 
 obj-$(CONFIG_WATCHDOG)	+= watchdog/
 obj-$(CONFIG_MWAVE) += mwave/
+obj-$(CONFIG_NV_DRIVER) += nvidia/
 obj-$(CONFIG_AGP) += agp/
 obj-$(CONFIG_DRM) += drm/
 obj-$(CONFIG_PCMCIA) += pcmcia/
diff -ruN linux-2.6.0-test1/drivers/char/nvidia/Kconfig linux-2.6.0-test1-LNX2/drivers/char/nvidia/Kconfig
--- linux-2.6.0-test1/drivers/char/nvidia/Kconfig	1969-12-31 19:00:00.000000000 -0500
+++ linux-2.6.0-test1-LNX2/drivers/char/nvidia/Kconfig	2003-07-26 13:55:15.000000000 -0400
@@ -0,0 +1,10 @@
+config NV_DRIVER
+	tristate "NVIDIA Display Driver"
+	depends on X86
+	default m
+	---help---
+	  This is the kernel module for the Nvidia Video driver version
+	  NVIDIA_kernel-1.0-6629. If you have a NVIDIA video card and
+	  plan on using 3D stuff in X, say M here. The module will be
+	  called nvidia. Make sure you do _NOT_ compile in the kernel (Y)
+	  because it ain't gonna work and stuff WILL break. Otherwise, say N.
diff -ruN linux-2.6.0-test1/drivers/char/nvidia/Makefile linux-2.6.0-test1-LNX2/drivers/char/nvidia/Makefile
--- linux-2.6.0-test1/drivers/char/nvidia/Makefile	1969-12-31 19:00:00.000000000 -0500
+++ linux-2.6.0-test1-LNX2/drivers/char/nvidia/Makefile	2003-07-26 13:55:15.000000000 -0400
@@ -0,0 +1,252 @@
+#
+# KBUILD Makefile for the NVIDIA Linux kernel module.
+#
+# The motivation for replacing the original Makefile is the hope that this
+# version will simplify the build and installation process. In the past,
+# many architectural and cosmetic changes to the Linux kernel have made it
+# difficult to maintain compatibility or required duplication of logic.
+#
+# Linux 2.5 introduces numerous such changes, many of which impact modules.
+# Relying on KBUILD, some aspects of the build system otherwise difficult
+# to support (for example, module versioning) are abstracted away and dealt
+# with elsewhere, making life significantly easier here.
+#
+# The new approach currently has its own share of problems, some of which
+# are architectural difficulties with KBUILD, others minor annoyances. For
+# this reason, an improved version of the NVIDIA Makefile is available to
+# those experiencing difficulties.
+#
+# Please report any problems you may be experiencing with this experimental
+# Makefile to either one (or, preferably, both) of us:
+#
+# Alistair J Strachan (alistair@devzero.co.uk) (first pass, enhancements)
+# Christian Zander (zander@mail.minion.de) (enhancements)
+#
+
+all: install
+install: package-install
+
+#
+# The NVIDIA kernel module base name and static file names. KBUILD will go
+# ahead and append ".o" or ".ko" to form the final module name.
+#
+
+MODULE_NAME := nvidia
+VERSION_HEADER := nv_compiler.h
+
+#
+# List of object files to link into NVIDIA kernel module; make sure KBUILD
+# understands that we want a module.
+#
+
+RESMAN_CORE_OBJS := nv-kernel.o
+RESMAN_GLUE_OBJS := nv.o nv-vm.o os-agp.o os-interface.o os-registry.o
+
+$(MODULE_NAME)-objs := $(RESMAN_CORE_OBJS) $(RESMAN_GLUE_OBJS)
+
+#
+# A bug in KBUILD 2.4 means that leaving obj-m set in top-level context
+# will cause Rules.make to call pathdown.sh, which is wrong. So, we only
+# set this conditional of a kernel-level instance.
+#
+
+#ifdef TOPDIR
+obj-m += $(MODULE_NAME).o
+#endif
+
+#
+# Include local source directory in $(CC)'s include path and set disable any
+# warning types that are of little interest to us.
+#
+
+EXTRA_CFLAGS += -I$(src)
+EXTRA_CFLAGS += -Wno-cast-qual -Wno-strict-prototypes
+
+#
+# Determine location of the Linux kernel source tree. Allow users to override
+# the default (i.e. automatically determined) kernel source location with the
+# KERNDIR directive; this new directive replaces NVIDIA's SYSINCLUDE.
+#
+
+#ifdef KERNDIR
+  KERNEL_SOURCES := $(src)/../../..
+  KERNEL_HEADERS := -I$(KERNEL_SOURCES)/include
+#  MODULE_ROOT    := /lib/modules/$(shell uname -r)/kernel/drivers # XXX
+#else
+#  KERNEL_SOURCES := /lib/modules/$(shell uname -r)/build
+#  KERNEL_HEADERS := -I$(KERNEL_SOURCES)/include
+#  MODULE_ROOT    := /lib/modules/$(shell uname -r)/kernel/drivers
+#endif
+
+#
+# We rely on these two definitions below; if they aren't set, we set them to
+# reasonable defaults (Linux 2.4's KBUILD, and top-level passes will not set
+# these).
+#
+
+src ?= .
+obj ?= .
+
+#
+# Sets any internal variables left unset by KBUILD (e.g. this happens during
+# a top-level run).
+#
+
+TOPDIR ?= $(KERNEL_SOURCES)
+PATCHLEVEL = 6
+
+#
+# Linux 2.4 uses the .o module extension. Linux 2.5, however, uses the .ko
+# module extension. Handle these gracefully.
+#
+
+ifeq ($(PATCHLEVEL), 4)
+  MODULE_OBJECT := $(MODULE_NAME).o
+else
+  MODULE_OBJECT := $(MODULE_NAME).ko
+endif
+
+#
+# NVIDIA specific CFLAGS and #define's. The remap_page_range check has become
+# necessary with the introduction of the five argument version to Linux 2.4
+# distribution kernels; this conflicting change cannot be detected at compile
+# time.
+#
+
+EXTRA_CFLAGS += -DNTRM -D_LOOSE_KERNEL_NAMES -D__KERNEL__ -DMODULE  -DNV_MAJOR_VERSION=1 -DNV_MINOR_VERSION=0 -DNV_PATCHLEVEL=4348  -DNV_UNIX   -DNV_LINUX   -DNV_INT64_OK   -DNVCPU_X86
+
+ifeq ($(shell echo $(NVDEBUG)),1)
+  ifeq ($(shell test -z $(RMDEBUG) && echo yes),yes)
+    RMDEBUG=1
+  endif
+endif
+
+ifeq ($(shell echo $(RMDEBUG)),1)
+  EXTRA_CFLAGS += -DDEBUG -g -fno-common
+endif
+
+  EXTRA_CFLAGS += -DREMAP_PAGE_RANGE_5
+
+#
+# NVIDIA binary object file includes .common section.
+#
+
+EXTRA_LDFLAGS := -d
+
+#
+# Miscellaneous NVIDIA kernel module build support targets. They are needed
+# to satisfy KBUILD requirements and to support NVIDIA specifics.
+#
+
+$(obj)/nv-kernel.o:
+	cp $(src)/$(RESMAN_CORE_OBJS) $(obj)/$(RESMAN_CORE_OBJS)
+
+$(obj)/$(VERSION_HEADER):
+	echo \#define NV_COMPILER \"`$(CC) -v 2>&1 | tail -1`\" > $@
+
+$(obj)/nv.o: $(obj)/$(VERSION_HEADER)
+
+#
+# More quirks for Linux 2.4 KBUILD, which doesn't link automatically.
+#
+
+ifeq ($(PATCHLEVEL), 4)
+$(obj)/$(MODULE_NAME).o: $($(MODULE_NAME)-objs)
+	$(LD) $(EXTRA_LDFLAGS) -r -o $@ $($(MODULE_NAME)-objs)
+endif
+
+#
+# KBUILD build parameters.
+#
+
+KBUILD_PARAMS := -C $(KERNEL_SOURCES) SUBDIRS=$(PWD)
+
+#
+# NVIDIA sanity checks.
+#
+
+#suser-sanity-check:
+#	@if ! sh conftest.sh suser_sanity_check; then \
+#	  echo; \
+	  echo "You have insufficient privileges for this operation. Please "; \
+	  echo "run \"make install\" as root!                               "; \
+	  echo; \
+	  exit 1; \
+	fi
+
+#rmmod-sanity-check:
+#	@if ! sh conftest.sh rmmod_sanity_check $(MODULE_NAME); then \
+	  echo; \
+	  echo "Unable to unload the currently loaded NVIDIA kernel module! "; \
+	  echo "Please be certain that you have exited X before attempting  "; \
+	  echo "to install this version.                                    "; \
+	  echo; \
+	  exit 1; \
+	fi
+
+#cc-sanity-check:
+#	@if ! sh conftest.sh cc_sanity_check $(CC); then \
+	  echo; \
+	  echo "You appear to be building the NVIDIA kernel module with a  "; \
+	  echo "compiler different from the one that was used to build the "; \
+	  echo "running kernel. This may be perfectly fine, but there are  "; \
+	  echo "cases where this can lead to unexpected behaviour and      "; \
+	  echo "system crashes.                                            "; \
+	  echo; \
+	  echo "If you know what you are doing and want to override this   "; \
+	  echo "check, you can do so by setting IGNORE_CC_MISMATCH.        "; \
+	  echo; \
+	  echo "In any other case, set the CC environment variable to the  "; \
+	  echo "name of the compiler that was used to build the kernel.    "; \
+	  echo; \
+	  exit 1; \
+	fi
+
+#
+# Build the NVIDIA kernel module using Linux KBUILD. This target is used by
+# the "package-install" target below.
+#
+
+module: cc-sanity-check
+	@make $(KBUILD_PARAMS) modules; \
+#	if ! [ -f $(MODULE_OBJECT) ]; then \
+	  echo "$(MODULE_OBJECT) failed to build!"; \
+	  exit 1; \
+	fi
+
+#
+# Build the NVIDIA kernel module with KBUILD. Verify that the user posesses
+# sufficient privileges. Rebuild the module dependency file.
+#
+
+module-install: suser-sanity-check module
+#	@mkdir -p $(MODULE_ROOT)/video; \
+#	install -m 0664 -o root -g root $(MODULE_OBJECT) $(MODULE_ROOT)/video; \
+#	/sbin/depmod -ae;
+
+#
+# This target builds, then installs, then creates device nodes and inserts
+# the module, if successful.
+#
+
+package-install: module-install rmmod-sanity-check
+	@sh makedevices.sh; \
+#	/sbin/modprobe $(MODULE_NAME) && \
+	echo "$(MODULE_OBJECT) installed successfully.";
+
+#
+# Support hack, KBUILD isn't prepared to clean up after external modules.
+#
+
+clean:
+	@rm -f $(RESMAN_GLUE_OBJS) .*.{cmd,flags}
+	@rm -f $(MODULE_NAME).{o,ko,mod.{o,c}} built-in.o $(VERSION_HEADER) *~
+
+#
+# Linux 2.4 KBUILD requires the inclusion of Rules.make; Linux 2.5's KBUILD
+# includes dependencies automatically.
+#
+
+ifeq ($(PATCHLEVEL), 4)
+include $(KERNEL_SOURCES)/Rules.make
+endif
