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
enter to this subdirectory and we are going to clone there the tree Greg Kroah-Hartman’s staging tree repository
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 2 files (modules.order, modules.builtin) and a directory (net)