Table of Contents
You should read these repair ideas if you get an Ubuntu kernel development error message on your computer.
Updated
Most users are interested in building their own kernel because they can have Ubuntu installed on their system and they just want to bump up the kernel a bit for that system. In countless cases, the user just really wants to change the kernel configuration.
The purpose of this page is to provide the user with the minimum amount of information necessary to achieve the goal of simply modifying the kernel, compiling it, and installing the kernel. It should not be taken as a comprehensive guide to Ubuntu kernel development.
Create Environment
If you haven’t already built a kernel on your system, you will need a few methods before you can successfully compile. You can install it with:
-
sudo apt-get build-dep linux linux-image - $ (uname -r)
Unfortunately this does not install all required dependencies. The Goofy Disco version currently uses the following additional packages.
-
sudo apt-get is installed in libncurses-dev gawk flex bison openssl libssl-dev dkms libelf-dev libudev-dev libpci-dev liliberty-dev autoconf
If you probably want to use Git, install it programmatically.Your provision through:
-
sudo apt-get install git
The above check requires your system to have the correct deb-src lines in /etc/apt/sources.list . For example, for Disco Dingo you should have:
-
deb-src http://archive.ubuntu.com/ubuntu disco maindeb-src http://archive.ubuntu.com/ubuntu disco-updates main
Getting Results For Ubuntu And Release
There are several different ways to get the kernel sources frequently. There will definitely be two main routes documented here.
If you have patched a version of Ubuntu and want to make changes to the kernel that is often installed on your system, use this particular apt-get method (described below) to get some source code.
However, if you want to find the most recent source code for the version of Ubuntu you are using and therefore want to make changes to it, use the new Git method (described below) to get the basics.
Apt-get
The source code that generated a specific binary package can usually be obtained using the apt-get source
-
main components of apt-get linux-image-unsigned - $ (uname -r)
Git
The entire Ubuntu kernel base is managed by git . The offer for each version is managed in its own Git repository at kernel.ubuntu.com . To find your local copy, you can simply clone the repository of the version you are interested in using git as shown below.
-
git duplicate git: //kernel.ubuntu.com/ubuntu/ubuntu-
.git
Updated
Are you tired of your computer running slow? Annoyed by frustrating error messages? ASR Pro is the solution for you! Our recommended tool will quickly diagnose and repair Windows issues while dramatically increasing system performance. So don't wait any longer, download ASR Pro today!
git clone git: //kernel.ubuntu.com/ubuntu/ubuntu-disco.git
Change Configuration
This one-person step can be skipped if no location changes are required. The build process can use a configuration assembled from various subconfiguration files. The easiest way to change anything here is to get your job done:
-
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 number you view each (Y, Exit, Y, Exit ..)
This is the current order for each supported architecture / variant and the menuconfig logs to edit the fileand the configuration. The chmod command is often required because the exe bits in scripts are lost when the provider package is created.
To make the kernel your "newer" kernel than the standard Ubuntu kernel you depend on, you need to add a local variant modifier. Before creating it, add something like "+ test1" to the end of the first version number in the debian.master / changelog file. This will help your kernel run as it also appears in uname -a . Please note that if a new Ubuntu kernel is released, it will be newer than your kernel (which will need to be rebuilt) and therefore will require maintenance during the upgrade. Please understand: don't try to use CONFIG_LOCALVERSION because the following _ will break the build.
Build This Core
Building the kernel is pretty straightforward. Change the best working directory to the root directory of our kernel source tree, then enter the following commands:
-
LANG = C fakeroot debian / clean rules# build a lot more:LANG = C fakeroot debian / rules header binary binary common perarch binary# In cases whereif you want Linux tools or a low latency kernel, use err instead:LANG = C fakeroot debian / binary rules
If the build is definitely successful, a set of three binary .deb files will be created in the directory above the build root directory. For example, after building a kernel with version 4.8.0-17.19 on an AMD64 system, this type of three (or four) additional .deb packages is created:
-
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 also find an additional Linux package in later versions, which you will also install if you have one.
Testing A New Kernel
Install all three packages (on your recording system or another system) using dpkg -i, then restart:
-
sudo dpkg -i linux * 4.8.0-17.19 * .debsudo reboot
Debug Symbols
Sometimes it's a good idea to create debug symbols well. Two more steps are required. The first pkg-config-dbgsym must be installed. Second run, if binary targets are *, you should be able to add 'skipdbg = false'.
-
sudo apt-get pkg-config-dbgsymLANG = C configure Fakeroot debian / own rulesLANG = C fakeroot debian / rules binary-headers binary-common-binary-perarch skipdbg = false
See Also
The above tutorial provides a particularly simple recipe for getting the source code and then building it. If you want to do more with kernel development than just changing the configuration, please rate it:
Ubuntu 커널 개발을 위한 버그 수정 및 패치
Buggfixar Och Patch För Ubuntu-kärnutveckling
Corrección De Errores Y Parche Para El Desarrollo Del Kernel De Ubuntu
Bugfixes En Patch Voor De Ontwikkeling Van De Ubuntu-kernel
Fehlerbehebungen Und Patch Für Die Ubuntu-Kernel-Entwicklung
Correções De Bugs E Patch Para O Desenvolvimento Do Kernel Do Ubuntu
Poprawki Błędów I łatki Do Rozwoju Jądra Ubuntu
Исправления ошибок и патч для разработки ядра Ubuntu
Corrections De Bogues Et Correctifs Pour Le Développement Du Noyau Ubuntu
Correzioni Di Bug E Patch Per Lo Sviluppo Del Kernel Ubuntu -