editing a c program and a makefile to work with newer kernel
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
make: *** No rule to make target `/lib/modules/`uname', needed by `fa311v2'. Stop.
I have a driver I need to compile for my pci network card. It's the Netgear FA311v2 for which the natsemi module that came with my distribution of linux (SuSE 10.0) doesn't work. Apparently the chip is different.
The driver provided is written to compile on a 2.4 kernel. I have a 2.6 kernel and apparently the way header files are included in compiling has changed. I edited the makefile to comply as instructed by the error message. Now all I get is the message quoted above.
I'm very new to the linux familly. Any help is appreciated.
Last edited by scorpion_gr; 11-14-2006 at 03:20 PM.
I am having the same problem. I have kernel 2.6.13-15. There is a White Paper at http://linuxdevices.com/articles/AT4389927951.html "Migrating device drivers to Linux Kernel 2.6" explaining all the technical details, but I do not think you or I should attempt to port Netgear's driver code from kernel 2.4 to 2.6. That's Netgear's job. I shall be writing to the supplier of my card about this problem. v2.6 has been around for about 3 years now.
Meanwhile, I have found that Yast2 automically configures a version of the RTL8139/RTL8139C/RTL8139C+DHCP driver, on which the FA311v2 driver is based.
I am also using SuSe Linux 10.0. That driver works very well for me, so far. I installed it only a few hours ago.
Well, that was a while ago and in the meantime I already figured out this much:
Using Linux is not as chaotic and frustrating as it first seemed. Much work has been done to make things easier, as long as you understand a few things.
Drivers refer to the chip mounted on the card. The newer version of the model uses a Realtek Semiconductors chip instead of the National Semiconductors one used on its predecessor. Which is why YaST assigns an rtl module to it and why natsemi doesn't work. The card works properly with this and this is the proper module for it.
There is no reason to mail the company. Their drivers are for old distros that don't carry the module in the package. Newer distros do. Besides, they state clearly that they didn't make the linux drivers themselves and that they do not support them. Someone else made them and they are being kind enough to include them in the cd.
My problem turned out to be in the DHCP server of the router. Not the module.
EDIT: No, I don't mean the router prevented me from compiling the driver. I mean the DHCP configuration of the router wasn't recognised by the system, causing me not to be able to access the internet despite using the rtl module.
Thanks for replying anyway!
Last edited by scorpion_gr; 12-11-2006 at 02:24 AM.
I guess we are both learning. Sorry I did not get your reference to natsemi. But anyway, the driver supplied to me with FA311v2 hardware was source code called fa311v2.c, written and supplied by Netgear and saying in the comments that it was cloned originally from a RTL8139 driver. It was that code which had the v2.3 kernel interface, rather than v2.6. I've given details to my hardware supplier's tech support guy and he is passing them along to his contacts in Netgear. Netgear's code was based on a more recent version of RTL8139 code than is in SuSE 10.0, so we should use Netgear's code, if and when they upgrade it to v2.6 kernel.
Oops. Maybe I'm wrong about Netgear being authors of the fa311v2.c code, on reading the header more carefully. I'll be interested to see how they reply to me, if ever ;-) The maintainer of the code is a guy called Jeff Garzik, so I think I will email him about the v2.3-v2.6 issue.
Natsemi is the built-in module that works with the original version of the card.
fa311v2.c was cloned 7 years ago from the original rtl8139too code to extend the support of it to rtl8139c+ chips. In SuSE (even 10.1 which I run now) these are supported by two individual modules. The idea behind fa311 was probably to simplify things by having a driver for all variations of the card. Maybe card modules were not even included in the distros then and people had to research on the web for them.
Don't think that the rtl8139too module has not evolved since.
Anyway, I think that even if you get to use the fa code, you'll be running the rtl8139too part of it, leaving the rtl8139c+ side of it unused. And if you have the c+ chip instead then you'll run the c+ part of the code and leave the too part unused. It makes no difference if both codes are in the same file or if you use different files for them. In my opinion separate files is cleaner and maybe faster (no need for conditional statements to check chip type).
I think the author of fa311v2 (if you already mailed him) will most likely explain to you why the fa code is no longer needed on new kernels. Projects are usually not abandoned like that. The linux community relies on people taking up such pojects.
NOTICE: Oh and watch it when you refer to kernel versions. 2.3 was never released. Odd numbers are under development. Only even numbers are released. The fa311v2 on the cd is for the 2.4 kernel. The kernel version before that was 2.2 , not 2.3.
Last edited by scorpion_gr; 12-12-2006 at 03:10 AM.
> I'm very new to the linux family. Any help is appreciated.
Now you are talking like an expert ... ;-) I guess you must be an old UNIX/Networks pro. I go back a fair way with UNIX, but mainly in database and graphical applications. Nowadays I am retired and dabble in a bit of C++ on KDE Games development. I guess what you have to say means that I need have no worries about whether the SuSE 10.0 (all Linux?) driver for RTL 8139 is the right one for you and me. Now why couldn't Netgear just write that on the packet?
Nice to have talked to you ... see you around, Ian W. :-)
Actually I'm only about 2 months in the whole linux/unix thing. And the post was made 1 month ago when I decided I had no space for both linux and windows. But I pick up quickly. Very quickly. Now that it is running ok I'll slow down a lot. No issues to solve = much less research...
Well, yeah netgear could say the drivers are already in the distros, but YaST sets it up immediatelly and automatically and if it weren't for my misconfigured router I wouldn't even have known the drivers on the cd were old. They do say it has linux compatibility and since YaST does everything on its own it couldn't be any more compatible, could it?
I don't think they suggest anywhere that we should use the drivers provided (except for windows but even then the wizard said there was nothing to be done ). It's just an assumption we make on our own...
> I don't think they suggest anywhere that we should use the drivers provided (except for windows but even then the wizard said there was nothing to be done ). It's just an assumption we make on our own...
In my case, it was the 'readme.txt' that led me astray. Usually, in the UNIX/Linux world, the first place you go when the hype peters out is any file with 'readme' or 'README' in its name. I don't think I have been misled by one before, though I have often found files that were short on info ...
True. Readme, install and other text files are a major point of attention. In this case the readme tells a long story of proprietary work and nothing on version usage. The only thing one can do is tell Netgear to update the readmes on the cd to prevent future misleading.
Anyway. have fun with whatever you're up to! See you around!