|
楼主 |
发表于 2005-7-28 17:32:56
|
显示全部楼层
啊,多谢,我找到方法了,是不是下面这各种?
Living with Linux
Jump to navigation
15 August, 2004
Getting a Debian kernel source tree for driver compilation
I have stumbled into this a few times, so I'd better write it down. Here is how you get a kernel source tree setup for compilation of drivers under Debian, assuming you're using a Debian provided kernel package.
The information is shamelessly stolen from Martin List-Petersen:
Lets assume you've installed kernel-image-2.x.y-z-arch. It could be kernel-image-2.4.25-1-386 in which case x=4, y=25, z=1, arch=386. These numbers are need in the following.
The procedure is this:
Download the kernel source package:
apt-get install kernel-source-2.x.y
Unpack it:
cd /usr/src
tar -xjvf kernel-source-2.x.y.tar.bz2
Install the correct config-file:
cd kernel-source-2.x.y
cp /boot/config-2.x.y-z-arch .config
Generate dependencies and Makefiles:
make-kpkg --append-to-version "-z-arch" --revision 2.x.y-z --config old configure
Check build link:
rm -f /lib/modules/2.x.y-z-arch/build
ln -s /usr/src/kernel-source-2.x.y /lib/modules/2.x.y-z-arch/build
Most drivers will use the build link to find the correct kernel source tree for include files and Makefiles.
With this in place many drivers can be installed with a simple "make install".
… … …
posted on 2004-08-15 at 18:32 by René Seindal - Category: Debian
Comments
Thorbjørn wrote:
I had some problems, when I followed your short description... it does not tell you what other packages you need to do the trick...
According to http://newbiedoc.sourceforg... you also need:
1. gcc
2. kernel-package
3. kernel-source-2.4.18 (or whatever kernel sources you will be using)
4. libc6-dev
5. tk8.0 or tk8.1 or tk8.3
6. libncurses5-dev
7. fakeroot
8. bin86 (for building 2.2.x kernels on PCs)
Without these packages, make-dpkp stops during execution... it took me some time to figure out what was wrong
posted on 2005-01-16 at 22:04
marcel wrote:
Maybe it was not complete but that was the most useful advice I have found after hours of search!
Marcel
posted on 2005-07-02 at 18:57
puchatek wrote:
I have this:
make-kpkg --revision 2.6.11 --config old configure
/usr/bin/make \
ARCH=i386 oldconfig
make[1]: Entering directory `/usr/src/kernel-source-2.6.11'
HOSTCC scripts/basic/fixdep
In file included from /usr/include/sys/socket.h:35,
from /usr/include/netinet/in.h:24,
from /usr/include/arpa/inet.h:23,
from scripts/basic/fixdep.c:115:
/usr/include/bits/socket.h:305:24: asm/socket.h: Nie ma takiego pliku ani katalogu
make[2]: *** [scripts/basic/fixdep] Błąd 1
make[1]: *** [scripts_basic] Błąd 2
make[1]: Leaving directory `/usr/src/kernel-source-2.6.11'
make: *** [stamp-kernel-configure] Błąd 2
Why?? I have installed
1. gcc
2. kernel-package
3. kernel-source-2.4.18 (or whatever kernel sources you will be using)
4. libc6-dev
5. tk8.0 or tk8.1 or tk8.3
6. libncurses5-dev
7. fakeroot
8. bin86 (for building 2.2.x kernels on PCs)
posted on 2005-07-27 at 14:32
puchatek wrote:
*** 3. kernel-source-2.6.11-7
# uname -a
Linux boomcak 2.6.11 #2 SMP Thu May 26 20:53:11 CEST 2005 i686 GNU/Linux
posted on 2005-07-27 at 14:34 |
|