Environment Introduction
The release version is Debian 6.0 and the kernel version is 2.6.32-5-686. The basic development environment is already available.
The kernel version to compile is 4.3.
Kernel source
Download the kernel source linux-4.3.tar.xz from the http://www.kernel.org website and unzip:
XZ-DC linux-4.3. Tar.xz | Tar xvf-
Readme document description in the main reference directory.
Kernel compilation
O (The letter "ou") parameter is required in order for the compiled content to be stacked with the source to a different directory.
Assume that the kernel source location is:/home/migney/kernel/linux-4.3; compile-generated content to:/home/migney/kernel/build-4.3.
1. Kernel configuration
If you have previously compiled, you need to empty the previous content and then configure the kernel:
mkdir /home/migney/kernel/build-4.3/home/migney/kernel/linux-4.3# Clear the generated content from the previous build make mrproper# kernel configuration make o=/home/migney/kernel/build-4.3 Menuconfig
In the Open interface to the corresponding configuration, save exit. This step generates a. config file.
2. Compiling
Make o=/home/migney/kernel/build-4.3
This generates various modules, kernel images, and so on.
3. Installation Module
Make o=/home/migney/kernel/build-4.3 modules_install
Modules are installed into the/lib/modules/4.3.0 directory.
module is the kernel configuration when the "M", can be dynamically loaded at runtime (INSMOD), lack of load (rmmod).
4. Install the kernel
Make o=/home/migney/kernel/build-4.3Install
Files such as vmlinuz-4.3, config-4.3, System-4.3.map, and so on are generated in the/boot directory.
Where vmlinuz-4.3 is the compiled generated file/home/migney/kernel/build-4.3/arch/x86/bzimage,config-4.3 is the file/home/migney/kernel/ Build-4.3/.config, just changed the position, changed the name.
5. Generate INITRD
Initramfs?
Generate/boot/initrd-4.3.0.ram
6. Update the GRUB configuration file
Update-grub
Scan the/boot directory and update the/BOOT/GRUB/GRUB.CNF file.
7, restart, select the new kernel in the boot menu, use the following command to confirm:
uname -R
Linux kernel compilation