mirror of
https://git.linuxfromscratch.org/lfs.git
synced 2025-06-18 19:29:21 +01:00
You
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@334 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
This commit is contained in:
parent
ab8b3526fa
commit
72033583eb
@ -9,15 +9,16 @@ option causes Bash to be linked statically
|
|||||||
<para>
|
<para>
|
||||||
<userinput>--prefix=$LFS/usr:</userinput> This configure option installs
|
<userinput>--prefix=$LFS/usr:</userinput> This configure option installs
|
||||||
all of Bash's files under the $LFS/usr directory, which becomes the /usr
|
all of Bash's files under the $LFS/usr directory, which becomes the /usr
|
||||||
directory after you chroot into $LFS or when you reboot the system into LFS.
|
directory after the user chrooted into $LFS or when he rebooted
|
||||||
|
the system into LFS.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
<userinput>--bindir=$LFS/bin:</userinput> This installs the executable
|
<userinput>--bindir=$LFS/bin:</userinput> This installs the executable
|
||||||
files in $LFS/bin. We do this because we want bash to be in /bin, not in
|
files in $LFS/bin. We do this because we want bash to be in /bin, not in
|
||||||
/usr/bin. One reason being: your /usr partition might be on a seperate
|
/usr/bin. One reason being: the /usr partition might be on a seperate
|
||||||
partition which has to be mounted at some point. Before that partition is
|
partition which has to be mounted at some point. Before that partition is
|
||||||
mounted you need and will want to have bash available (it will be hard to
|
mounted a user needs and will want to have bash available (it will be hard to
|
||||||
execute the boot scripts without a shell for instance).
|
execute the boot scripts without a shell for instance).
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@ -44,8 +45,9 @@ possible) as the original Bourne shell.
|
|||||||
<para>
|
<para>
|
||||||
The <userinput>&&</userinput>'s at the end of every line cause
|
The <userinput>&&</userinput>'s at the end of every line cause
|
||||||
the next command only to be executed when the previous command exists
|
the next command only to be executed when the previous command exists
|
||||||
with a return value of 0 indicating success. In case you copy&paste
|
with a return value of 0 indicating success. In case all of these
|
||||||
all of these commands on the shell you want to be ensured that if
|
commands are copy&pasted
|
||||||
|
on the shell is is important to be ensured that if
|
||||||
./configure fails, make isn't being executed and likewise if make fails
|
./configure fails, make isn't being executed and likewise if make fails
|
||||||
that make install isn't being executed, and so forth.
|
that make install isn't being executed, and so forth.
|
||||||
</para>
|
</para>
|
||||||
|
@ -18,8 +18,8 @@ Install Bash by running the following commands:
|
|||||||
</literallayout></blockquote>
|
</literallayout></blockquote>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
If you get errors when compiling bash that tell you about not being able to
|
If a user gets errors when compiling bash that tell about not being able to
|
||||||
find <quote>-lcurses</quote> run these two commands to create the
|
find <quote>-lcurses</quote> these two commands should be run to create the
|
||||||
missing symlink (so far we have not enountered one distribution that has
|
missing symlink (so far we have not enountered one distribution that has
|
||||||
this libncurses symlink setup properly, except for LFS systems where it
|
this libncurses symlink setup properly, except for LFS systems where it
|
||||||
is setup properly):
|
is setup properly):
|
||||||
@ -34,8 +34,9 @@ is setup properly):
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
Note: Normally the libncurses.a file resides in the /usr/lib directory
|
Note: Normally the libncurses.a file resides in the /usr/lib directory
|
||||||
but it might reside in /lib (like it does on LFS systems). So check to
|
but it might reside in /lib (like it does on LFS systems). A user needs
|
||||||
make sure whether you should run the ln command in /usr/lib or in /lib
|
to check to
|
||||||
|
make sure whether the ln command has to be run in /usr/lib or in /lib.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
</sect2>
|
</sect2>
|
||||||
|
@ -18,9 +18,9 @@ to the value -all-static causes binutils to be linked statically.
|
|||||||
directory where the executables from binutils end up in) is set to
|
directory where the executables from binutils end up in) is set to
|
||||||
$(exec_prefix)/$(target_alias) which expands into, for example,
|
$(exec_prefix)/$(target_alias) which expands into, for example,
|
||||||
/usr/i686-pc-linux-gnu. Since we only build for our own system we don't
|
/usr/i686-pc-linux-gnu. Since we only build for our own system we don't
|
||||||
need this target specific directory in $LFS/usr. You would use that
|
need this target specific directory in $LFS/usr. That setup would be used
|
||||||
setup if you use your system to cross-compile (for example you would
|
if the system is used to cross-compile (for example
|
||||||
compile a package on your Intel machine that generates code that can be
|
compiling a package on the Intel machine that generates code that can be
|
||||||
executed on Apple PowerPC machines).
|
executed on Apple PowerPC machines).
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ will be easier to link bzip2 statically.
|
|||||||
<userinput>...Makefile | make -f -:</userinput> Makefile
|
<userinput>...Makefile | make -f -:</userinput> Makefile
|
||||||
is the last parameter of the sed command which indicates the file to
|
is the last parameter of the sed command which indicates the file to
|
||||||
search and replace in. sed normally sends the modified file to stdout
|
search and replace in. sed normally sends the modified file to stdout
|
||||||
(standard output) which will be your console. With the construction we
|
(standard output) which will be the console. With the construction we
|
||||||
use, sed's output will be piped to the make program. Normally when make
|
use, sed's output will be piped to the make program. Normally when make
|
||||||
is started it tries to find a number of files like Makefile. But we have
|
is started it tries to find a number of files like Makefile. But we have
|
||||||
modified the Makefile file so we don't want make to use it. The "-f -"
|
modified the Makefile file so we don't want make to use it. The "-f -"
|
||||||
@ -24,8 +24,8 @@ and tell make with the -f parameter to read that alternate file.
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
<userinput>LDFLAGS=-static:</userinput> This is the second way we use to
|
<userinput>LDFLAGS=-static:</userinput> This is the second way we use to
|
||||||
link a package statically. This is also the most common way. As you'll
|
link a package statically. This is also the most common way.
|
||||||
notice, the -all-static value is only used with the binutils package and
|
The -all-static value is only used with the binutils package and
|
||||||
won't be used throughout the rest of this book.
|
won't be used throughout the rest of this book.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
<para>
|
<para>
|
||||||
<userinput>--enable-languages=c,c++:</userinput> This only builds the C
|
<userinput>--enable-languages=c,c++:</userinput> This only builds the C
|
||||||
and C++ compilers and not the other available compilers as they are, on
|
and C++ compilers and not the other available compilers as they are, on
|
||||||
the average, not often used. If you do need those other compilers don't
|
the average, not often used. If those other compilers are needed
|
||||||
use the --enable-languages parameter.
|
the --enable-languages parameter can be omitted..
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
|
@ -2,8 +2,9 @@
|
|||||||
<title>Installation of GCC</title>
|
<title>Installation of GCC</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
After you unpacked the gcc-2.95.2.1 archive don't enter the newly created
|
After the gcc-2.95.2.1 archive was unpacked, the newly created
|
||||||
gcc-2.95.2.1 directory but stay in the $LFS/usr/src directory. Install GCC by
|
gcc-2.95.2.1 directory is not entered. The user should stay in the
|
||||||
|
$LFS/usr/src directory. GCC is installed by
|
||||||
running the following commands:
|
running the following commands:
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<title>Installation of Gzip</title>
|
<title>Installation of Gzip</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Before you install Gzip you have to unpack the gzip patch file.
|
Before Gzip is installed the the gzip patch file needs to be unpacked.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<blockquote><literallayout>
|
<blockquote><literallayout>
|
||||||
|
@ -2,21 +2,21 @@
|
|||||||
<title>Install all software as user root</title>
|
<title>Install all software as user root</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
It's best if you login as root or su to root when installing these
|
It's best if the user logins as root or su's to root when installing these
|
||||||
files. That way you are assured that all files are owned by user root,
|
files. That way he is assured that all files are owned by user root,
|
||||||
group root (and not owned by the userid of your non-root user) and if a
|
group root (and not owned by the userid of the non-root user) and if a
|
||||||
package wants to set special permissions it can do so without problems
|
package wants to set special permissions it can do so without problems
|
||||||
due to non-root access.
|
due to non-root access.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
If you read the documentation that comes with Glibc, Gcc and other
|
The documentation that comes with Glibc, Gcc and other
|
||||||
packages they recommend not to compile the packages as user root. We
|
packages recommend not to compile the packages as user root. We
|
||||||
feel it's safe to ignore that recommendation and compile as user root
|
feel it's safe to ignore that recommendation and compile as user root
|
||||||
anyways. Hundreds of people using LFS have done so without any problems
|
anyways. Hundreds of people using LFS have done so without any problems
|
||||||
whatsoever and we haven't encountered any bugs in the compile processes
|
whatsoever and we haven't encountered any bugs in the compile processes
|
||||||
that cause harm. So it's pretty safe (never can be 100% safe though, so
|
that cause harm. So it's pretty safe (never can be 100% safe though, so
|
||||||
it's up to you what you end up doing).
|
it's up to the user what he ends up doing).
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
</sect1>
|
</sect1>
|
||||||
|
@ -3,17 +3,17 @@
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
In the following chapters we will install all the software that belongs to
|
In the following chapters we will install all the software that belongs to
|
||||||
a basic Linux system. After you're done with this chapter you have a
|
a basic Linux system. After a user is done with this chapter he has a
|
||||||
fully working Linux system. The remaining chapters deal with setting up
|
fully working Linux system. The remaining chapters deal with setting up
|
||||||
networking, creating the boot scripts and adding an entry to lilo.conf so
|
networking, creating the boot scripts and adding an entry to lilo.conf so
|
||||||
that you can boot your LFS system.
|
that the LFS system can be booted.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
The software in this chapter will be linked statically. These programs
|
The software in this chapter will be linked statically. These programs
|
||||||
will be re-installed in the next chapter and linked dynamically. The
|
will be re-installed in the next chapter and linked dynamically. The
|
||||||
reason for the static version first is that there is a chance that our
|
reason for the static version first is that there is a chance that our
|
||||||
normal Linux system and your LFS system aren't using the same C
|
normal Linux system and the LFS system aren't using the same C
|
||||||
Library versions. If the programs in the first part are linked against
|
Library versions. If the programs in the first part are linked against
|
||||||
an older C library version, those programs might not work well on the
|
an older C library version, those programs might not work well on the
|
||||||
LFS system.
|
LFS system.
|
||||||
@ -21,7 +21,7 @@ LFS system.
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
The key to learn what makes Linux tick is to know exactly what packages
|
The key to learn what makes Linux tick is to know exactly what packages
|
||||||
are used for and why you or the system needs them. Descriptions
|
are used for and why a user or the system needs them. Descriptions
|
||||||
of the package content are provided after the Installation subsection of each
|
of the package content are provided after the Installation subsection of each
|
||||||
package and in Appendix A as well.
|
package and in Appendix A as well.
|
||||||
</para>
|
</para>
|
||||||
@ -32,8 +32,8 @@ packages will be, as previously explained, linked statically.
|
|||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
During the installation of various packages you will most likely see
|
During the installation of various packages the user will most likely see
|
||||||
compiler warnings scrolling by on your screen. These are normal and can
|
compiler warnings scrolling by on the screen. These are normal and can
|
||||||
be safely ignored. They are just that, warnings (mostly about improper
|
be safely ignored. They are just that, warnings (mostly about improper
|
||||||
use of the C or C++ syntax, but not illegal use. It's just that often C
|
use of the C or C++ syntax, but not illegal use. It's just that often C
|
||||||
standards changed and packages still use the old standard which is not a
|
standards changed and packages still use the old standard which is not a
|
||||||
@ -41,8 +41,9 @@ problem).
|
|||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Before we start, make sure you have the LFS environment variable setup
|
Before we start, it should be made sure the LFS environment variable was
|
||||||
if you plan on using it, by running the following command:
|
setup
|
||||||
|
if it was planned to be used, by running the following command:
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<blockquote><literallayout>
|
<blockquote><literallayout>
|
||||||
|
@ -2,10 +2,10 @@
|
|||||||
<title>Part I - Introduction</title>
|
<title>Part I - Introduction</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Part One gives you general information about this book (versions, where
|
Part One gives general information about this book (versions, where
|
||||||
to get it, changelog, mailing lists, and how to get in touch with me).
|
to get it, changelog, mailing lists, and how to get in touch with me).
|
||||||
It also explains a few important aspects you really want and need to
|
It also explains a few important aspects a user really wants and needs to
|
||||||
read before you start building an LFS system.
|
read before starting to build an LFS system.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
</sect2>
|
</sect2>
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
<title>Part II - Installation of the LFS system</title>
|
<title>Part II - Installation of the LFS system</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Part Two guides you through the installation of the LFS system which will
|
Part Two guides through the installation of the LFS system which will
|
||||||
be the foundation for the rest of the system. Whatever you
|
be the foundation for the rest of the system. Whatever a user
|
||||||
choose to do with your brand new LFS system, it will be built on the
|
chooses to do with his brand new LFS system, it will be built on the
|
||||||
foundation that's installed in this part.
|
foundation that's installed in this part.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
@ -3,9 +3,9 @@
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
Users who don't want to build an entire Linux system from scratch
|
Users who don't want to build an entire Linux system from scratch
|
||||||
probably don't want to read this book. If you, however, do want to learn
|
probably don't want to read this book. If a user, however, wants to learn
|
||||||
more about what happens behind the scenes, in particular what happens
|
more about what happens behind the scenes, in particular what happens
|
||||||
between turning on your computer and seeing the command prompt, you want
|
between turning on the computer and seeing the command prompt, he wants
|
||||||
to read the <quote>From Power Up To Bash Prompt</quote> (P2B) HOWTO.
|
to read the <quote>From Power Up To Bash Prompt</quote> (P2B) HOWTO.
|
||||||
This HOWTO builds a bare system, in way similar to the one this book
|
This HOWTO builds a bare system, in way similar to the one this book
|
||||||
uses, but it focusses more on just installing a bootable system instead
|
uses, but it focusses more on just installing a bootable system instead
|
||||||
@ -13,12 +13,12 @@ of a complete system.
|
|||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
To decide whether you want to read this book or the P2B HOWTO, you could
|
To decide whether to read this book or the P2B HOWTO, a user could
|
||||||
ask yourself this question: "Is my main objective to get a working Linux
|
ask himself this question: "Is my main objective to get a working Linux
|
||||||
system that I'm going to build myself and, along the way, learn what
|
system that I'm going to build myself and, along the way, learn what
|
||||||
every component of a system is for, or is just the learning part my main
|
every component of a system is for, or is just the learning part my main
|
||||||
objective?" If you want to build and learn, read this book. If you just
|
objective?" If he wants to build and learn, he reads this book. If he just
|
||||||
want to learn, then the P2B HOWTO is probably better material to read.
|
wants to learn, then the P2B HOWTO is probably better material to read.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
|
@ -4,22 +4,22 @@
|
|||||||
<para>
|
<para>
|
||||||
This book is intended for Linux users who want to setup their own
|
This book is intended for Linux users who want to setup their own
|
||||||
custom-built Linux system. Reasons for wanting to build such a system are
|
custom-built Linux system. Reasons for wanting to build such a system are
|
||||||
diverse. Perhaps you want to get into more detail as to what
|
diverse. Perhaps a user wants to get into more detail as to what
|
||||||
happens behind the scenes. Perhaps you are fed up with distributions
|
happens behind the scenes. Perhaps he is fed up with distributions
|
||||||
which are often bloated or perhaps you don't want to rely on pre-compiled
|
which are often bloated or perhaps he doesn't want to rely on pre-compiled
|
||||||
binaries due to security concerns. There are many reasons why you may want
|
binaries due to security concerns. There are many reasons why a user may wants
|
||||||
a custom-built system, but if you are one of them, this book is meant
|
a custom-built system, but if it is one of them, this book is meant
|
||||||
for you.
|
for him.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
The fruits of building your own system are plentiful, but the labour may
|
The fruits of building an own system are plentiful, but the labour may
|
||||||
be hard. You have a long way ahead of you but in the end you will be
|
be hard. It is a long way ahead but in the end a user will be
|
||||||
able to call yourself the proud owner of your own Linux system,
|
able to call himself the proud owner of his own Linux system,
|
||||||
completely tailored after your needs. You dictate the layout of
|
completely tailored after his needs. He dictates the layout of
|
||||||
bootscripts, the file system hierarchy, which programs are installed in
|
bootscripts, the file system hierarchy, which programs are installed in
|
||||||
which directory, which versions of software to use, and more. Perhaps the
|
which directory, which versions of software to use, and more. Perhaps the
|
||||||
most important reason is that you know exactly what is installed where,
|
most important reason is to know exactly what is installed where,
|
||||||
why, and how.
|
why, and how.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user