Below I will describe in a few steps how easy and simple it is to compile the kernel in Slackware.
1. Kernel Download
- Check the latest kernel version available at https://www.kernel.org.
The version I used to make this document is Linux-4.14.12.
Now run the commands below:
2. Build Kernel
Let’s now copy the configuration file and compile the kernel.
In this step you can make your modifications to the kernel, there are several possible configurations, so if you are not sure what you are doing do not modify anything and skip this step.
Let’s now generate the kernel image that will be used to boot the system. Set the -jN option to the core number of your processor.
The next step is to generate the modules and install them.
You can check the modules here:
3. Making the final settings
With the compiled kernel now we must copy the generated bzImage to the system boot directory and adjust the entries for boot, in my case I am using UEFI with Elilo.
Creating the symbolic links in the boot directory.
We now have to create a ramdisk images used for preloading modules in the boot system. Attention here because the settings may be different and you should check and adjust.
This command will generate an output similar to this:
You can make it cleaner by taking away things you do not think are necessary.
Now let’s copy the images to the UEFI boot and add the entry to the elilo.conf file.
Let the elilo.conf file look like this just by adjusting to your settings.
Well that’s it, now just reboot the system and try out your new kernel, if you want to boot into the old kernel press the TAB key when you show the elilo boot.
For more information please check the official slackware document: https://docs.slackware.com/howtos:slackware_admin:kernelbuilding