Why compile your own kernel
Microsoft, which is not silly, is using the latest longterm version of the Linux Kernel , v4. The code in this repository has some modifications, and tricks, to make the Kernel work optimally for Hyper-V. Checking the Makefile of this repository we can see that the team is already working with version 4.
For compilation I am using the Debian distro and we will need the following packages:. This compilation should take about 10 minutes or more. Now on Windows create a file called. This file is the tricks of the trade. To load the new Kernel we have to first turn off the distro that is running, and just close the window, or tab of the new terminal, does not solve.
Another very beneficial part of compiling your own kernel is that you can do your own optimization. While customization focuses on changing parts of the kernel, optimization focuses on all unneeded parts that can be removed, as well as the best combination of compilation flags that will produce a speedier kernel.
Say that your laptop doesn't have Bluetooth capabilities, and you don't plan on getting a USB dongle, you can remove everything that has to do with Bluetooth from the kernel. Through this logic, a lot of unneeded drivers can be removed, saving disk space and other resources. If they're never with the final kernel, then they won't load and take up valuable resources that could be used for something else.
Last but not least, compiling your own kernel has the benefit of giving you Linux experience. Even if you don't change anything both customization and optimization perspectives about the kernel, the experience you get by downloading a vanilla copy of the Linux kernel , compiling it, and running it on your system can be invaluable if it's something you're interested in. Obviously, this is also something that people who work on the kernel daily as a job have to do, so computer types who are in contact with Linux should take this step under consideration.
In the end, it's completely up to you what you want to do. For most users, the kernel offered by your distribution of choice will do just fine, and people who regularly compile their own kernels do so because there are specific needs or requirements.
Active Oldest Votes. I'll try and list the ones that I can think of, off the top of my head here: An oft-cited, but often wrong reason is that it will work faster.
By customizing the compiler flags for the specific system, you could theoretically create better byte-code. But with modern compilers, this is not often the case. Change certain compile time flags. Although this may not apply in your case. To remove unnecessary parts from the kernel. But as stated by jordanm, these parts are almost always modules and may not matter.
But in some cases, the difference may be significant. For academic purposes. Compiling your own kernel helps you learn a lot about the build process. Also, one gets to learn about the various configuration options. To replace certain modules. For example, to use the con kolivas patchset, real time patchset, etc. In certain situations, especially in embedded scenarios, one may add custom system calls to the kernel.
These would require a custom compilation too.
0コメント