Skip to content

Commit cc3f490

Browse files
committed
Initial commit.
0 parents  commit cc3f490

29 files changed

+14944
-0
lines changed

.gitignore

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
.tmp_versions/
2+
.nvidia.ko.cmd
3+
.nvidia.mod.o.cmd
4+
.nvidia.o.cmd
5+
Module.symvers
6+
modules.order
7+
src/.nv-acpi.o.cmd
8+
src/.nv-acpi.o.d
9+
src/.nv-gvi.o.cmd
10+
src/.nv-gvi.o.d
11+
src/.nv-i2c.o.cmd
12+
src/.nv-i2c.o.d
13+
src/.nv-vm.o.cmd
14+
src/.nv-vm.o.d
15+
src/.nv.o.cmd
16+
src/.nv.o.d
17+
src/.os-agp.o.cmd
18+
src/.os-agp.o.d
19+
src/.os-interface.o.cmd
20+
src/.os-interface.o.d
21+
src/.os-registry.o.cmd
22+
src/.os-registry.o.d
23+
src/nv-acpi.o
24+
src/nv-gvi.o
25+
src/nv-i2c.o
26+
src/nv-vm.o
27+
src/nv.o
28+
src/os-agp.o
29+
src/os-interface.o
30+
src/os-registry.o
31+
wl.ko
32+
wl.mod.c
33+
wl.mod.o
34+
wl.o
35+
nvidia.ko
36+
nvidia.mod.c
37+
nvidia.mod.o
38+
nvidia.o

Makefile

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
################################################################################
2+
# Copyright (c) 2010-2011 Bryce Lelbach
3+
#
4+
# Distributed under the Boost Software License, Version 1.0.
5+
# Full text: http://www.boost.org/LICENSE_1_0.txt.
6+
################################################################################
7+
8+
SHELL=/bin/sh
9+
10+
ifndef LINUXDIR
11+
RUNNING_REL := $(shell uname -r)
12+
13+
LINUXDIR := $(shell if [ -e /lib/modules/$(RUNNING_REL)/source ]; then \
14+
echo /lib/modules/$(RUNNING_REL)/source; \
15+
else echo /lib/modules/$(RUNNING_REL)/build; fi)
16+
endif
17+
18+
obj-m += nvidia.o
19+
20+
nvidia-objs := src/nv-acpi.o \
21+
src/nv.o \
22+
src/nv-gvi.o \
23+
src/nv-i2c.o \
24+
src/nv-vm.o \
25+
src/os-agp.o \
26+
src/os-interface.o \
27+
src/os-registry.o
28+
29+
EXTRA_CFLAGS := -I$(M)/include \
30+
-D__KERNEL__ \
31+
-DMODULE \
32+
-DNVRM \
33+
-DNV_VERSION_STRING=\"260.19.44\" \
34+
-mcmodel=kernel \
35+
-mno-red-zone
36+
37+
ifeq ($(shell echo $(NVDEBUG)),1)
38+
EXTRA_CLFAGS += -DDEBUG -g
39+
else
40+
EXTRA_CLFAGS += -UDEBUG -U_DEBUG -DNDEBUG
41+
endif
42+
43+
ifeq ($(CONFIG_X86_64),y)
44+
EXTRA_LDFLAGS := $(M)/bin/nv-kernel.x86_64.bin
45+
else
46+
EXTRA_LDFLAGS := $(M)/bin/nv-kernel.x86_32.bin
47+
endif
48+
49+
all:
50+
KBUILD_NOPEDANTIC=1 make -C $(LINUXDIR) M=`pwd` modules
51+
52+
clean:
53+
KBUILD_NOPEDANTIC=1 make -C $(LINUXDIR) M=`pwd` clean
54+
55+
install:
56+
KBUILD_NOPEDANTIC=1 make -C $(LINUXDIR) M=`pwd` modules_install
57+

README.rst

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
Introduction
2+
============
3+
4+
This directory contains the source code and header files for the part
5+
of the NVIDIA Linux graphics driver that interfaces with the Linux
6+
kernel.
7+
8+
Since the Linux kernel does not support a binary driver interface for
9+
use by kernel modules, NVIDIA maintains a thin interface layer that
10+
can be built against supported Linux kernels and linked with a closed
11+
source, kernel independent component into a loadable NVIDIA Linux
12+
kernel module.
13+
14+
Typically, the NVIDIA Linux software installer will build and install
15+
an NVIDIA kernel module as part of the driver installation. If you
16+
wish to manually build and optionally install an NVIDIA kernel module
17+
from the source in this directory, please follow the instructions
18+
below.
19+
20+
Building
21+
========
22+
23+
Building and installing the NVIDIA kernel module:::
24+
25+
$ make module
26+
27+
This command will build an NVIDIA kernel module for the running Linux
28+
kernel. If you are using a Linux 2.4 kernel, this module will be
29+
named 'nvidia.o', else 'nvidia.ko'. To install this kernel module in
30+
the default module installation path, use:::
31+
32+
$ make install
33+
34+
Specifying a Source Tree
35+
========================
36+
37+
If you wish to build an NVIDIA kernel module for a different Linux
38+
kernel, you can use LINUXDIR to specify the location of the source tree
39+
to build against, for example:::
40+
41+
$ make LINUXDIR=/path/to/linux-2.x.y module
42+
43+
Please note that you need to have a properly configured kernel source
44+
tree installed for each kernel you wish to build an NVIDIA kernel
45+
module for. Most Linux distributors provide these as 'kernel-source',
46+
'kernel-headers' or 'kernel-devel' packages for the Linux kernels
47+
shipped with their distribution. If you build your own kernel, please
48+
make sure it remains configured (do not run `make mrproper`).
49+

bin/nv-kernel.x86_32.bin

9.72 MB
Binary file not shown.

bin/nv-kernel.x86_64.bin

12.2 MB
Binary file not shown.

0 commit comments

Comments
 (0)