Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

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.

As you can see, it's pretty much the same output as in the OP. I have the correct kernel headers installed and I tried editing the make file as maroonbaboon suggested to no avail. I wish I could offer some help, but I'm afraid I'm in the same boat as tjyorkshire.

Hi guys, I'm having exactly the same problem trying to install a NIC driver. I'm something of a noob with Linux, though. What exactly are kernel headers? And what should be the connection between KERNEL_SOURCES and the contents of the /build folder?

By the way, when you say edit the makefile, will I be using vi for that?

Edit: I should mention that I originally got a message saying the /build folder did not exist, but since I thought it was just a target directory I went and mkdir'd it. What should be in there?

Like NemoTheBlue, I got a message saying that the /build file did not exist (both /lib/modules/2.6.20-16-386/build and /usr/src/linux-headers-2.6.20-16-386/build for the pre- and post-modified Makefile, respectively), so I created them using mkdir. So, both the build folders are empty. Could it be something as simple as I'm missing some packages necessary to do this?

Edit: @NemoTheBlue, you can use whatever text editor you want to edit the Makefile. I used vim, you can use that or gedit, or emacs, or whatever your text editor of choice is.

Last edited by bonder; 09-30-2007 at 02:44 PM.
Reason: edited for clarification and to add more information

So, both the build folders are empty. Could it be something as simple as I'm missing some packages necessary to do this?

Yes, that is definitely your problem! The 'kernel header files' contain descriptions of what's what inside the linux kernel. If you compile a driver it uses these to link up correctly with the kernel.

Exactly the same header files must be used to compile the kernel itself and the drivers it will use.

Many distros provide them as a package, matching whatever kernel the distro provides. If you compile your own kernel, they are part of the kernel source code. When you compile the driver, you need to tell the compiler where to find them, in this case by setting KERNEL_SOURCES correctly.

Great information so far, everyone. I think it'll go a long way to sorting me out, but not the whole way! My situation's slightly more complicated since the driver I'm trying to build is a NIC driver. My Ubuntu server is completely offline until I get the driver built, so apt-get isn't an option for me. As long as I know my kernel version, can I download the headers on another system, transfer them over and manually install? If that's an option, how would I install them or can they simply be copied into the right directory?