Approved: Fortect
You may come across an error code pointing to Compilar Kernel Ubuntu. There are several ways to solve this problem, and we will deal with it shortly.
Most computer users interested in building their own kernel do so because Ubuntu is installed on their system.me, and many people want to make small changes to the kernel for this system. In cases where the user just wants to change the kernel configuration.
Approved: Fortect
Fortect is the world's most popular and effective PC repair tool. It is trusted by millions of people to keep their systems running fast, smooth, and error-free. With its simple user interface and powerful scanning engine, Fortect quickly finds and fixes a broad range of Windows problems - from system instability and security issues to memory management and performance bottlenecks.
The purpose of most of these pages is to give this person a minimum of information on each, in order to simplify each kernel modification, conceptualize and install the kernel. Is this definitely intended as a comprehensive guide to help you develop your Ubuntu kernel?
Create Environment
How to compile a kernel in Ubuntu Linux?
Go to www.kernel.org and select the kernel you want to install eg. linux-2.6.18.1.tar.bz2 (you can get all 2.6 kernels here: http://www.kernel.org/pub/linux/kernel/v2.6/). Then you can load it into / usr / src in exactly the same way: We then unpack the kernel reasons and create a linux symlink for all the kernel source directories:
If you haven’t already compiled the kernel on your main system, there are several packages that are required to build it successfully. You will probably install it with:
-
sudo apt-get build-dep linux-image - $ (uname linux -r)
Unfortunately, the above does install all the required dependencies. The current version of Disco Release Goofy requires the following additional packages.
-
sudo apt-get lay libncurses-dev gawk flex bison openssl libssl-dev dkms libelf-dev libpci-dev libudev-dev liliberty-dev autoconf
If you are probably using git, install it for the following reasons:
-
sudo apt-get install git
The above command requires yourthe system had perfect deb-src lines in /etc/apt/sources.list . For example, on Disco Dingo you should have:
-
deb-src http://archive.ubuntu.com/ubuntu disco maindeb-src http://archive.ubuntu.com/ubuntu main
Getting Disco Updates From Source In Ubuntu Version
There are a number, usually associated with different methods of obtaining kernel extracts. There are usually two main routes documented here.
If you have a specific version of Ubuntu installed and need help modifying a kernel that is often installed on your system, use any apt-get (method described below) to get the source code.
However, if you want to know how the most recent sources for our own Ubuntu work and want to make some changes to them, use the Git strategy (detailed below) to get the sources.
Apt-get
How to install a new kernel without compilation?
You stumbled across your page by accident and looked at it because it looked interesting, but you really don’t want to know more about kernels. If you want to install a good new kernel without compiling, you can use Synaptic, search for a Linux image, and select the version of the kernel you want to install.
The base code that generated a specific binary package can usually be obtained with the command apt-get source
-
sentences apt-get linux-image-unsigned - $ (uname -r)
Git
Which is the Linux kernel for Ubuntu 18.04 LTS?
In this example, I will be using an Ubuntu 18.04 LTS (AMD64) desktop with Linux 5.0.0 kernel and some kenel 5.4.2 source files as an example to build a Linux kernel with a custom system call and then build a Linux kernel. unix from the system updates the desktop.
All Ubuntu kernel sources are simply managed with git . The source code, if each version is managed, can be found in their Manage Git repository at kernel.ubuntu.com . To get a good local copy, you can simply make an identical copy of the repository for the version you are interested in, as shown below.
-
git replicate git: //kernel.ubuntu.com/ubuntu/ubuntu-
.git
-
git clone git: //kernel.ubuntu.com/ubuntu/ubuntu-disco.git
Change Configuration
You can also skip this step if you do not want the configuration benefits. The build process works with a configuration made up of various sub-configuration files. The easiest way to change something here is to run:
-
chmod a + x debian / ruleschmod a + x debian / scripts / *chmod a + x debian / scripts / misc / *LANG = C fakeroot debian / clean rulesLANG = C fakeroot debian / rules editconfigs # you must go through all of them (Y, Exit, Y, Exit ..) or get a configuration complaint later
This takes the current configuration at the time of any supported architecture / variant and calls menuconfig to successfully edit it configuration file. Chmod may be needed because the executable parts of the scripts will be lost when building the source package.
To keep your kernel “newer” than the standard Ubuntu kernel you are based on, consider adding a local version modifier. Add something like “+ test1” to put the version number in debian.master / changelog before compiling. This can be very useful for identifying your kernel if it also shows up as a chase in uname -a . Please note that if a new Ubuntu kernel is released, it will definitely be newer than the kernel requires (which is being restored), so be careful when updating. NOTE: be sure to try using as config_localversion, _will_ will abort the build.
Building The Kernel
Building the kernel is easy. Change the administrative directory to the root directory of this kernel source tree, and then run the following commands shortly thereafter:
-
LANG = C fakeroot debian / clean rules# Building Somper:LANG = C fakeroot debian / rules header binary binary common binary fa л perarch# If clients want Linux tools or a low latency kernel, use sprint instead:LANG = C fakeroot debian / binary rules
If the build is successful, a set of three .deb package binaries will be created in the listing directory above the build root directory. For example, after building a kernel with translation “4.8.0-17.19” on an amd64 system, these several (or four) .deb packages will grow:
-
CD ..ls * .deb linux headers-4.8.0-17_4.8.0-17.19_all.deb linux-4.8.0-17-generic_4.8.0-17.19_amd64.deb headers linux-image-4.8.0-17-generic_4.8.0-17.19_amd64.deb
You will of course find an additional Linux package in later versions that you should even install if you have one.
Testing A New Kernel
Install three packages (in build method or other target system) due to dpkg -i then
-
restart sudo: dpkg -i linux * 4.8.0-17.19 * .debsudo reboot
Debug Symbols
Sometimes it makes sense to create debug symbols so efficiently. Two more steps are required. The first pkg-config-dbgsym must be installed. Second, if you create targets in binary format – *, you need to add ‘skipdbg = false ‘.
-
sudo apt-get install pkg-config-dbgsymLANG = C fakeroot debian / clean rulesLANG = C fakeroot debian / rules binary-headers binary-common-binary-perarch skipdbg = false
See Also
The above tutorial presents a very simple recipe for getting the sources and building them at this stage. If you want more kernel development success than just config changes, you should look here