pi-ltsp.net has a great post that explains kernels on the Raspberry Pi.
What is a kernel?
“In computing, the kernel is a computer program that manages I/O (input/output) requests from software, and translates them into data processing instructions for the central processing unit and other electronic components of a computer. The kernel is a fundamental part of a modern computer’s operating system.” – Wikipedia
The kernel is a vital part of Raspbian (and any operating system), it is the bridge between the computer hardware and the software on top. It is incredibly complex and is generally just huge! The standard Linux kernel currently (February 2015) has over 17 million lines of code contributed by over 13,000 people.
It contains all the drivers/modules required to work with the hardware. Sometimes if you want a very specialist piece of hardware to work, you may need to compile your own kernel.
Raspberry Pi kernels
The kernel for the Raspberry Pi can be found on the /boot partition (the FAT32 partition you can open on Windows, Mac and Linux).
For the Raspberry Pi 1 (B, B+, A, A+) it is called kernel.img.
For the Raspberry Pi 2 (B) it is called kernel7.img.
The kernel is one of the few bits of software that wasn’t able to run on both the Raspberry Pi 1 CPU (ARM6) and the Raspberry Pi 2 (ARM7) with the same version.
Instead the 2 versions had to be compiled separately and the firmware selects the correct one depending on the hardware it detects on boot.
There are 2 main sources for Raspberry Pi kernels. Both have their advantages and disadvantages.
- Official Raspberry Pi foundation kernels
- Unofficial Raspbian team kernels
Raspberry Pi foundation kernels
The Raspberry Pi foundation kernels are the official kernels the Raspberry Pi is shipped with. They are considerably more stripped down than the Raspbian team kernels, but are always the most up to date. For new hardware (like the new USB chip in the B+ or new CPU in Raspberry Pi 2 B), they available on day 1 of the hardware release.
They have a number of issues including not being correctly in line with the standard Debian kernels and lacking the header files, required to build custom kernel modules with.
They also don’t follow the normal installation method and package names in the Raspbian software repositories. For the average user though, these 2 downsides make no difference.
The kernel is though currently lacking AUFS support. AUFS is a virtual module for Raspi-LTSP.
Raspbian team kernels
The Raspbian team maintains their own kernels. The Raspbian team maintain the Raspbian software repositories. Their kernels are based off the standard Debian kernels, and so contain a larger array of modules to support even more hardware. Due to this fact alone, their kernels are larger and take longer to build, although this is rarely an issue.
They include proper header files for compiling your own modules and generally more closely follow the standard Debian way of handling kernels, including the standard Debian way of packaging kernels and distributing them using apt.
One of the extra modules they include is AUFS, a vital module for Raspi-LTSP network booting that is currently missing from the Raspberry Pi foundation kernels.
One of their major downsides though is they usually arrive quite a bit later than the Raspberry Pi foundation kernels, sometimes a number of weeks later.
Featured Adafruit Tutorial!
Raspberry Pi Kernel-o-Matic: If you’re ever needed to compile the Linux Kernel on a Raspberry Pi, you’ve probably noticed that it takes a long time. We sure have.
If you have a desktop computer or a laptop with decent hardware specs, it seems like there ought to be an easy way to use all that processing power to generate a new kernel for your Pi, but it can be tricky to figure out the specifics. Enter the Adafruit Pi Kernel-o-Matic, which uses Vagrant to run a virtual machine pre-configured for compiling kernels and produces a package suitable for installation on a Raspbian machine.
Vagrant is for “creating and configuring virtual development environments”. What does that mean? Well, really, it’s a simple way to set up a virtual machine (VM) running an operating system of your choice. It uses VirtualBox to run VMs, and works on OS X, Windows, and Linux. Read more.
Each Friday is PiDay here at Adafruit! Be sure to check out our posts, tutorials and new Raspberry Pi related products. Adafruit has the largest and best selection of Raspberry Pi accessories and all the code & tutorials to get you up and running in no time!
Have an amazing project to share? Join the SHOW-AND-TELL every Wednesday night at 7:30pm ET on Google+ Hangouts.
Join us every Wednesday night at 8pm ET for Ask an Engineer!
Learn resistor values with Mho’s Resistance or get the best electronics calculator for engineers “Circuit Playground” – Adafruit’s Apps!
Maker Business — How Intel Makes a Chip
Wearables — Tape tactics
Electronics — Ground connections cooler via more vias
Biohacking — Itch Tracker for Apple Watch
No comments yet.
Sorry, the comment form is closed at this time.