Creating the $LFS/stage1 directory
All programs compiled in this chapter will be installed under $LFS/stage1 to keep them separate from the
programs compiled in the next chapter. The programs compiled here are only
temporary tools and won't be a part of the final LFS system and by keeping them
in a separate directory, we can later easily throw them away. Create the
required directory by running the following:
mkdir $LFS/stage1
The next step is to create a /stage1 symlink on
your host system. It will point to the directory we just created on the LFS
partition:
ln -s $LFS/stage1 /
This symlink enables us to compile our toolchain so that it always
refers to /stage1, meaning that the compiler, assembler
and linker will work both in this chapter (when we are still rummaging around
on the host) and in the next (when we are chrooted to
the LFS partition).