The first task performed in the LFS partition is to create a limited directory hierarchy so that programs compiled in Chapter 6 (as well as glibc and libstdc++ in Chapter 5) may be installed in their final location. This is needed so that those temporary programs be overwritten when rebuilding them in Chapter 8.
Create the required directory layout by running the following as
root
:
mkdir -pv $LFS/{bin,etc,lib,sbin,usr,var} case $(uname -m) in x86_64) mkdir -pv $LFS/lib64 ;; esac
Programs in Chapter 6 will be compiled with a cross-compiler (more details in section Toolchain Technical Notes). In order to separate this cross-compiler from the other programs, it will be installed in a special directory. Create this directory with:
mkdir -pv $LFS/tools