Debian Linux Kernel Compilation

Source: Internet
Author: User
Tags gz file
Article title: Debian Linux Kernel Compilation details. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

1. the following software packages are required to compile the official kernel directly on the console in traditional mode:

Bin86-16-bit runner ER and loader

Diff-File comparison utilities

Libc6-dev-gnu c Library: Development Libraries and Header Files

Libncurses5-dev-Developer's libraries and docs for ncurses

Patch-Apply a diff file to an original

2. make xconfig

Tk8.4-Tk toolkit for Tcl and X11, v8.4-run-time files

Make xconfig

Libqt3-mt-dev-Qt development files (Threaded)

Make gconfig

Libgtk2.0-dev-Development files for the GTK + library

3. if you want to make the deb package of the kernel, you also need

Debianutils-Miscellaneous utilities specific to Debian

Kernel-package-A utility for building Linux kernel related Debian package

Ksymoops-Linux kernel oops and error message decoder

Kernel Compilation

Http://www.debian.org/doc/manuals/reference/ch-kernel.zh-cn.html

Gcc, binutils, and modutils in the Debian unstable release can be used to compile the latest Linux kernel. Official information in this regard,

See the second half of the/usr/share/doc/kernel-package/README.gz file.

Kernel compilation is a very difficult issue. as the goal is constantly changing, even the most respected developers may have different opinions:

Manoj Srivastava writes: -- initrd requires the Debian cramfs patch. Herbert Xu writes: No, it is not required. you want to use

For file systems other than CRAMFS, you only need to set MKIMAGE in/etc/mkinitrd. conf.

Follow the instructions in/usr/share/doc/kernel-package/README.gz written by Manoj and Kent to compile the latest version.

To install the latest kernel-package for unstable.

For single-host kernel compilation, initrd is not required. I use it to expect that the newly compiled kernel is exactly the same as the corresponding kernel image. If

To use initrd, read mkinitrd (8) and mkinitrd. conf (5) first ). See http://bugs.debian.org/149236.

Standard Debian mode

Check out the error reports related to kernel-package, gcc, binutils, and modutils. Use a newer version as required.

Be careful when compiling a custom kernel with source code in the Debian system. Use the -- append_to_version option of make-kpkg to create multiple kernel mirrors

Security.

# Apt-get install debhelper modutils kernel-package libncurses5-dev

# Apt-get install kernel-source-2.4.18 # use the latest version

# Apt-get install fakeroot

# Vi/etc/kernel-pkg.conf # enter my name and email

$ Cd/usr/src

# Creating a directory

$ Tar -- bzip2-xvf kernel-source-2.4.18.tar.bz2

$ Cd kernel-source-2.4.18 # if this is your kernel source code

$ Cp/boot/config-2.4.18-386. config # set the current configuration to the default configuration

$ Make menuconfig # customized according to your preferences

$ Make-kpkg clean # you must perform this step (per: man make-kpkg)

$ Fakeroot make-kpkg -- append_to_version-486 -- initrd \

-- Revision = rev.01 kernel_image \

Modules_image # modules_image

Is pcmcia-cs.

$ Cd ...... # Dpkg-I kernel-image *. deb pcmcia-cs *. deb # installation

Make-kpkg kernel_image actually executes make oldconfig and make dep. If initrd is not used, do not use

-- Initrd option.

If you want to load the pcmcia-cs module or do not have pcmcia, select "General setup->" after make menuconfig to go

"PCMCIA/carw.support->", configure the "<> PCMCIA/carw.support" option (for example, cancel the option ).

For SMP machines, set CONCURRENCY_LEVEL as described in kernel-pkg.conf (5.

Related Article

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.