制作nvidia-kernel deb,按nvidia-kernel-source的Readme,
debian:/usr/src# export KSRC=/usr/src/kernel-headers-2.4.21-5-k7
debian:/usr/src# export KVERS=2.4.21-5-k7
debian:/usr/src# cd modules/nvidia-kernel/
debian:/usr/src/modules/nvidia-kernel# debian/rules binary_modules
if [ -f /usr/src/modules/nvidia-kernel/debian/control.template ]; then \
cp /usr/src/modules/nvidia-kernel/debian/control.template /usr/src/modul es/nvidia-kernel/debian/control; \
fi
dh_testdir
dh_testroot
touch configure-stamp
dh_testdir
dh_testroot
You appear to be compiling the NVIDIA kernel module with
a compiler different from the one that was used to compile
the running kernel. We are going to use the compiler that
were used to build the kernel with the specified headers.
(if specified in KSRC/include/linux/compile.h)
Using compiler gcc-3.3
touch /usr/src/modules/nvidia-kernel/nv/gcc-check
IGNORE_CC_MISMATCH=1 CC=gcc-3.3 /usr/bin/make -C /usr/src/modules/nvidia-kernel/ nv SYSINCLUDE=/usr/src/kernel-headers-2.4.21-5-k7/include nvidia.o
make[1]: Entering directory `/usr/src/modules/nvidia-kernel/nv'
make[1]: *** No rule to make target `/usr/src/kernel-headers-2.4.21-4-k7/include /linux/config.h', needed by `nv.o'. Stop.
make[1]: Leaving directory `/usr/src/modules/nvidia-kernel/nv'
make: *** [build-stamp] Error 2
再查看
pooh@debian:~$ cat /proc/version
Linux version 2.4.21-5-k7 (herbert@gondolin) (gcc version 3.3.1 20030626 (Debian prerelease)) #1 Mon Aug 25 08:09:01 EST 2003
pooh@debian:~$ gcc -dumpversion
3.3.2
debian:/home/pooh# dpkg --list | grep gcc
ii gcc 3.3.1-2 The GNU C compiler.
ii gcc-2.95 2.95.4-17 The GNU C compiler.
ii gcc-3.0 3.0.4-7 The GNU C compiler.
ii gcc-3.0-base 3.0.4-16 The GNU Compiler Collection (base package)
ii gcc-3.2 3.2.3-8 The GNU C compiler
ii gcc-3.2-base 3.2.3-8 The GNU Compiler Collection (base package)
ii gcc-3.3 3.3.2-0pre2 The GNU C compiler
ii gcc-3.3-base 3.3.2-0pre2 The GNU Compiler Collection (base package)
ii libgcc1 3.3.2-0pre2 GCC support library
於是再export CC=gcc-3.3.1
debian:/usr/src# export CC=gcc-3.3.1
debian:/usr/src# cd modules/nvidia-kernel/
debian:/usr/src/modules/nvidia-kernel# debian/rules binary_modules
if [ -f /usr/src/modules/nvidia-kernel/debian/control.template ]; then \
cp /usr/src/modules/nvidia-kernel/debian/control.template /usr/src/modules/nvidia-kernel/debian/control; \
fi
dh_testdir
dh_testroot
touch configure-stamp
dh_testdir
dh_testroot
You appear to be compiling the NVIDIA kernel module with
a compiler different from the one that was used to compile
the running kernel. We are going to use the compiler that
were used to build the kernel with the specified headers.
(if specified in KSRC/include/linux/compile.h)
Using compiler gcc-3.3.1
touch /usr/src/modules/nvidia-kernel/nv/gcc-check
IGNORE_CC_MISMATCH=1 CC=gcc-3.3.1 /usr/bin/make -C /usr/src/modules/nvidia-kernel/nv SYSINCLUDE=/usr/src/kernel-headers-2.4.21-5-k7/include nvidia.o
make[1]: Entering directory `/usr/src/modules/nvidia-kernel/nv'
make[1]: *** No rule to make target `/usr/src/kernel-headers-2.4.21-4-k7/include/linux/config.h', needed by `nv.o'. Stop.
make[1]: Leaving directory `/usr/src/modules/nvidia-kernel/nv'
make: *** [build-stamp] Error 2
為何我指定使用了編譯kernel 2.4.21-5-k7同一版本的gcc(都是3.3.1)都未能成功?是否還欠一些步驟?gcc的3.3.1當中是否還有新舊版本之分?:-?
還有現存舊的gcc(3.0或更早)不知尚有無用處,可否移除?