![]() ![]() It is a sequence of questions - a lot of questions - and if you change your mind you have to start again. ![]() Make config is the most basic but probably not to most people's taste. Instead, you want to use one of the config targets from the kernel makefile (meaning, enter make _ on the command line from the top level source directory): Changing options is often not a simple matter of replacing a Y with an N, etc there is usually a set of interdependencies and branching possibilities. config is a text file used to configure the kernel. AFAIK it won't work at all the other way around (using a config from a newer version). If the configuration is from a vastly older version, this may lead to strange results, so pay attention when you do the configuration. config will first be parsed and updated to match the new version. Note that the configuration options shift and change from one kernel version to the next, and when you run one of the make config programs below your. However, it is probably a better starting point than the default. It is also awkward in that it requires an initramfs to contain certain core modules (see step #4 below). This does not matter to the kernel's functionality much, since they are modules and most of them will never get used, but it very significantly increases the time required to build. The distro config is not very ideal in the sense that it includes almost every possible hardware driver. Try sudo modprobe configs, then check the /proc directory for config.gz again. If it doesn't exist, it maybe because this option was configured as a module. If it exists, copy that into the top level of the source tree and gunzip -c config.gz >. This is an optional feature added in the 2.6 kernel. ![]() If you used a distro source package, it probably already contains a /.config file, so you can use that. A better bet is to use your existing configuration, if available. This also means having to read through most of the options (there are hundreds). However, if you've never done that before, expect a lot of trial and error. ![]() You don't have to do this - you can just dive right in and create a configuration from scratch. I prefer the latest stable so I can act as a guinea pig before it gets rolled out into the distros :) So the safest route is still to use the distro package, which should install into /usr/src. Doing that doesn't really make much difference, however, beyond the fact that if you want the absolute latest kernel, your distro probably has not packaged it yet. In 15+ years of building custom kernels (mostly on Fedora/Debian/Ubuntu), I've never had a problem using the vanilla 1 source. It will also match the kernel include headers used to compile some userspace tools, although they are most likely identical anyway. This contains distro specific patches, which may or may not matter to you. Note that individual distros usually recommend you use one of their source packages instead of the vanilla tree. Place the file there and: tar -xJf linux-X.X.X.tar.xz Once the tarball is downloaded, you need to unpack it somewhere. At the time of this writing, this is a 74 MB tar.xz file. Unless you have special reason to do otherwise, you are best off just choosing the "Latest Stable". The latest ones are listed on the front page, but if you look inside the /pub/ directory, you'll find an archive going all the way back to version 1.0. While some of the steps are optional, you should read them anyway as they contain information necessary to understanding the rest of the process. You probably want to do this stuff su root as the source tree should remain secure in terms of write permissions (it should be owned by root). In the following instructions, paths inside the source tree take the form /whatever, where is the directory you installed the source into, e.g. This way, if your new one does not work, you can just reboot the old one. Building a custom kernel can be time consuming - mostly in the configuration, since modern computers can do the build in a matter of minutes - but it is not particularly dangerous if you keep your current, working kernel, and make sure to leave that as an option via your bootloader (see step #6 below). ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |