Linux 4.1 Kernel compilation report

Source: Internet
Author: User

Experimental EnvironmentArch Linux on VirtualBox Download Kernelhttps://www.kernel.org/Download the kernel compression package:
Unpack the package$ sudo tar-xvjf linux-4.1.tar.xz to setHere I use the default settings for the current running kernel. Copy the configuration file (. config file) of the running kernel to the compiled root. $ zcat/proc/config.gz >. config of course, you can also manually set$ sudo make menuconfig(detailed instructions are available at the end of the resources section) compiling the kernel$ sudo make [-j 2]The following parameter,-J2, indicates that the CPU has to turn on two threads to compile the kernel, which speeds up the compilation. after compiling the kernel file: Mounting Module$ sudo make modules_install  Copy the compiled kernel to the/boot directory$ cp-v arch/x86/boot/bzimage/boot/vmlinuz- yourkernelname here Yourkernelname for 4.1:$ cp-v arch/x86/boot/bzimage/boot/vmlinuz- 4.1
make initialize memory disk $ mkinitcpio-k fullkernelname /etc/mkinitcpio.conf-g/boot/initramfs- yourkernelname. img
The available fullkernelname can be queried through the ls/lib/modules command :  here fullkernelname for 4.1.0-arch(e.g.): $ mkinitcpio-k 4.1.0-arch -c/etc/mkinitcpio.conf-g/boot/initramfs- 4.1. IMG
[Copy System.map]$ cp system.map/boot/system.map- yourkernelname here Yourkernelname for 4.1:$ cp system.map/boot/system.map- 4.1 $ ln-sf/boot/system. Map-yourkernelname/boot/system.map Set Startup Items$ grub-mkconfig-o/boot/grub/grub.cfgwe can see that grub automatically adds a new kernel Restart$ reboot 0 kernel comparison before and after compilationbefore compiling:after compiling: References1. Https://wiki.archlinux.org/index.php/GRUB
2. Https://wiki.archlinux.org/index.php/GRUB(Thanks to Arch-linux's detailed wiki documentation)

Linux 4.1 Kernel compilation report

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.