Kernel Modules or Putting it all Together

The Linux® kernel is not one huge thing that can run every hardware ever made and talk to every application ever created.  Can you imagine that? It would be huge and every time something new was added, you’d have to add it on.  Even if it wasn’t anything you needed.  Instead, the kernel is a modular kernel, which means you can add pieces on as needed.  These pieces are called modules.

It’s like Lego® blocks.  You add the blocks on that you need but you don’t have to use every single one.

Lego Blocks

Lego Blocks

Just like that picture.  If I’m making a wall, I don’t need to add this head:

Lego Head

Lego Head

It doesn’t make any sense to add that to a wall, does it?  But if the rule is ‘use every single Lego® block you own no matter what’, then even if you’re making a wall, you have to add that on .  Maybe to the top, it would be good at scaring intruders, or at least making them laugh.

With the Linux® kernel, you don’t have to do that.  You can use modules to build your kernel so it does exactly what you need and nothing more.

It’s hard to find computing hardware that Linux® won’t support.  It runs motherboards, networking connections, webcams, security systems, CDs, DVDs, mice, keyboards, card readers, I could go on and on.  In fact, it might be easier to list things it doesn’t support, but… I really can’t think of anything.  If someone really wants to use Linux® to run a piece of hardware, they’ll either write the kernel module or find someone to write it for them.

You may not use all of the modules in Linux® but when you download the source code for it from https://kernel.org (that’s where the most recent source code is) you do get almost all of the modules along with it.  You can pick and choose which parts you want when you build it, which is something we’ll talk about in the future.  That’s because it’s about how to compile a program from source code, a more advanced topic than this.

I said ‘almost all’ because sometimes hardware manufacturers offer the modules separately.  It depends on the manufacturer and the people that maintain the kernel source code.

Leave a Reply

Your email address will not be published. Required fields are marked *