Linux Kernel tutorial for Outreachy

I’m so interested in contributing for the linux kernel, so I’m going to follow the instructions to submit a first patch.

Actually I’m running in my laptop Fedora 27, the tutorial was made for ubuntu but with a little changes we can do it for fedora.

1 – Install some packages

The first thing we are going to do is to run this command

sudo dnf install vim libncurses5-devel gcc make git ctags openssl-devel

let it download the packages.

2 – Setup your Linux kernel code repository

Create a directory and a subdirectory in our user’s home 1.png

enter to this subdirectory and we are going to clone there the tree Greg Kroah-Hartman’s staging tree repository3.png

then we enter to the directory staging.


3 – Setting up your kernel configuration

When we download the source tree, it doesn’t have a .config file. We have to generate a .config file which determines which drivers are built. In order to do that duplicate your current config.

That config file is stored somewhere in /boot/. And we need to copy that file in our current directory just running this command


And as we can see, the file was copied, now we have to change it name



4 – Building the kernel

I couln’t run the command make at first, because before that I had to install the packages bison and flex, also installed libelf-dev, libelf-devel or elfutils-libelf-devel, on my laptop worked with elfutils-libelf-devel


Now, I can run make, takes a long time, but finally it works without errors


finally we can see that make add to our current directory 6 files (built-in.o, modules.order, modules.builtin, Moule.symvers,, vmlinux.o) and 2 directories (net, vmlinux)


5- Installing the kernel

Once we have the .ko files, we have to install the kernel running this command



And that’s all, when you boot your computer in the grub will appear the kernel that you have installed.


Example Faculty – Python Gtk

We wanted to create a program that can do something like take an entry and select an option to choose a faculty where you study  and finally return the name and the faculty where belongs instead of message


we enter the name of the student(alumno) “fiorella effio saldivar” and then select the faculty(facultad) “Facultad Ciencias Matematicas”, finally press send(enviar) and we will have “name of the student” + of(de la) + “faculty”


Now we are going to see the taxonomy of this program


The first part of the code


Here we set the title for the window in line 8 (UNMSM), in line 11 create a Gtk.Box called box_outer to contain all the items(select_message, listbox, button, final_label), in line 12 we add this box_outer to our main window,  in line 13 we create a Gtk.Label called select_message and then in line 14 add it to our box_outer.

Now in line 16 we create a Gtk.ListBoxRow called listbox to contain the row1 and row2, in line we set the selection mode to NONE, in line 19 we create row1 to contain hbox11, in line 20 create hbox11 to contain label1 and entry1.

In line 28 we create row2 to contain hbox21, in line 29 create hbox21 to contain label2 and combo.

The second part5.pngin line 32 we create a Gtk.ComboBoxText called combo, then in line 33, 34, 35, 36 we define the options for  combo, in line 41 we create a Gtk.Button called button and in line 42 create a Gtk.Label called final_label to show the result for our program.

In line 44 we are going to called for button when it is clicked the function on_clicked_me, we add the button and final_label to box_outer.

Finally we define the function on_clicked_me that ask us for 5 parameters (self, button, entry, label,combo), first we get the text written in a variable text, then in text2 we get the string for our combo option selected, in text3 we combine text and text2, and finally we set the text for final_label 🙂

You can check the code here.