Linux Kernel Modules


I have installed Scientific Linux (versions 4.x and 5.x) on my home PC and neither operating system (OS) supports either the ethernet card or wireless card I have, which means I cannot connect to a network (e.g. the internet). Therefore I had to learn about installing the necessary software to make these work. First of all, a little background about the Linux kernel. The kernel is the heart of the OS and controls most things from memory management, to pointing devices. The Linux kernel is described as a monolithic kernel, as all parts of the kernel are read and loaded wen you start you Linux distribution. The Linux kernel is continually evolving with new and improved functionality. If enough people request certain functionality be incorporated into the kernel, then eventually it will be. If the functionality you need is not included in the kernel of your distribution, then you can load extra kernel functionality in the form of modules. The kernel versions that Scierntific Linux are built on do not have the drivers for my ethernet and wireless network connections built in to the kernel (but later versions do), therefore I had to compile my own module and add it to the kernel. The basic steps were:
  1. Find the software
  2. I searched Google for my ethernet card type and found out wehere I could get Linux drivers for it.

  3. Compile the binary from source
  4. Once I had downloaded the source software I had to create a binary from it. The source software is written in a computer language, such as C, which is human readable. The advantage of open source software over closed source software is that you get to see how the software has been written, and if permitted by the licence, you can modify it to your particular needs. When the source code is compiled, it is turned from human readable to computer readable, which is known as a binary (beacuase it is made from 1s & 0s). Many free software programs are only supplied as binaries, which makes them near impossible to change.
    To compile the binary, in a console change to the folder containing the source code (such as /src) and type make install The driver is then installed to a particular directory, which should be indicated.

  5. Install the module
  6. In the console change to the folder containing the binary and type insmod {binary.name}

Hopefully your kernel module should now be installed and available for you to use. Generally the source code will have a readme file with it explaining the exact steps to use e.g. exactly where the binary will be created.