Linux kernel source code compilation and Linux kernel source code compilation

Source: Internet
Author: User

Linux kernel source code compilation and Linux kernel source code compilation

Ubuntu14.04 system compilation 3.16.1 Kernel

My system is completely new (just installed and updated 20140906)

Download the linux-3.16.1 system and unzip it to/usr/src:
Mkproper
Unable to execute this command, indicating that the related software is missing. Just install it online.
Sudo apt-get install ncurses-dev
Make menuconfig
The method used is to directly import the existing. config file of the Local Machine without modification.
Start Compilation:
Make bzImage
After the compilation is successful, related success information is displayed.
Make modules
For the above kernel and module compilation, install the following:
Make modules_install
In this case, all the items including the installed modules will generate corresponding folders under/boot /.
Make install
After the kernel is installed (the kernel will be copied to the Standard Location/boot ..), the corresponding grub file will also be changed.

The above basically completed all the kernel compilation work.
After startup, everything works normally.

PS: Nic Problems
After a few hours of successful running after the boot, the system suddenly fails to connect to the Internet ....
I don't know what the problem is:
No problem with the network port
No problem with the network cable
So I suspect that the network card is broken. What I verified later is
There are two graphics cards on the hardware: the graphics card on the motherboard and an independent graphics card
An error occurred while driving the independent graphics card.
It is suspected that the independent video card is preferentially enabled when the system starts up, and the driver of the independent video card is broken.
Solution:
Unplug the independent video card, and the video card on the motherboard can run normally. Solved it ....


Is Linux kernel compilation and source code installation the same thing?

The Linux kernel is downloaded as code and needs to be configured and compiled. The compilation process is of course the compilation process. For specific compilation process, see the readme.txt file in the internal root directory. This file is generally used to configure, clean up directories, compile and generate images, and modify startup files.

How to compile the kernel source code tree For linux module programming?

Of course...

The first point is that the source code tree contains the corresponding header file and function implementation, and there is no source code tree. Where can you call it? (During PC compilation, the kernel has the export symbol and the system has the header file, so that you can reference the interface provided by the kernel, but you can only compile the modules that can be loaded by the kernel of your PC version ).

Second, the kernel module records the version number. The reason for recording the version number is that the interfaces and calls of Different kernel versions may be quite different, therefore, you must ensure that your Code corresponds to a specific kernel, so that the compiled modules can (and can only) be loaded in the Linux system running this kernel version, otherwise, a very simple exception will cause the kernel to crash, or your Code cannot be compiled at all (the interface name has changed ).

I mentioned the compiling of modules above. Of course, if the module is directly compiled into the kernel, you should not have to say that you cannot compile the kernel without the kernel source code.

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.