We’ve often heard that you don’t need to know how an engine works to drive a car, but you can bet that professional race car drivers know. By analogy, you can build lots of systems with off-the-shelf boards like Raspberry Pis and program that using Python or some other high-level abstraction. The most competent hackers, though, know what’s going on inside that Pi and what Python is doing under the hood down to some low level.
If you’ve been using Linux “under the hood” often means understanding what happens inside the kernel–the heart of the Linux OS that manages and controls everything. It can be a bit daunting; the kernel is simple in concept, but has grown over the years and is now a big chunk of software to approach.
Your first embedded system project probably shouldn’t be a real time 3D gamma ray scanner. A blinking LED is a better start. If you are approaching the kernel, you need a similar entry level project. [Stephen Brennan] has just the project for you: add your own system call to a custom Linux kernel.
Like a blinking LED, the system call isn’t all that exciting in itself. But learning how to set up the kernel source tree, configure it, and build it can be educational. Of course, you might already know how to do the steps to configure and build since it isn’t uncommon to build custom kernels. However, adding your own code and making it work is educational.
There was a time when experimenting with a kernel almost required you to have a spare machine or a strong constitution. These days, you just do your build in a virtual machine and you can mess up all you like.
You might not get excited over a little thing like a custom system call, but it is a gateway to bigger things. Using GPU acceleration for a screaming fast kernel, for example. If you don’t want to bother with a virtual machine, maybe you can work on an 8-bit AVR instead.
Photo credit: [Shmuel Csaba Otto Traian] CC BY-SA 4.0