Approved: Fortect
Hope that if you have installed the Ubuntu Build kernel module on your computer, this guide can help you. Instructions for building your own kernel in Ubuntu. Determination of dependencies. Before you can impress a kernel, you need precise tools to build it. Get the kernel source. Now you are probably going to enter the source you really want to create. Customize according to your build. Start the setup by changing directories to the new duplicated directory. Kernel configuration. Build kernel packages. Install the kernel frequently.
Most users interested in building their own kernel do so as a result, since Ubuntu is installed on their system and they only want you to make small changes to the kernel that the system makes when the user only wants to run the kernel. configuration. …
The purpose of this page is that you need to provide this user with a minimum of information in order to easily modify the new kernel, compile it, and install the enterprise kernel. Be this specific guide on how to develop Ubuntu kernels.
Create Environment
If you haven’t already created a working kernel on your system, there are usually several packages that you can efficiently build ahead of time. You can install it with:
-
sudo apt-get build-dep linux linux-image - $ (uname -r)
How to build external kernel modules?
Unfortunately this does not install all required dependencies. The current version of Goofy Disco requires the following additional packages.
-
sudo apt-get install libncurses-dev gawk flex buffalo openssl libssl-dev dkms libelf-dev libudev-dev libpci-dev liliberty-dev autoconf
If buyers want to implement Git, install it from:
-
sudo apt-get configure git
The above command requires your system to fix the deb-src lines in /etc/apt/sources.list . For example, on Disco Dingo you have: Maybe
-
deb-src http://archive.ubuntu.com/ubuntu disco maindeb-src http://archive.ubuntu.com/ubuntu disco-updates main
Get Someone Else’s Source Code For The Ubuntu Version
There are several ways to develop kernel sources. Only two methods are described here.
If your family has a version of Ubuntu installed and you also want to make changes to our kernel installed in your software, use the apt-get method (described below) to grab the sources.
However, if you have the fancy of getting the latest source for whatever version of Ubuntu you usually run and making changes to it, using the Git method (described below) ends up at the sources.
Apt-get
The source code that generated a specific binary package can be obtained using the apt-get source
-
apt-get source linux-image-unsigned - $ (uname -r)
Git
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.
All Ubuntu kernel sources are managed by git . The source of each version is managed in its own Git repository using kernel.ubuntu.com . Anyway, to get a local copy, you just need to clone the repository for our own version of git that you are interested in, as described below.
-
git clone git: //kernel.ubuntu.com/ubuntu/ubuntu-
.git
-
git identical copy of git: //kernel.ubuntu.com/ubuntu/ubuntu-disco.git
Change Configuration
This step can be skipped if no configuration changes are required. At the beginning of the build process, a configuration is used that consists of various subconfig 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 each option (Y, Exit, Y, Exit ..) or get a configuration complaint later
This requires the current configuration for each supported architecture / variant in conjunction with a callovom menuconfig to manually change the configuration file. This is required for chmod when building a source package, it loses executable bits in scripts.
To make your kernel “newer” by comparing it to the Ubuntu kernel on which each is based, consider adding a modifier of your own version. For example, something adds “+ test1” to the end of the first product number in debian.master / changelog before amplifying it. This helps identify your own kernel if it also appears to work in uname -a . Please note that if an Ubuntu Newbie Kernel is released and is newer than your kernel (which will need to be rebuilt), be careful when upgrading. NOTE: Do not try to change CONFIG_LOCALVERSION as this is a _interrupt_ build.
Building The Kernel
How to customize a Linux kernel?
I need you to be able to create your own kernel build plans. Complete kernel source tree. Configure the kernel. If you can, don’t be going to tweak the distributed kernel config file, someone might skip this section (CentOS-7). Core ABI. Modification of the kernel specification file. The structure of the new kernel. Installing a new kernel.
Building the kernel is pretty straightforward. Change the working directory to the roots of the kernel source tree, then enter the following commands:
-
LANG = C fakeroot debian / clean rules# build faster:LANG = C fakeroot debian / rules binary headers binary-general and if binary-perarch# You need tools Low latency Linux kernel, instead run:LANG = C fakeroot debian / binary rules
If the compilation is successful, a set of 5 .deb package binaries will be created in the directory above the compilation source directory. Following the example of creating a perfect kernel with version “4.8.0-17.On 19”, these three (or four) .deb letters will match any good AMD64 system
-
Product 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
In later versions, the customer will also find an additional Linux package, which usually needs to be installed if available.
Testing A New Kernel
Install the specified three-part package (on your build system or diversified target system) using dpkg -i, and reboot: Dpkg
-
sudo -i linux * 4.8.0-17.19 * .debsudo reboot
Debug Symbols
Sometimes it’s also useful to create meaning when debugging. We need two more options. The first pkg-config-dbgsym must be configured. Second, you need to add skipdbg = false when starting two Common goals *.
-
sudo apt-get run pkg-config-dbgsymLANG = C fakeroot debian / clean rulesLANG = C fakeroot debian / rules binaries-headers binary-common-binary-perarch skipdbg = false
See Also
The above tutorial presents a very simple recipe for getting the sources and then creating them. If you usually bring in additional information about kernel development in the form of simple configuration changes, take note of the following: