(题图来自: techradar.com)
工具编译进入了最后的阶段
依旧是进入$LFS/src,解压并进入patch源码目录
cd $LFS/srctar -xf patch-2.7.4.tar.xzcd patch-2.7.4配置编译选项,编译并检查编译
./configure –prefix=/toolsmakemake check19-patchtest
测试结果表明,共测试39项,其中38项通过,1项失败,继续安装
make install回到$LFS/src,解压并进入perl源码目录
cd $LFS/srctar jxvf perl-5.20.2.tar.bz2cd perl-5.20.2配置编译选项,这是手动执行配置脚本
sh Configure -des -Dprefix=/tools -Dlibs=-lm正常编译后,需要手动来安装到指定目录
makecp -v perl cpan/podlators/pod2man /tools/binmkdir -pv /tools/lib/perl5/5.20.2cp -Rv lib/* /tools/lib/perl5/5.20.2回到$LFS/src目录,继续进行sed的安装,解压并进入源码目录
cd $LFS/srctar jxvf sed-4.2.2.tar.bz2cd sed-4.2.2配置编译选项,编译,检查编译,安装就好了
./configure –prefix=/toolsmakemake checkmake install继续同样的步骤来编译安装tar
cd $LFS/srctar xf tar-1.28.tar.xzcd tar-1.28./configure –prefix=/toolsmakemake checkmake install同样的步骤安装texinfo
cd $LFS/srctar xf texinfo-5.2.tar.xzcd texinfo-5.2./configure –prefix=/toolsmakemake checkmake install接下来安装linux系统工具,首先回到$LFS/src目录并解压进入源码包
cd $LFS/srctar xf util-linux-2.26.tar.xzcd util-linux-2.26linux系统工具的编译配置会相对麻烦一点
./configure –prefix=/tools \–without-python \–disable-makeinstall-chown \–without-systemdsystemunitdir \PKG_CONFIG=””配置之后编译安装即可,这个没有测试用例可以进行测试
makemake install下面编译安装xz依然是老步骤
cd $LFS/srctar xf xz-5.2.0.tar.xzcd xz-5.2.0./configure –prefix=/toolsmakemake checkmake install工具已经全部成功安装了,下面来进行清理工作
strip –strip-debug /tools/lib/*/usr/bin/strip –strip-unneeded /tools/{,s}bin/*rm -rf /tools/{,share}/{info,man,doc}最后一步就是将$LFS/tools目录以及下面的所有目录与文件属主变为root,为后面编译系统主体做好准备。
chown -R root:root $LFS/tools至此工具链编译完成,后面将会开始基础系统的编译安装。
原文发布时间:2015-04-08
本文来自云栖合作伙伴“linux中国”
相关资源:Man_Image.py