gabriel rosenkoetter on Tue, 20 Aug 2002 11:37:19 -0400 |
On Tue, Aug 20, 2002 at 07:00:52AM -0700, Sijian Zhou wrote: > The downloaded RedHat 7.3 version from www.redhat.com > does not include source code. That's because they presume you'll use the RPM system to get a new kernel. That doesn't mean you can't compile it yourself, of course. On a RH 7.3 machine I set up recently: dice:~# rpm -qa | grep kernel kernel-pcmcia-cs-3.1.27-18 kernel-2.4.18-3 kernel-utils-2.4-7.4 kernel-smp-2.4.18-3 kernel-source-2.4.18-3 kernel-debug-2.4.18-3 kernel-doc-2.4.18-3 > So I have to download linux 2.4.18 source code from > ftp.linux.com (RedHat 7.3 using linux 2.4.18-3 kernel. > I don't know what "-3" mean here). -3 is the RPM version number. (They patch bugs within the same version of the kernel without updating the kernel source proper. Yes, that means that -3 is a little bit different from 2.4.18.) > When I try to compile Ethernet driver: fealnx.c, I > found that linux/config.h is including > linux/autoconf.h. But autoconf.h is not in 2.4.18. > What is going on? What file autoconf.h become to? That's because the source you downloaded from ftp.linux.com is presuming that your C compiler can build a kernel. RedHat's gcc(1) default one can't. Use kgcc. (Cf, lots of previous discussion in lots of places, including this mailing list, about how braindamaged RH's compiler setup is. My saying "use kgcc" makes a molehill out of a mountain; there're lots of Makefiles that will need to be subtly edited for this to work.) > Also, driver source code using linux/malloc.h. But > this file is depreciated to linux/slab.h. Should I > just change malloc.h to slab.h in Ethernet driver > fealnx.c code? "Depreciated"? Do you mean "deprecated"? You probably shouldn't change the #include; if that were going to work, then malloc.h would be a sym link (or would silently #include slab.h itself). The interface has probably changed. If I were you, I'd go get kernel-source-2.4.18-3.rpm from RedHat (lots of ways, the easiest being up2date(8)) and build using that; it'll cause you the least pain. They've dealt with their own kgcc nonesense for you, and make(1) will dtrt within a source tree from the kernel-source RPM. -- gabriel rosenkoetter gr@eclipsed.net Attachment:
pgp1h9dgk3Ubw.pgp
|
|