You can use nproc to check the number of processing units available. This tends to speed up the process considerably. Note: I have used the -j option to specify the number of cores to be used. Use the following command to perform the above tasks: sudo make -j 4 & sudo make modules_install -j 4 & sudo make install -j 4 These three steps put together usually take up a lot of time. config file to the /boot folder and to generate the system.map file (which is a symbol table used by the kernel). This is followed by using make modules_install to install the kernel modules.įinally, we use make install to copy the kernel and the. To compile the kernel and its modules, we use the make command. For this, you’ll need to use make gconfig (or make xconfig) instead of make menuconfig. Gconfig and xconfig are alternate GUI based configuration tools that you could use. I did try this out once and somehow managed to mess up the display driver configurations. You will be asked over a thousand yes/no questions about enabling or disabling modules, which I promise is no fun whatsoever. This helps you configure everything from scratch. Note: One of the alternatives to menuconfig is an interactive command line interface accessible using ‘make config’. If you are unsure about making changes, just save and exit. This is the part where you could end up removing support for a device driver or do something of the sort which will eventually result in a broken kernel. This is the fastest way to do it and probably, the safest. There are many ways to go about doing this.Īn easy and straightforward way to do this is to first copy your existing kernel config file and then use ‘menuconfig’ to make changes (if necessary). Configuring and Compiling:īefore compiling the kernel, we need to configure which modules are to be included and which ones are to be left out. It should contain folders called arch, fs, crypto, etc. (Note: Try to avoid downloading source from other websites)Ĭhange to the directory where the file was downloaded and extract using: tar xf linux-4.7.1.tar.xzĬhange to the extracted linux-4.7.1 directory. At the time of writing this, the latest stable kernel version was 4.7.1, and I will refer to the same in this article. Go to and download the latest stable version. To check your current kernel version, open the terminal and type: uname -r Downloading and extracting the latest kernel source You will also need up to at least 12 GB of free space on disk, an internet connection to download the source code, and a lot of time (about 45 to 90 minutes). sudo apt-get update sudo apt-get install git fakeroot build-essential ncurses-dev xz-utils libssl-dev bc You will need to install a few packages before you can get started. What you’ll needĪ Linux based Operating System (I tried this on Ubuntu 14.04 LTS and the instructions written here are for the same). In each of the above situations, learning how to build the kernel from source will come in handy.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |