2. Preparing the Host System
在本章中,构建LFS所需要的宿主工具被检查,如果是必需的,则安装。然后LFS系统的宿主分区将被准备。我们将建立分区本身,在其上建立文件系统,并挂载。
你的宿主系统应该有以下指明最低版本的软件。对于绝大多数现代Linux发行版来说,这应该不是一个问题。也要注意很多发行版将软件头放置到独立的包中,通常以 “
列出的软件包的更早版本可能工作,但并没有经过测试。
Bash-3.2 (/bin/sh should be a symbolic or hard link to bash)
Binutils-2.13.1 (Versions greater than 2.39 are not recommended as they have not been tested)
Bison-2.7 (/usr/bin/yacc should be a link to bison or small script that executes bison)
Coreutils-6.9
Diffutils-2.8.1
Findutils-4.2.31
Gawk-4.0.1 (/usr/bin/awk should be a link to gawk)
GCC-4.8 including the C++ compiler, g++ (Versions greater than 12.2.0 are not recommended as they have not been tested). C and C++ standard libraries (with headers) must also be present so the C++ compiler can build hosted programs
Grep-2.5.1a
Gzip-1.3.12
Linux Kernel-3.2
内核版本有需求的原因是,当在第5章和第8章中编译glic时我们指定那个版本,这个版本是开发者们所推荐的。它也被udev所需要。
如果宿主内核版本早于3.2,你将需要将内核替换为一个更接近于最新版本的内核。有两个方法。第一,查看你的Linux供应商是否提供3.2或者更新的内核包。如果提供了,则可以安装它。如果你的供应商没有提供一个可接受的内核包,或者你不想安装它,则你可以自己编译一个内核。编译内核和配置bootloader(假设宿主使用GRUB)的指令位于第10章。
M4-1.4.10
Make-4.0
Patch-2.5.4
Perl-5.8.8
Python-3.4
Sed-4.1.5
Tar-1.22
Texinfo-4.7
Xz-5.0.0
注意:Note that the symlinks mentioned above are required to build an LFS system using the instructions contained within this book. Symlinks that point to other software (such as dash, mawk, etc.) may work, but are not tested or supported by the LFS development team, and may require either deviation from the instructions or additional patches to some packages.