2001-01-24 00:31:17 +00:00
|
|
|
<sect2>
|
|
|
|
<title>Command explanations</title>
|
|
|
|
|
2001-07-22 20:45:10 +01:00
|
|
|
<para><userinput>mknod -m 0666 /dev/null c 1 3:</userinput> Glibc needs a
|
2001-04-03 00:15:27 +01:00
|
|
|
null device to compile properly. All other devices will be created in the
|
2001-07-22 20:45:10 +01:00
|
|
|
next section.</para>
|
2001-04-03 00:15:27 +01:00
|
|
|
|
2001-08-07 10:48:59 +01:00
|
|
|
<para><userinput>touch /etc/ld.so.conf</userinput> One of the final steps
|
|
|
|
of the Glibc installation is running ldconfig to update the dynamic loader
|
|
|
|
cache. If this file doesn't exist, the installation will abort with an error
|
|
|
|
that it can't read the file, so we simply create an empty file (the empty file
|
2001-08-29 20:29:31 +01:00
|
|
|
will have Glibc default to using /lib and /usr/lib which is fine).</para>
|
2001-02-09 18:18:11 +00:00
|
|
|
|
2001-08-24 21:45:42 +01:00
|
|
|
<para><userinput>sed 's%\$(PERL)%/usr/bin/perl%'
|
2001-08-25 02:04:51 +01:00
|
|
|
malloc/Makefile > tmp~:</userinput> This sed command
|
|
|
|
searches through <filename>malloc/Makefile</filename> and
|
2001-11-07 15:42:16 +00:00
|
|
|
converts all occurrences of <filename>$(PERL)</filename> to
|
2001-07-02 14:04:13 +01:00
|
|
|
<filename>/usr/bin/perl</filename>. The output is then written to the
|
|
|
|
file <filename>tmp~</filename>. This is done because Glibc can't
|
2001-09-08 05:46:27 +01:00
|
|
|
autodetect perl since it hasn't been installed yet.</para>
|
2001-07-02 14:04:13 +01:00
|
|
|
|
2001-08-29 14:19:58 +01:00
|
|
|
<para><userinput>mv tmp~ malloc/Makefile:</userinput> The file
|
2001-07-02 14:04:13 +01:00
|
|
|
<filename>tmp~</filename> is now moved back to
|
2001-08-25 02:04:51 +01:00
|
|
|
<filename>malloc/Makefile</filename>. We do this because
|
2001-07-02 14:04:13 +01:00
|
|
|
when using sed, we can't write straight back to this file so we need to
|
2001-07-22 20:45:10 +01:00
|
|
|
use a temporary file in between.</para>
|
2001-07-02 14:04:13 +01:00
|
|
|
|
2001-08-25 02:04:51 +01:00
|
|
|
<para><userinput>sed 's/root/0' login/Makefile >
|
2001-10-24 11:20:53 +01:00
|
|
|
tmp~:</userinput> This sed command replaces all occurences of
|
2001-07-02 14:04:13 +01:00
|
|
|
<filename>root</filename> in
|
2001-08-25 02:04:51 +01:00
|
|
|
<filename>login/Makefile</filename> with 0. This is
|
2001-07-02 14:04:13 +01:00
|
|
|
because as we don't have glibc on the LFS system yet, usernames can't
|
|
|
|
be resolved to their user id's. Therefore, we replace the username
|
2001-07-22 20:45:10 +01:00
|
|
|
root with the id 0. </para>
|
2001-07-02 14:04:13 +01:00
|
|
|
|
2001-08-29 20:29:31 +01:00
|
|
|
<para><userinput>mv tmp~ login/Makefile:</userinput> As above, we are using
|
|
|
|
a temporary file (<filename>tmp~</filename>) to store the
|
2001-07-22 20:45:10 +01:00
|
|
|
edited Makefile and then copying it back over the original.</para>
|
2001-07-02 14:04:13 +01:00
|
|
|
|
2001-07-22 20:45:10 +01:00
|
|
|
<para><userinput>--enable-add-ons:</userinput> This enables the add-on that
|
|
|
|
we install with Glibc: linuxthreads</para>
|
2001-01-24 00:31:17 +00:00
|
|
|
|
2001-08-31 01:21:59 +01:00
|
|
|
<para><userinput>--libexecdir=/usr/bin:</userinput> This will cause the
|
|
|
|
pt_chown program to be installed in the /usr/bin directory.</para>
|
|
|
|
|
2001-08-15 13:50:02 +01:00
|
|
|
<para><userinput>sed 's/cross-compiling = yes/cross-compiling = no/'
|
2001-07-02 14:04:13 +01:00
|
|
|
config.make > config.make~:</userinput> This time, we're replacing
|
|
|
|
<filename>cross-compiling = yes</filename> with
|
|
|
|
<filename>cross-compiling = no</filename>. We do this because we are
|
|
|
|
only building for our own system. Cross-compiling is used, for
|
|
|
|
instance, to build a package for an Apple Power PC on an Intel system.
|
|
|
|
The reason Glibc thinks we're cross-compiling is that it can't compile a
|
2001-08-03 04:06:55 +01:00
|
|
|
test program to determine this, so it automatically defaults to a
|
2001-07-02 14:04:13 +01:00
|
|
|
cross-compiler. The reason for the failed program is because Glibc
|
2001-07-22 20:45:10 +01:00
|
|
|
hasn't been installed yet.</para>
|
2001-07-02 14:04:13 +01:00
|
|
|
|
2001-08-29 14:19:58 +01:00
|
|
|
<para><userinput>mv config.make~ config.make:</userinput> Again, we are moving
|
2001-07-22 20:45:10 +01:00
|
|
|
the temporary file over the original.</para>
|
2001-07-02 14:04:13 +01:00
|
|
|
|
2001-08-25 17:56:29 +01:00
|
|
|
<para><userinput>exec /bin/bash:</userinput>This command will
|
|
|
|
start a new bash shell which will replace the current shell. This is
|
|
|
|
done to get rid of the "I have no name!" message in the command
|
|
|
|
prompt, which was caused by bash's inability to resolve a userid to
|
|
|
|
a username (which in turn was caused by the missing Glibc
|
|
|
|
installation).</para>
|
|
|
|
|
2001-01-24 00:31:17 +00:00
|
|
|
</sect2>
|
|
|
|
|