Continuing with the Task 2 of the Eudyptula Challenge we need to compile the kernel directly coming from Linus’ repository. And also enable the option
We need to download some dependencies before we start this process
sudo apt-get install build-essential libncurses-dev bison flex libssl-dev libelf-dev git
You may also want to install some
Gtk development libraries in case you select a graphical configuration interface in the setup step.
But first we need the sources, a simple
git clone will do it:
git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
You have different ways of configuring it:
make nconfig: opens a
ncursesconfiguration based menu.
make xconfig: opens a
qtconfiguration based menu.
make oldconfig: Update current config utilising a provided
make localmodconfig: Update current config disabling modules not loaded.
You can call
make help to see all the available commands. But in the end the goal is get a
.config with every option set up.
If you don’t want to configure anything and still want to compile the kernel for your own machine, you will better of by coping the existing
.config file of your current kernel:
cp /lib/modules/$(uname -r)/build/.config .config
Then what we do is to search for
CONFIG_LOCALVARION_AUTO inside the
.config file, and we update/add that line with:
CONFIG_LOCALVERSION_AUTO Automatically appends version information to the version string.
Then is time to compile the kernel:
ccache make -j$(nproc --all)
After that command you will find your kernel located at