---Before foreword:
A lot of years ago, had installed inchoate Slackware.
The installation three years two ago crosses RedHat9.
After basically been install namely, play little game into desktop system, delete next. The hard disk because of me all the time very small, 20G.
Of course a very main reason is the thing that I do not like these to issue the one pile in edition, too random, look not to understand what how organize.
Changed 40G hard disk a few days ago, differentiated then 8G installed Debian. The software that also is one pile looks after outfit became good, sundry. Wanting to prepare to delete.
Did not know to see LFS where, was attracted immediately, then the plan installs a LFS. And Debian as it happens serves as Host System.
My installation result is below, spent 5, two 6 all night. (Glibc, gcc, firefox, xorg is a lot of more time-consuming, in the installation on jotter. In the installation on jotter..
Write the experience that chooses oneself, basically be the understanding that arranges oneself to install a process to LFS, especially of Ld and Gcc compile for many times.
----Target:
To establish a clean LFS system.
----The big move of implementation:
1.As far as possible the influence that casts off Host System, found the Toolchain of a the basiccest autonomy above all.
The basiccest need in this Toolchain is: The Binary tool) with the basiccest Binutils(, gcc(is compiled implement) , glibc(function library)
Because the Tools of other can be founded by these three,came out.
2.When all basic Toolchain tools ready, OK Chroot.
3.The fictitious root after Chroot / below the environment, with Toolchain medium tool makes a final LFS system.
---One explains:
Why should found / Tools this Link
Initiative Toolchain tool is founded in / below Mnt/lfs/tools catalog.
At the same time to will come after Chroot, the Interpreter information in the tool still is pointed to correct, used a little skill.
In Host System / a Link that the name is Tools is founded below catalog, point to / Tools- -%26gt;/ Mnt/lfs/tools
This action makes an example for namely, when we are using Host System, we can be used / Tools/bin/ld finds Ld program,
In the future after Chroot, / Tools/bin/ld still can find this Ld.
Otherwise when we are using Host System, use / Mnt/lfs/tools/bin/ld will find Ld,
The program that creates in other words is included / such Mnt/lfs information, in the future after Chroot, but not quite good.
----The symbol explains:
(Go to the lavatory for style or manner of writing)
Bin-0-----%26gt;The Binutils of Host System
Ld-0-----%26gt;The Ld of Host System
Bin-1-----%26gt;The first compile the Binutils that go out
Ld-1-----%26gt;The Ld in Bin-1
Ld-a-----%26gt;The Ld after first time square
Bin-2-----%26gt;The second Binutils that compile
Ld-2-----%26gt;The Ld in Bin-2
Ld-b-----%26gt;The Ld after the second square
Bin-3-----%26gt;The third compile generated Binutils
Ld-3-----%26gt;The Ld in Bin-3
Gcc-0, gcc-1, gcc-2, gcc-3 expresses the Gcc in Host System respectively, with the Gcc of two Gcc in Toolchain and final LFS system.
----Measure analysis:
Good, how is letting us begin to see LFS from the beginning now generated.
Of ** Bin-1 and Gcc-1 compile:
The first pace, we are used a Bin-1 moment is compiled in Host System,
Those who use is the Binutils(ld) of Host System, gcc-0 and Glibc function library.
(The Program that A) generates gets without avoidable the influence of Host System, for example:
Use generated Ld-1 program will Link is acquiescent / the Libarary below Lib.
The second pace, we perhaps can compile Glibc with Host System directly, but the Gcc that we hope to use our more will compile Glibc,
So we compile a Gcc-1 first with Host System.
Notice: ?hat Qi ? Cc-1 uses is Bin-1/ld-1, gcc-0, glibc-0. Generated Gcc-1 still gets the influence of Host System.
Gcc-1 can be used / the Dynamic Linker (ld-linux.so.2) below Lib catalog, is not / Tools/lib/ld-linux.so.2.
Had Bin-1, gcc-1, we can use the Bintuils that the new student becomes and Gcc to compile Glibc immediately.
Want to notice. / the parameter of Configure, it expresses those who understand Glibc to compile a tool is those who use / the Ld below Tools/bin, gcc,
And not be the Ld in Host System, gcc. Although this option is not important.
** first time undertakes Toolchain square
Compile when Glibc-1 finish, it is moment is revised (the problem that mentions in A) .
This the target of square should let be in namely the following in compiling a process, requirement Ld and Gcc are used only / the function library below Tools/lib, just compile good Glibc namely.
Adjustment method is:
1.) to Ld,
Make -C Ld Clean (first clear empty Ld)
Make -C Ld LIB_PATH=/tools/lib (compiles Ld afresh, what Link /tools/lib falls want to teach by correspondence after telling Ld library)
(This two paces write this one in Binutils-2.15.94.0.2.2 - Pass 1,
I think bad, should put in square of first time Toolchain, more coherent. More coherent..
New Install of Make -C Ld Install (arrives / Tools/bin)
This generated Ld-a (to ask an attention, ld program is in actually whole in establishing LFS procedure, compiled 5 times! ! ! !!
2.) to Gcc,
Modification purpose: ?i ? Cc should be used / the Dynamic Linker below Tools/lib.
The SPEC file of modification Gcc, revise the place that defines Dynamic Linker into / Tools/lib/ld-linux.so.2
(The proposal changes with him Vi, more be sure, I copy Sed command to seemed to make mistake for the first time, did not try) again.
After finishing, want to do a test without fail, the program that come out is compiled to use correct function warehouse after assuring certainly (/ the Glibc of Tools/lib)
This Gcc can say for Gcc-a
(We are the first here compile Binutils and Gcc. In whole system in establishing a procedure, bintuils and Gcc are to should be compiled three times,
The basic Toolchain tool of other is to be compiled twice, additional LFS system software needs only. Additional LFS system software needs only..
A problem, why should compile Bintuils and Gcc twice when preparing Toolchain?
Because be in to generate Toolchain in the process of medium Gcc, we hope generated Gcc is Self Compile, namely oneself can be compiled give oneself to come.
The first Binutils and Gcc are to compile give Glibc and can oneself compile the Gcc(Self Compile) that goes out the second times.
Although can compile the Gcc in giving Toolchain and Bintuils by Host System directly actually, but in that way Toolchain is not Self Compile.
So Gcc and Binutils were compiled more than other and main tool. (Notice again: LD was compiled 5 times in all! In two square each still are compiled)
Of ** Bin-2 and Gcc-2 compile:
Arrive after here, there was Ld-a in our hand, gcc-a, by the truth we should can compile Bintuils and Gcc a future life to become Bin-2 and Gcc-2 afresh immediately.
But will come to do the test of Gcc-2, compiled the software package that three tests need first: Tcl, expect, dejaGNU. These three bags are theoretic need not want.
Okay, begin to compile Gcc-2 now
Compile with what arrive implement, linker and function library are Gcc-a respectively, ld-a, glibc-1, can see the effect that has done not have Host System.
Compile Bin-2 next,
Those who use is Gcc-2 respectively, ld-a, glibc-1, the effect that also suffers Host System no longer.
After Make Install Bin-2, ld-a is Ld-2 newlier also,
** other is basic of the tool compile:
Later the other tool in Toolchain is OK very easy founded.
Those who use is (Ld-2, gcc-2, glibc-1)
The Glibc-2 after ** Chroot:
When / after these tool on deck below Tools catalog, we can begin Chroot to be in next be based on a root / in divisional environment,
Use these tools to make final systematic software.
Without doubt, we want most the systematic software that makes first is Bintuils and Gcc.
But before founding them, the bag Glibc-2 that still has a key needs to compile come out.
Glibc-2 is compiled be being used is: BIn-2/ld-2, gcc-2, glibc-1.
** the second square:
After having Glibc-2, we will begin the second times, also be square of the last Toolchain.
With first time square similar, the most crucial is to want square Ld and Gcc.
Ld-2 square becomes Ld-b:
Make -C Ld Clean
After Make -C Ld LIB_PATH=/usr/lib:/lib (tells Ld, from this two catalogs look for Lib)
Make -C Ld INSTALL=/tools/bin/install Install
Gcc-2 square becomes Gcc-b:
's@ /tools/lib/ld-linux.so.2@ /lib/ld-linux.so.2@g; of file of modification Gcc Spec
As it happens and first time square are contrary.
** Bin-3 and Gc-3 compile:
Had the Ld-b after square, gcc-b, compiled with respect to what can begin final system.
It is Bin-3 above all. (Those who use is: Ld-b, gcc-b and Glibc-2)
It is Gcc-3 next. (Those who use is: Ld-3, gcc-b and Glibc-2)
The other place of ** system wants software:
Again from the back the systematic software of other will by Bin-2, gcc-3, glibc-2 is generated came out.
Go to here, configure good system Scripts and Kernel, and Grub.
Reboot!
! ! ! The welcome enters LFS! ! !
----Adscript BLFS:
Very happy, referenced LFS Book (v6.1.1) has installed LFS system smoothly.
LFS most the place of cruel, also be most the place that attracts me lets me know every software has the system namely those functions and what file.
OK and own alternative needs the software of installation.
After installing good LFS, the Host System that deleted immediately- -%26gt;Debian. : -) , vacate system of X of dimensional facilitating installation.
- Gmp, facilitating copy is stickup.
- Lynx, download software is wrapped and can browse BLFS Book at the same time at the same time.
- Wget, some circumstances it is much faster than Lynx download.
Chose Xorg.
(Very strange it arrives without installation / below Usr/X11R6, go up with the book abhorrent, but use seem to do not have a problem, without thorough examination. Without thorough examination..
Xorg took Tvm oneself, but honest too ugly.
Read BLFS, balance hind chose Xfce. I feel Xfce already very beautiful, and capable and vigorous.
Three software that install finally are respectively:
Gdb, gvim, firefox.
Textual link:Http://www.linuxsir.org/bbs/showthread.php? T=240687
...