Build LINUX [LFS] And linuxlfs from scratch

Source: Internet
Author: User
Tags gmp

Build LINUX [LFS] And linuxlfs from scratch

"LINUX is the example" has a chapter dedicated to introducing the Linux build. The process is detailed and interesting. A brief summary of this information

 

LFS

This site provides detailed steps to build a Linux from the source code

Books

Http://archive.linuxfromscratch.org/lfs-museum/stable/LFS-BOOK-7.5.pdf

Package

Wget-list verified package address

Http://archive.linuxfromscratch.org/lfs-museum/stable/wget-list

Some bags can not get, refer to this http://www.linuxfromscratch.org/lfs/packages.html

Like ftp://ftp.lfs-matrix.net/pub/lfs/lfs-packages/lfs-packages-7.5.tar

Http://ftp.lfs-matrix.net/pub/lfs/lfs-packages/lfs-packages-7.5.tar

These are complete packages, find

Script

Http://archive.linuxfromscratch.org/lfs-museum/stable/lfs-bootscripts-20130821.tar.bz2

 

 

Ubuntu10.0.4 64-bit HOST check

The dependency content is as follows:

Bash, version 4.1.5 (1)-release

/Bin/sh->/bin/dash

Binutils: (GNU Binutils for Ubuntu) 2.20.1-system.20100303

Bison (GNU Bison) 2.4.1

/Usr/bin/yacc->/usr/bin/bison. yacc

Bzip2, Version 1.0.5, 10-Dec-2007.

Coreutils: 7.4

Diff (GNU diffutils) 2.8.1

Find (GNU findutils) 4.4.2

GNU Awk 3.1.6

/Usr/bin/awk->/usr/bin/gawk

Gcc (Ubuntu 4.4.3-4ubuntu5. 1) 4.4.3

G ++ (Ubuntu 4.4.3-4ubuntu5. 1) 4.4.3

(GNU libc) 2.19

GNU grep 2.5.4

Gzip 1.3.12

Linux version 2.6.32-38-generic (buildd @ allspice) (gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5) # 83-Ubuntu SMP Wed Jan 4 11:12:07 UTC 2012

M4 (GNU M4) 1.4.13

GNU Make 3.81

Patch 2.6

Perl version = '5. 10.1 ';

GNU sed version 4.2.1

Tar (GNU tar) 1.22

Xz (XZ Utils) 4.999.9beta

 

Install the gmp mpfr mpc Library

The specific script is as follows:

#! /Bin/bash

Tar xf pkg/gawk-4.1.0.tar.xz

Pushd gawk-4.1.0

./Configure

Make

Sudo make install

Gawk -- version

Popd

 

Tar xf pkg/xz-5.0.5.tar.xz

Pushd xz-5.0.5

./Configure

Make

Sudo make install

Xz -- version

Popd

 

# Ldconfig is performed in xz, and the second independent execution is performed.

Ldconfig

Tar xf pkg/gmp-5.1.3.tar.xz

Pushd gmp-5.1.3

./Configure -- prefix =/usr

Make

Make check

Sudo make install

Popd

 

Ldconfig

Tar xf pkg/mpfr-3.1.2.tar.xz

Pushd mpfr-3.1.2

./Configure -- prefix =/usr

Make

Make check

Sudo make install

Popd

 

Ldconfig

Tar xf pkg/mpc-1.0.2.tar.gz

Pushd mpc-1.0.2

./Configure -- prefix =/usr

Make

Make check

Sudo make install

Popd

 

Ldconfig

 

New Disk

Fdsik/dev/sdb

Create several shards n in sequence

Partition type t 82 -- Linux Swap 83 -- LINUX

 

Mkfs-v-t ext4/dev/sdb1

Mkswap/dev/sdb2

Http://blog.csdn.net/mirage1993/article/category/2450253

Http://blog.csdn.net/mirage1993/article/details/38356559 creates new partitions and mounts
Http://blog.csdn.net/mirage1993/article/details/38364823

References
  • Linux documents and some basic books http://www.tldp.org
  • Linux references

LSB/FHS http://www.linuxfoundation.org/

POSIX


What should I do with LFS linux?

Go to linuxsir and check that lfs is too difficult to configure...

How to build your own Linux release

Style books, in-depth study of scheduling, memory management, multi-process and thread, file system, and interaction between users and the kernel. Writers who write Linux books have an advantage over UNIX writers: despite the drastic changes in the group, the Linux kernel cannot be divided into several competing branches due to the GNU Public License (GPL) centralized research laboratories Open Source Development Lab (OSDL) and Linus Torvalds are unshakable, making Linux lucky enough to become a slow moving target ). The UNIX kernel is very important. Apart from some similarities, different Unix kernels are not quite the same. A variety of UNIX styles also have a lack of advantages in Linux: All UNIX styles are assumed to be completely operating systems. Linux is often described as "just a kernel" (if such a definition is used, it is also an arbitrary definition), which provides the core of Public Functions and implementations, whether the kernel is running in a less powerful Pentium? These public functions and implementations will not change in essence on the II server or on the initric Multiprocessing (SMP) system. To simplify the process, it may be said that the farther away from the Linux kernel, more changes will be discovered, while the UNIX system tends to be a discrete implementation of various UNIX/POSIX standards. It's not that easy. Detecting the Linux kernel and system-level code may be time-consuming and will be restricted in the real world. The LFS project aims to solve limited system-level comprehensibility issues on Linux. We have discussed the fact that the kernel requires a large number of libraries and tools to run the most basic tasks on the Linux system, however, if a skilled user has a slim-line Linux release, what should he do if he doesn't want to download a few gib bytes so that he won't let him optimize the system or leave him away with the binary code of all these troublesome and unnecessary tools? If a very skilled user refuses to accept the harsh conditions (diktat) of various community releases and wants to run a Linux/Apache/MySQL/PHP (LAMP) from CD) what should I do if it is an application stack of the type? LFS can solve these problems. The Linux From ScratchLFS project is clearly based on source files that are sufficient and unnecessary for basic Linux systems. It has gone beyond the Linux kernel and device drivers, because it needs to generate a workable Linux system, you must add a complete compiler tool chain, many Linux assembler utilities, glibc system libraries, system configuration tools, and tools connected to userland shell access. LFS is built on the assumption that Linux or UNIX allows users with some scripting knowledge to understand how a completely useful system works, instead of studying the kernel code itself. To understand how the Linux system works, the LFS creators determine that compiling the system by following module dependencies may be the most natural way to understand general operating systems and specific Linux mechanisms. After you have mastered the compilation process, you can start to eliminate the components that are connected to the system components that are irrelevant to the basic purpose of supporting the operating system. For example, it is feasible to eliminate the compiler tool chain after compilation. If you do not have a full set of command line utilities, you can use the embedded LAMP stack together. The Configuration Utility can also be discarded. Most users can use a file system that is not supported by too many Linux instances. An important part of the Linux LFS system is a large number of source files that can be obtained as tar balls. Document is another important part and the most important. In fact, it is very likely to take advantage of a... the remaining full text>

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.