User Tools

Site Tools


barcelona-kernel-peer-lab-first-steps

Barcelona Kernel Peer Lab

First steps

The Kernel Peer Lab is thought for people that are already working on projects for the Linux kernel upstream community. Nevertheless we want to give space to people interested in kernel development. You should be aware that the learning curve is quite high, so that we are propose to do the following preparation before you come to the lab. This way you will have more fun and can take advantage of more experienced developers when you hit any problems.

We recommend to start reading the freely available book Linux Device Drivers which you can find at lwn.net. We recommend to create a local git clone of the linux mainline kernel on your laptop

git clone https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git

Fork and clone the sample source code repository of the book: https://github.com/martinezjavier/ldd3

At least read chapter two: Building and Running Modules of the book. Make sure you understand the basics of the kernel build system. First try to compile a simple hello world module. Either by creating it yourself or have a look at this repository. When you are able to compile the module and understand the implications, you can decide which device driver from ldd3 you want to dive into and try to compile the corresponding module, e.g.:

export KERNELDIR=~/src/linux
make -C snull

This will most probably fail. Now it is up to you read the corresponding chapter in the book, understand what the driver does and help to fix it. It should compile and afterwards you should be able to use load and unload it on your machine (you might want to use a virtual machine to prevent any data loss…)

barcelona-kernel-peer-lab-first-steps.txt · Last modified: 2019/01/18 18:06 by matthias