mirror of
https://git.linuxfromscratch.org/lfs.git
synced 2025-06-19 03:39:20 +01:00
Add an introduction to chapter 6 and 7
git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/cross2@11910 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
This commit is contained in:
parent
a89ab79538
commit
ce335792fe
@ -11,6 +11,7 @@
|
|||||||
|
|
||||||
<title>Cross Compiling Temporary Tools</title>
|
<title>Cross Compiling Temporary Tools</title>
|
||||||
|
|
||||||
|
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="introduction.xml"/>
|
||||||
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="m4.xml"/>
|
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="m4.xml"/>
|
||||||
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="ncurses.xml"/>
|
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="ncurses.xml"/>
|
||||||
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="bash.xml"/>
|
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="bash.xml"/>
|
||||||
|
@ -5,25 +5,26 @@
|
|||||||
%general-entities;
|
%general-entities;
|
||||||
]>
|
]>
|
||||||
|
|
||||||
<sect1 id="ch-tools-introduction">
|
<sect1 id="ch-tools-introduction-cross">
|
||||||
<?dbhtml filename="introduction.html"?>
|
<?dbhtml filename="introduction.html"?>
|
||||||
|
|
||||||
<title>Introduction</title>
|
<title>Introduction</title>
|
||||||
|
|
||||||
<para>This chapter shows how to build a minimal Linux system.
|
<para>This chapter shows how to cross-compile basic utilities using
|
||||||
This system will contain just enough tools to start constructing the final
|
the just built cross-toolchain. Those utilities are installed into
|
||||||
LFS system in <xref linkend="chapter-building-system"/> and allow a working
|
their final location, but cannot be used yet. Basic tasks still rely on
|
||||||
environment with more user convenience than a minimum environment would.</para>
|
the hosts tools. Nevertheless, the installed libraries are used when
|
||||||
|
linking.</para>
|
||||||
|
|
||||||
|
<para>Using the utilities will be possible in next chapter after entering
|
||||||
|
the <quote>chroot</quote> environment. But all the packages built in the
|
||||||
|
present chapter need themselves to be built. So we cannot be independent
|
||||||
|
on the build system yet.</para>
|
||||||
|
|
||||||
|
<para>Once again, let us recall that improper setting of <envar>LFS</envar>
|
||||||
|
together with building as root, may render your computer unusable.
|
||||||
|
This whole chapter must be done as user <systemitem
|
||||||
|
class="username">lfs</systemitem>, with the enviroment as described in
|
||||||
|
<xref linkend="ch-preps-settingenviron"/>.</para>
|
||||||
|
|
||||||
<para>There are two steps in building this minimal system. The first step
|
|
||||||
is to build a new and host-independent toolchain (compiler, assembler,
|
|
||||||
linker, libraries, and a few useful utilities). The second step uses this
|
|
||||||
toolchain to build the other essential tools.</para>
|
|
||||||
<!--
|
|
||||||
<para>The files compiled in this chapter will be installed under the
|
|
||||||
<filename class="directory">$LFS</filename> directory to keep them
|
|
||||||
separate from the files installed in the next chapter and the host
|
|
||||||
production directories. Since the packages compiled here are temporary,
|
|
||||||
we do not want them to pollute the soon-to-be LFS system.</para>
|
|
||||||
-->
|
|
||||||
</sect1>
|
</sect1>
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
|
|
||||||
<title>Entering Chroot and Building Additional Tools</title>
|
<title>Entering Chroot and Building Additional Tools</title>
|
||||||
|
|
||||||
|
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="introduction.xml"/>
|
||||||
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="changingowner.xml"/>
|
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="changingowner.xml"/>
|
||||||
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="kernfs.xml"/>
|
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="kernfs.xml"/>
|
||||||
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="chroot.xml"/>
|
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="chroot.xml"/>
|
||||||
|
@ -5,25 +5,33 @@
|
|||||||
%general-entities;
|
%general-entities;
|
||||||
]>
|
]>
|
||||||
|
|
||||||
<sect1 id="ch-tools-introduction">
|
<sect1 id="ch-tools-introduction-chroot">
|
||||||
<?dbhtml filename="introduction.html"?>
|
<?dbhtml filename="introduction.html"?>
|
||||||
|
|
||||||
<title>Introduction</title>
|
<title>Introduction</title>
|
||||||
|
|
||||||
<para>This chapter shows how to build a minimal Linux system.
|
<para>This chapter shows how to build the last missing bits of the
|
||||||
This system will contain just enough tools to start constructing the final
|
temporary system: first, the tools needed by the build machinery of
|
||||||
LFS system in <xref linkend="chapter-building-system"/> and allow a working
|
various packages, then three packages needed to run tests.
|
||||||
environment with more user convenience than a minimum environment would.</para>
|
Now that all circular dependencies have been resolved,
|
||||||
|
we can use a <quote>chroot</quote> environment, completely isolated
|
||||||
|
from the computer used for the build, except for the running kernel.</para>
|
||||||
|
|
||||||
|
<para>For proper operation of the isolated environment, some communication
|
||||||
|
with the running kernel must be established. This is done through the
|
||||||
|
so-called <emphasis>Virtual Kernel File Systems</emphasis>, which must be
|
||||||
|
mounted when entering the chroot environment. You may want to check
|
||||||
|
that they are mounted by issuing <command>ls $LFS/dev</command>,
|
||||||
|
<command>ls $LFS/proc</command>, or <command>ls $LFS/sys</command>.
|
||||||
|
Note that mounting the virtual kernel file systems must be done
|
||||||
|
<emphasis>each time you want to enter the chroot
|
||||||
|
environment</emphasis>.</para>
|
||||||
|
|
||||||
|
<para>Until <xref linkend="ch-tools-chroot"/>, the commands must be
|
||||||
|
run as <systemitem class="username">root</systemitem>, with the
|
||||||
|
<envar>LFS</envar> variable set. After entering chroot, all commands
|
||||||
|
are run as root, fortunately without access to the OS of the computer
|
||||||
|
you build LFS on. Be careful anyway, as it is easy to destroy the whole
|
||||||
|
LFS system with badly formed commands.</para>
|
||||||
|
|
||||||
<para>There are two steps in building this minimal system. The first step
|
|
||||||
is to build a new and host-independent toolchain (compiler, assembler,
|
|
||||||
linker, libraries, and a few useful utilities). The second step uses this
|
|
||||||
toolchain to build the other essential tools.</para>
|
|
||||||
<!--
|
|
||||||
<para>The files compiled in this chapter will be installed under the
|
|
||||||
<filename class="directory">$LFS</filename> directory to keep them
|
|
||||||
separate from the files installed in the next chapter and the host
|
|
||||||
production directories. Since the packages compiled here are temporary,
|
|
||||||
we do not want them to pollute the soon-to-be LFS system.</para>
|
|
||||||
-->
|
|
||||||
</sect1>
|
</sect1>
|
||||||
|
Loading…
Reference in New Issue
Block a user