Learning operating system development using Linux kernel and Raspberry Pi

View on GitHub

1.2: Linux project structure

This is the first time we are going to talk about Linux. The idea is first to complete some small step in writing our own kernel, and then take a look at how the same things work in Linux. So far we have done very little: we just implemented our first bare metal hello world program, Still, we will be able to find some similarities between the RPi OS and Linux. And now we are going to explore some of them.

Project structure

Whenever you start investigating any large software project, it worth taking a quick look at the project structure. This is very important because it allows you to understand what modules compose the project and what is the high-level architecture. Let’s try to explore project structure of the Linux kernel.

First of all, you need to clone the Linux repository.

git clone -b v4.14 --depth 1 https://github.com/torvalds/linux.git

We are using v4.14 version because this was the latest version at the time of writing. All references to the Linux source code will be made using this specific version.

Next, let’s take a look at the folders that we can find inside the Linux repository. We are not going to look at all of them, but only at those that I consider the most important to start with.

This explanation is very high-level, but this is enough for now. In the next chapter, we will try to examine Linux build system in some details.

Previous Page

1.1 Kernel Initialization: Introducing RPi OS, or bare metal “Hello, world!”

Next Page

1.3 Kernel Initialization: Kernel build system