| 网管联盟 | 网管论坛 | 网管u家 | 网管博客 | 网管软件 | 网管求职 | 小游戏 | 网管搜索 | 网管原创 | 网管聚合 | 网管读摘 | 网管焦点 | 世界素材 | 会员投稿 | 会员中心 |
![]() |
| Windows Linux Cisco 网络技术 数据库 黑客攻防 DotNet Java PHP 认证 新闻资讯 服务器 存储资讯 网络设备 网管学堂 技术专题 焦点 网吧频道 |
工具链制作完成
目标系统制作
export CC="${CLFS_TARGET}-gcc"
export CXX="${CLFS_TARGET}-g++"
export AR="${CLFS_TARGET}-ar"
export AS="${CLFS_TARGET}-as"
export RANLIB="${CLFS_TARGET}-ranlib"
export LD="${CLFS_TARGET}-ld"
export STRIP="${CLFS_TARGET}-strip"
echo export CC=\""${CC}\"" >> ~/.bashrc
echo export CXX=\""${CXX}\"" >> ~/.bashrc
echo export AR=\""${AR}\"" >> ~/.bashrc
echo export AS=\""${AS}\"" >> ~/.bashrc
echo export RANLIB=\""${RANLIB}\"" >> ~/.bashrc
echo export LD=\""${LD}\"" >> ~/.bashrc
echo export STRIP=\""${STRIP}\"" >> ~/.bashrc
Linux-2.6.17.6
make ARCH=powerpc CROSS_COMPILE=${CLFS_TARGET}- menuconfig
make ARCH=powerpc CROSS_COMPILE=${CLFS_TARGET}- 网管u家bitscn.net
make ARCH=powerpc CROSS_COMPILE=${CLFS_TARGET}- \
INSTALL_MOD_PATH=${CLFS} modules_install
cp vmlinux ${CLFS}/boot/clfskernel-2.6.17.6
cp System.map ${CLFS}/boot/System.map-2.6.17.6
cp .config ${CLFS}/boot/config-2.6.17.6
MIPS的工具链制作过程及内核编译
环境设置过程(略)
export CLFS_HOST="$(echo $MACHTYPE | sed "s/$(echo $MACHTYPE | cut -d- -f2)/cross/")"
export CLFS_TARGET="mips-unknown-linux-gnu"
echo export CLFS_HOST=\""${CLFS_HOST}\"" >> ~/.bashrc
echo export CLFS_TARGET=\""${CLFS_TARGET}\"" >> ~/.bashrc
Linux-Kernel-headers
make include/linux/version.h
install -dv ${CLFS}/usr/include/{asm,asm-generic,linux,net,mtd,scsi,sound}
cp -av include/asm-generic/* ${CLFS}/usr/include/asm-generic
cp -av include/linux/* ${CLFS}/usr/include/linux
cp -av include/mtd/* ${CLFS}/usr/include/mtd 网管u家u.bitscn@com
cp -av include/net/* ${CLFS}/usr/include/net
cp -av include/scsi/* ${CLFS}/usr/include/scsi
cp -av include/sound/* ${CLFS}/usr/include/sound
cp -av include/asm-mips/* ${CLFS}/usr/include/asm
binutils-2.17
patch -Np1 -i ../binutils-2.17-posix-1.patch
mkdir -v ../binutils-build
cd ../binutils-build
../binutils-2.17/configure --prefix=${CLFS}/cross-tools \
--host=${CLFS_HOST} --target=${CLFS_TARGET} --with-sysroot=${CLFS} \
--disable-nls --enable-shared --disable-multilib
make configure-host
make
make install
cp -v ../binutils-2.17/include/libiberty.h ${CLFS}/usr/include
glibc-2.4-headers
cp configure{,.orig}
sed -e 's/3.4/3.[0-9]/g' configure.orig > configure
tar -jxvf ../glibc-ports-2.4.tar.bz2
mv -v glibc-ports-2.4 ports
echo "" > ports/sysdeps/mips/mips32/Makefile
sed -i ‘s/wordsize.h>$/wordsize.h>\n#define __WORDSIZE 32/g’ bits/types.h 网管网www.bitscn.com
mkdir -v ../glibc-build
cd ../glibc-build
echo "libc_cv_forced_unwind=yes" > config.cache
echo "libc_cv_c_cleanup=yes" >> config.cache
echo "libc_cv_mips_tls=yes" >> config.cache
echo "install_root=${CLFS}" > configparms
CC=gcc ../glibc-2.4/configure --prefix=/usr \
--host=${CLFS_TARGET} --build=${CLFS_HOST} \
--with-headers=${CLFS}/usr/include --cache-file=config.cache
make install-headers
install -dv ${CLFS}/usr/include/bits
cp -v bits/stdio_lim.h ${CLFS}/usr/include/bits
touch ${CLFS}/usr/include/gnu/stubs.h
cp -v ../glibc-2.4/ports/sysdeps/unix/sysv/linux/mips/nptl/bits/pthreadtypes.h \
${CLFS}/usr/include/bits
gcc-4.1.1第一遍
patch -Np1 -i ../gcc-4.1.1-posix-1.patch
patch -Np1 -i ../gcc-4.1.1-cross_search_paths-1.patch
mkdir -v ../gcc-build
cd ../gcc-build
../gcc-4.1.1/configure --prefix=${CLFS}/cross-tools \
--host=${CLFS_HOST} --target=${CLFS_TARGET} --disable-multilib \ 网管u家u.bitsCN.com
--with-sysroot=${CLFS} --disable-nls --disable-shared \
--enable-languages=c
make all-gcc
make install-gcc
glibc-2.4
patch -Np1 -i ../glibc-2.4-libgcc_eh-1.patch
patch -Np1 -i ../glibc-2.4-localedef_segfault-1.patch
patch -Np1 -i ../glibc-2.4-crosscompile_timezone_fix-1.patch
patch -Np1 -i ../glibc-2.4-iconv_fix-1.patch
ln -s nptl/sysdeps/unix/sysv/linux/i386 ports/sysdeps/unix/
mkdir -v ../glibc-build
cd ../glibc-build
echo "libc_cv_forced_unwind=yes" > config.cache
echo "libc_cv_c_cleanup=yes" >> config.cache
echo "install_root=${CLFS}" > configparms
BUILD_CC="gcc" CC="${CLFS_TARGET}-gcc" \
AR="${CLFS_TARGET}-ar" RANLIB="${CLFS_TARGET}-ranlib" \
../glibc-2.4/configure --prefix=/usr --libexecdir=/usr/lib/glibc \
--host=${CLFS_TARGET} --build=${CLFS_HOST} \
--disable-profile --enable-add-ons \
--with-tls --enable-kernel=2.6.0 --with-__thread \ 网管联盟bitsCN@com
--with-binutils=${CLFS}/cross-tools/bin --with-headers=${CLFS}/usr/include \
--cache-file=config.cache
make
make install
cat > ${CLFS}/etc/nsswitch.conf << "EOF"
# Begin /etc/nsswitch.conf
passwd: files
group: files
shadow: files
hosts: files dns
networks: files
protocols: files
services: files
ethers: files
rpc: files
# End /etc/nsswitch.conf
EOF
TZDIR="${CLFS}/usr/share/zoneinfo" ${CLFS}/usr/bin/tzselect
cp -v --remove-destination ${CLFS}/usr/share/zoneinfo/[xxx] \
${CLFS}/etc/localtime
cat > ${CLFS}/etc/ld.so.conf << "EOF"
# Begin /etc/ld.so.conf
/usr/local/lib
/opt/lib
# End /etc/ld.so.conf
EOF
网管u家bitscn.net
|
0
|
评论加载中…