Linux compiler kernel 2.6.32.67

Source: Internet
Author: User

To upload the Linux kernel to the host, the Linux kernel file format is TAR.XZ.

[Email protected] home]# xz-d LINUX-2.6.32.67.TAR.XZ
[[email protected] home]# ls
Linux-2.6.32.67.tar

After xz-d decompression, the Tar.xz file is deleted, leaving only the tar package

[Email protected] home]# tar xvf linux-2.6.32.67.tar-c/usr/src

Expand the archive file to the/USR/SRC directory.

[Email protected] home]# cd/usr/src/
[[email protected] src]# ls
Debug Kernels linux-2.6.32.67
[Email protected] src]# ls-a
.  .. Debug Kernels linux-2.6.32.67
[Email protected] src]# LN-SV linux-2.6.32.67/linux
' Linux ', ' linux-2.6.32.67/'
[email protected] src]# LL
Total 12
Drwxr-xr-x. 2 root root 4096 Sep Debug
Drwxr-xr-x. 2 root root 4096 Sep kernels
lrwxrwxrwx. 1 root root 05:30 linux-linux-2.6.32.67/
Drwxrwxr-x. Root root 4096 June 3 23:25 linux-2.6.32.67

Create a soft link to the linux-2.6.32.67 directory to point to Linux

[[Email protected] src]# CD Linux
[[email protected] linux]# ls
Arch CREDITS drivers include kbuild maintainers net samples sound virt
Block Crypto firmware init kernel Makefile README scripts Tools
COPYING Documentation fs IPC lib mm reporting-bugs security usr
[Email protected] linux]# pwd
/usr/src/linux

[email protected] linux]# make menuconfig #需要安装Development Tools Pack

The following selection screen appears,

650) this.width=650; "Style=" margin:0px;padding-left:0px;padding-right:0px;border-top-width:0px; Border-bottom-width:0px;border-left-width:0px;padding-top:0px;width:300px;height:173px;background-image:none; " title= "image" border= "0" alt= "image" src= "http://s3.51cto.com/wyfs02/M01/70/72/wKioL1W4Xgvzmto6AABVEryuV1M883.jpg "Width=" height= "173" hspace= "0" vspace= "0"/>

When the selection is complete,

[Email protected] linux]# ls-a
.. configDocumentation. Gitignore kbuild maintainers README Security Virt
.. COPYING drivers include kernel Makefile reporting-bugs sound
Arch CREDITS firmware init lib mm samples tools
Block Crypto FS IPC. Mailmap Net Scripts usr

A. config hidden file appears in the current directory. If you do not want the previous selection to take effect, delete the file directly.

We can also compile the kernel on the basis of the current kernel.

[Email protected] linux]# Ls/boot
config-2.6.32-504.el6.x86_64 initramfs-2.6.32-504.el6.x86_64.img system.map-2.6.32-504.el6.x86_64
EFI Lost+found vmlinuz-2.6.32-504.el6.x86_64
Grub SYMVERS-2.6.32-504.EL6.X86_64.GZ
[Email protected] linux]# Cp/boot/config-2.6.32-504.el6.x86_64/usr/src/linux/.config
Cp:overwrite '/usr/src/linux/.config '? Yes

Copy the config file of the current kernel to a. config file and compile it on the basis of the. config file.

[email protected] linux]# make Menuconfig

You can add your own elements to the kernel version number

650) this.width=650; "Style=" background-image:none;margin:0px;padding-left:0px;padding-right:0px; border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px; "title=" image "border=" 0 "alt = "image" src= "http://s3.51cto.com/wyfs02/M02/70/72/wKioL1W4XgzD_tsHAABsKSCcwFI168.jpg" width= "244" height= "145"/ >

Save exit after other custom selections are complete.

After make

[[email protected] linux]# make

[email protected] linux]# make Modules_install

[[email protected] linux]# make install

650) this.width=650; "Style=" background-image:none;border-bottom:0px;border-left:0px;margin:0px;padding-left:0px ;p adding-right:0px;border-top:0px;border-right:0px;padding-top:0px; "title=" image "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M02/70/75/wKiom1W4XB_hlutrAABJySXgc6o659.jpg "height=" 94 "/>

The following error occurred, found the related errors, bloggers said can be ignored. Temporarily ignored.

650) this.width=650; "Style=" background-image:none;border-bottom:0px;border-left:0px;padding-left:0px; padding-right:0px;border-top:0px;border-right:0px;padding-top:0px; "title=" image "border=" 0 "alt=" image "src=" http ://s3.51cto.com/wyfs02/m00/70/75/wkiom1w4xccqp3g5aaboqgbflb4240.jpg "height=" 137 "/>

See if there is a kernel boot entry in grub.

Init 6 Restart System

650) this.width=650; "Style=" background-image:none;border-bottom:0px;border-left:0px;padding-left:0px; padding-right:0px;border-top:0px;border-right:0px;padding-top:0px; "title=" Start Interface "border=" 0 "alt=" Start Interface "src=" http:/ /s3.51cto.com/wyfs02/m01/70/75/wkiom1w4xcgjvmg7aaayujz6mry206.jpg "height=" 129 "/>

You'll find a few more options. Select the new build kernel to boot.

650) this.width=650; "Style=" background-image:none;border-bottom:0px;border-left:0px;margin:0px;padding-left:0px ;p adding-right:0px;border-top:0px;border-right:0px;padding-top:0px; "title=" image "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M02/70/75/wKiom1W4XCGybjGmAAAWdO_V980280.jpg "height="/>

Compilation Kernel succeeded.

Linux compiler kernel 2.6.32.67

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.