QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

楼主: gudong

请教NV驱动安装

[复制链接]
发表于 2002-11-8 15:52:26 | 显示全部楼层
你有没有改过Makefile文件??他怎么用/usr/include/linux/的头文件,用/usr/include/linux/的头文件是会出错的,应该用/lib/modules/2.4.xx-xx/build/include或
/usr/src/linux-2.4/include目录里的头文件.把你的Makefile的内容贴出来.

另外你用uname -r看看输出结果是什么(应该是当前内核的版本号)
回复

使用道具 举报

发表于 2002-11-8 15:59:40 | 显示全部楼层
[quote:94b8091279="gudong"][quote:94b8091279="llc"]不行的话再将你的/var/log/xfree86.0.log最后出错的部分信息贴出来(请不要全贴,就贴最后20行左右够了)[/quote]
(++) from command line, (!!) notice, (II) informational,
         (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/XFree86.0.log", Time: Sun Nov  3 21:55:16 2002
(==) Using config file: "/etc/X11/XF86Config"
Parse error on line 100 of section Device in file /etc/X11/XF86Config
        "NvAGP" is not a valid keyword in this section.
(EE) Problem parsing the config file
(EE) Error from xf86HandleConfigFile()

Fatal server error:
no screens found

When reporting a problem related to a server crash, please send
the full server output, not just the last messages.
This can be found in the log file "/var/log/XFree86.0.log".
Please report problems to [email protected].[/quote]













Parse error on line 100 of section Device in file /etc/X11/XF86Config
        "NvAGP" is not a valid keyword in this section.
回复

使用道具 举报

 楼主| 发表于 2002-11-8 22:05:07 | 显示全部楼层
[quote:cc06e5ff79="mozilla"]你有没有改过Makefile文件??他怎么用/usr/include/linux/的头文件,用/usr/include/linux/的头文件是会出错的,应该用/lib/modules/2.4.xx-xx/build/include或
/usr/src/linux-2.4/include目录里的头文件.把你的Makefile的内容贴出来.

另外你用uname -r看看输出结果是什么(应该是当前内核的版本号)[/quote]

我并没有修改过Makefile文件,源文件如下:

# This Makefile is automatically generated; do not edit
#   Generated on 'builder3' on Tue Aug 27 15:56:49 PDT 2002

LINUX_MODULE=Module-linux
DEFINES=-D__KERNEL__ -DMODULE -D_LOOSE_KERNEL_NAMES -DNTRM -D_GNU_SOURCE -DRM_HEAPMGR -D_LOOSE_KERNEL_NAMES -D__KERNEL__ -DMODULE  -DNV_MAJOR_VERSION=1 -DNV_MINOR_VERSION=0 -DNV_PATCHLEVEL=3123  -DNV_UNIX   -DNV_LINUX   -DNVCPU_X86     
INCLUDES=-I.

OBJECTS=nv.o os-interface.o os-registry.o
HEADERS=os-interface.h nv-linux.h nv-misc.h nv.h  nv-ids.h rmretval.h nvtypes.h nv_ref.h  $(VERSION_HDR)

CFLAGS=-Wall -Wimplicit -Wreturn-type -Wswitch -Wformat -Wchar-subscripts -Wparentheses -Wpointer-arith -Wcast-qual -Wno-multichar  -O -MD $(DEFINES) $(INCLUDES) -Wno-cast-qual

RESMAN_KERNEL_MODULE=Module-nvkernel

KERNDIR=/lib/modules/$(shell uname -r)

# check for newer paths. if found, use them, otherwise use old paths
# these wouldn't work with the gnu make included with rh6.2
# KERNINC=$(if -d $(KERNDIR)/build, $(KERNDIR)/build/include, /usr/src/linux/include)
# INSTALLDIR=$(if -d $(KERNDIR)/kernel, $(KERNDIR)/kernel/drivers/video, $(KERNDIR)/video)

# this is slightly more brain-dead, but works..
ifeq ($(shell if test -d $(KERNDIR)/build; then echo yes; fi),yes)
KERNINC=$(KERNDIR)/build/include
else
KERNINC=/usr/src/linux/include
endif

ifeq ($(shell if test -d $(KERNDIR)/kernel; then echo yes; fi),yes)
INSTALLDIR=$(KERNDIR)/kernel/drivers/video
else
INSTALLDIR=$(KERNDIR)/video
endif

ifeq ($(shell echo $(NVDEBUG)),1)
  ifeq ($(shell test -z $(RMDEBUG) && echo yes),yes)
    RMDEBUG=1
  endif
endif

ifeq ($(shell echo $(RMDEBUG)),1)
CFLAGS += -DDEBUG -g -fno-common
endif

# this is just plain wrong, get rid of it
BROKENDIR=$(KERNDIR)/kernel/video

INSTALL=$(shell which install)

# determine gcc versions used (kernel, NVdriver)
module_cc:=$(shell $(CC) -v 2>&1 | tail -1)
version="^Linux version [^(]* (.*@.*) (\(.*\)) .*"
kernel_cc:=$(shell cat /proc/version | sed "s/"$(version)"/\1/")

module_cc:=$(shell echo "$(module_cc)" | cut -d ' ' -f 3)
kernel_cc:=$(shell echo "$(kernel_cc)" | cut -d ' ' -f 3)

# allow specification of alternate include file tree on command line and extra defines
ifdef SYSINCLUDE
INCLUDES += -I$(SYSINCLUDE)
else
INCLUDES += -I$(KERNINC)
endif

DEFINES+=$(EXTRA_DEFINES)

# allow build parameters to be passed in through the environment
ifdef BUILD_PARAMS
    DEFINES+=-D$(BUILD_PARAMS)
endif

VERSION_HDR=nv_compiler.h

all: install

install: package-install

package-install: NVdriver
        @if [ `id -ur` != 0 ]; then \
                echo Please run \"make install\" as root.; \
        else \
                if [ -d $(BROKENDIR) ]; then \
                        rm -f $(BROKENDIR)/NVdriver; \
                        rmdir --ignore-fail-on-non-empty $(BROKENDIR); \
                fi && \
                mkdir -p $(INSTALLDIR) && \
                $(INSTALL) -m 0664 -o root -g root NVdriver $(INSTALLDIR)/NVdriver$(O) && \
                /sbin/depmod -a && \
                /sbin/modprobe NVdriver && \
                sh makedevices.sh && \
                echo "NVdriver installed successfully."; \
        fi

gcc-check:
        @if [ -z $(IGNORE_CC_MISMATCH) ]; then \
         if [ $(kernel_cc) != $(module_cc) ]; then \
        echo "                                                           "; \
        echo "You appear to be compiling the NVdriver kernel module with "; \
        echo "a compiler different from the one that was used to compile "; \
        echo "the running kernel. This may be perfectly fine, but there  "; \
        echo "are 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 compile the kernel.  "; \
        echo "                                                           "; \
        echo -en "\033[1;31m"; \
        echo -e  "*** Failed cc sanity check. Bailing out! ***"; \
        echo -en "\033[0m"; \
        exit 1; \
         fi \
        fi

NVdriver: gcc-check $(LINUX_MODULE) $(RESMAN_KERNEL_MODULE)
        ld -r -o $@ $(LINUX_MODULE) $(RESMAN_KERNEL_MODULE)
        size $@

$(VERSION_HDR):
        echo \#define NV_COMPILER \"`$(CC) -v 2>&1 | tail -1`\" > $@

$(LINUX_MODULE): $(OBJECTS)
        ld -r -o $@ $(OBJECTS)

%.o: %.c $(HEADERS)
        $(CC) -c $(CFLAGS) $<

# debug tool to preprocess the file and leave .i to make it easier to untangle #defines
%.i: %.c
        $(CC) $(CFLAGS) -E $< > $@

%.s: %.c
        $(CC) $(CFLAGS) -S $< > $@


clean:
        $(RM) $(OBJECTS) $(LINUX_MODULE) $(VERSION_HDR) *.d NVdriver


-include $(OBJECTS:%.o=%.d)


另外,uname -r输出的正是当前内核版本号
回复

使用道具 举报

 楼主| 发表于 2002-11-10 21:30:19 | 显示全部楼层
mozilla忘掉我这帖子了吗?:-(
回复

使用道具 举报

发表于 2002-11-11 09:30:46 | 显示全部楼层
[quote:d2322957d5="gudong"]mozilla忘掉我这帖子了吗?:-([/quote]
不是忘了,我周末上不了网.   
看你的Makefile很正常,但我不知道他为什么会去用/usr/include/linux下的头文件.
你是不是没有安装kernel-source这个包????
如果你装了kernel-source这个包,编译还是出错,就这样试试:
mv /usr/include/linux /usr/include/linuxold
mv /usr/include/asm /usr/include/asmold
mv /usr/include/scsi /usr/include/scsiold          (这行不做也无所谓)
ln -s /lib/modules/2.4.18-14/build/include/linux /usr/include/linux
ln -s /lib/modules/2.4.18-14/build/include/asm-i386 /usr/include/asm
ln -s /lib/modules/2.4.18-14/build/include/scsi /usr/include/scsi         (这行不做也无所谓)

然后再重新编译nvidia(make前先make clean)
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-6-1 15:18 , Processed in 0.281984 second(s), 14 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表