Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.
Luciano Miguel Ferreira Rocha wrote: > On Tue, Apr 04, 2006 at 12:37:17AM +0930, David Branford wrote: > >> When I try a "make" in /usr/src/drbd-0.7.17 (where I unpacked the >> archive) I get: >> >> Calling toplevel makefile of kernel source tree, which I believe is in >> KDIR=/lib/modules/2.6.16-1.2069_FC4/build >> >> SORRY, kernel makefile not found. You need to tell me a correct KDIR! >> >> >> However in /lib/modules I only have: >> >> drwxr-xr-x 3 root root 4096 Dec 27 23:51 2.6.11-1.1369_FC4 >> > > You can't have only this directory. Where's the one for your current > kernel? (2.6.16-1.2069_FC4, I suppose. run 'uname -r' to find out.) > > The kernel-devel for 2.6.16-1.2069_FC4 can be found in fedora's mirrors, > like > ftp://ftp.di.uminho.pt/pub/fedora/core/updates/4/i386/kernel-devel-2.6.16-1.2069_FC4.i686.rpm > > That package includes the Makefile and headers in > /usr/src/kernels/2.6.16-1.2069_FC4-i686 (the /lib/modules/.../build > symlink is included in the kernel rpm). > > >> I don't have a directory matching my currently running kernel, which is >> 2.6.16-1.2069_FC4 >> I have installed and updated the kernel-devel package for fedora core 4 >> ("yum update kernel-devel") and downloaded >> kernel-2.6.16-1.2069_FC4.src.rpm and installed it ("rpm -Uvh >> kernel-2.6.16-1.2069_FC4.src.rpm") however neither of those packages >> provides it. Do you know which FC4 package provides the needed files here? >> > > The kernel-devel must provide it. But you're missing > /lib/modules/2.6.16-1.2069_FC4... Try the form supplied by Diego: > make rpm KDIR=/usr/src/kernels/2.6.16-1.2069_FC4-i686 > > Also, the proper form to use the src.rpm is: > 1. rpm -ivh kernel-2.6.16-1.2069_FC4.src.rpm > 2. rpmbuild -bp --target `uname -m` /usr/src/redhat/SPECS/kernel-2.6.spec > > The prepared sources will end up in /usr/src/redhat/BUILD/kernel-2.6.16 > (-bc instead of -bp to also compile the kernel and modules). > > Good luck > > Thanks everyone for the helpful information; I will refer back to this message in the future also especially for how to install the kernel .src.rpm (thanks Luciano). I have managed to get the drbd module compiled on 2.6.15-1.1833_FC4 for x86_64. I wasn't able to build it on 2.6.16-1.2069_FC4 (some files weren't available - simply installing the kernel-devel package didn't do it). However for some reason on the other system, also running FC4 but running the athlon (i686) kernel, I got it working with 2.6.16-1.2069_FC4. I was able to simply install the kernel-devel package and the kernel.src.rpm for 2.6.16-1.2069_FC4 and everything built OK. Even 'make mrproper' worked. Thanks again, David