LFS -- Linux from scratch & comparison of source code compilation and RPM Compilation

Source: Internet
Author: User
LFS ── Linux from scratch Is a method for directly downloading source code from the Internet and compiling Linux from the beginning. It is not a release version. It is just a recipe that tells you where to buy food (download the source code) and how to make these raw codes a dish that suits your taste-customized Linux, not just personalized desktops.

Causes

An important reason for the existence of LFS is to help people learn how the Linux system works internally. Building an LFS system will help demonstrate what makes Linux run and how various components work together. One of the best things is that this learning experience gives you the ability to customize Linux that meets your needs.

Benefits

A key benefit of LFS is that it gives users more control over the system, rather than relying on some people's Linux implementations. In the LFS world, you are sitting in the driver's position to control every detail of the system, such as Directory level and startup script configuration. You can also controlProgramWhere, why, and how to install it.

Another advantage of LFS is the creation of a very compact Linux system. Source code compilation: (the source code is provided, so it can be used for modification) I think Source code The Comparison Between compilation and installation software such as RPM or dpkg is actually a comparison between custom software and universal software.

The same software, from the sourceCodeDuring compilation, you can customize some options during configure configuration. You can also see that during configure, It scans your machine configurations, compile the software in a more reasonable way.

The dpkg installation method is not like this. It uses common options for compilation first, and then records the compiled files, during installation, copy and paste them to the corresponding path on all machines. The advantage of this method is that for users, the installation speed is fast, and all software installation paths are pre-defined, so it is very convenient to carry out package management.

From this we can see that the source code compilation has a better matching, so that the software functions can be better played on specific machines. Dpkg is easier to install and delete, but due to the use of common options, sometimes there may be some problems: incomplete functions, or runtime crashes.

As for performance, this problem is very complicated. There are too many factors that determine the performance of a software. You may customize a configuration option to improve performance, or this option may affect performance. Therefore, in general, the performance difference is not great.

However, there are many performance differences in the kernel. Because of the general kernel, many general modules and startup projects must be added, so its startup speed and running speed cannot be compared with the speed customized for a specific machine.

In terms of performance, the most important thing is the overall impact. For example, if your QQ car is replaced with a racing engine, it will not go anywhere soon. Therefore, the overall performance is determined by the hardware/kernel/user software/background programs executed during runtime.

With LFS, we only need to be clear about it, that is:
No system is better suited to my machine than LFS.

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.