<meter id="pryje"><nav id="pryje"><delect id="pryje"></delect></nav></meter>
          <label id="pryje"></label>

          新聞中心

          EEPW首頁 > 嵌入式系統(tǒng) > 設(shè)計應(yīng)用 > 做9260的交叉工具遇到的問題

          做9260的交叉工具遇到的問題

          作者: 時間:2016-11-29 來源:網(wǎng)絡(luò) 收藏
          編譯過程相當(dāng)?shù)穆闊6页鲥e相當(dāng)多。搞的我把工具鏈砍掉重練了好幾次~

          編譯過程:

          本文引用地址:http://www.ex-cimer.com/article/201611/323473.htm

          環(huán)境設(shè)置:

          sudo groupadd armsudo useradd arm -g armsudo passwd arm #設(shè)置密碼su - arm #切換帳戶export CLFS_HOST="$(echo $MACHTYPE | sed "s/$(echo $MACHTYPE | cut -d- -f2)/cross/")"export CLFS_TARGET="arm-at91-linux"echo export CLFS_HOST=""${CLFS_HOST}"" >> ~/.bashrcecho export CLFS_TARGET=""${CLFS_TARGET}"" >> ~/.bashrc

          內(nèi)核頭文件(2.6.35):

          make mrpropermake headers_checkmake INSTALL_HDR_PATH=dest headers_installmkdir -p $CLFS/usr/includecp -rv dest/include/* $CLFS/usr/include

          Binutils(2.20):

          mkdir -v ../binutils-buildcd ../binutils-build../binutils-2.20.1/configure --prefix=${CLFS}/cross-tools --host=${CLFS_HOST} --target=${CLFS_TARGET} --with-sysroot=${CLFS} --disable-nls --enable-shared --disable-multilibln -sv /usr/bin/ar $CLFS/cross-tools/bin/${CLFS_HOST)-armake configure-hostmakemake installcp -v ../binutils-2.17/include/libiberty.h ${CLFS}/usr/include

          Glibc-Headers(2.11):

          tar -xf ../glibc-ports-2.11.tar.bz2mv glibc-ports-2.11 ports #重要,沒它就會說the arm is unsupportmkdir -v ../glibc-buildcd ../glibc-buildecho "libc_cv_forced_unwind=yes" > config.cacheecho "libc_cv_c_cleanup=yes" >> config.cacheecho "libc_cv_arm_tls=yes" >> config.cacheecho "libc_cv_arm32_tls=yes" >> config.cacheecho "libc_cv_arm_machine=yes" > config.cacheecho "libc_cv_mlong_double_128=yes" >> config.cacheecho "libc_cv_mlong_double_128ibm=yes" >> config.cacheecho "install_root=${CLFS}" > configparmsCC=gcc ../glibc-2.11/configure --prefix=/usr --host=${CLFS_TARGET} --build=${CLFS_HOST} --with-headers=${CLFS}/usr/include --cache-file=config.cachemake install-headersinstall -dv ${CLFS}/usr/include/bitscp -v bits/stdio_lim.h ${CLFS}/usr/include/bitstouch ${CLFS}/usr/include/gnu/stubs.h

          Gcc-4.5.1 Pass1:

          patch -Np1 -i ../gcc-4.5.1-startfiles_fix-1.patchtar -xf ../gmp-5.0.1.tar.bz2tar -xf ../mpc-0.8.2.tar.gztar -xf ../mpfr-3.0.0.tar.bz2mv gmp-5.0.1 gmpmv mpc-0.8.2.tar.gz mpcmv mpfr-3.0.0 mpfrmkdir -v ../gcc-buildcd ../gcc-build../gcc-4.5.1/configure --prefix=${CLFS}/cross-tools --host=${CLFS_HOST} --target=${CLFS_TARGET} --disable-multilib --with-sysroot=${CLFS} --disable-nls --disable-shared --enable-languages=c --with-gmp-include=$(pwd)/gmp --with-gmp-lib=$(pwd)/gmp/.libs #相當(dāng)重要!make all-gccmake install-gccln -sv $CLFS/cross-tools/bin/arm-at91-linux-gcc FS/cross-tools/bin/arm-at91-linux-ccrm $CLFS/cross-tools/bin/i486-cross-linux-gnu-arln -vs libgcc.a `$CLFS_TARGET-gcc -print-libgcc-file-name | sed s/libgcc/&_eh/` #相當(dāng)重要,沒有這個符號連接就別想編譯glibc

          Glibc 2.11 Pass2

          tar -xf ../glibc-ports-2.11.tar.bz2mv glibc-ports-2.11 portsmkdir -v ../glibc-buildcd ../glibc-buildecho "libc_cv_forced_unwind=yes" > config.cacheecho "libc_cv_c_cleanup=yes" >> config.cacheecho "install_root=${CLFS}" > configparmsBUILD_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 --with-binutils=${CLFS}/cross-tools/bin --with-headers=${CLFS}/usr/include --cache-file=config.cachemakemake installcat > ${CLFS}/etc/nsswitch.conf << "EOF"# Begin /etc/nsswitch.confpasswd: filesgroup: filesshadow: fileshosts: files dnsnetworks: filesprotocols: filesservices: filesethers: filesrpc: files# End /etc/nsswitch.confEOFTZDIR="${CLFS}/usr/share/zoneinfo" ${CLFS}/usr/bin/tzselectcp -v --remove-destination ${CLFS}/usr/share/zoneinfo/[xxx] ${CLFS}/etc/localtimecat > ${CLFS}/etc/ld.so.conf << "EOF"# Begin /etc/ld.so.conf/usr/local/lib/opt/lib# End /etc/ld.so.confEOF

          GCC-Pass3

          patch -Np1 -i ../gcc-4.5.1-startfiles_fix-1.patchtar -xf ../gmp-5.0.1.tar.bz2tar -xf ../mpc-0.8.2.tar.gztar -xf ../mpfr-3.0.0.tar.bz2mv gmp-5.0.1 gmpmv mpc-0.8.2.tar.gz mpcmv mpfr-3.0.0 mpfrmkdir -v ../gcc-buildcd ../gcc-build../gcc-4.5.1/configure --prefix=${CLFS}/cross-tools --host=${CLFS_HOST} --target=${CLFS_TARGET} --disable-multilib --with-sysroot=${CLFS} --disable-nls --enable-shared --enable-languages=c,c++ --enable-__cxa_atexit --enable-c99 --enable-long-long --enable-threads=posixmake all-gccmake install-gcc #重要!makemake installln -vs libgcc.a `$LFS_TGT-gcc -print-libgcc-file-name | sed s/libgcc/&_eh/` #相當(dāng)重要,沒有這個符號連接就別想編譯glibc

          如果一步一步按著這個作的,那么告訴你:工具鏈完成了!



          關(guān)鍵詞: 9260交叉工

          評論


          技術(shù)專區(qū)

          關(guān)閉
          看屁屁www成人影院,亚洲人妻成人图片,亚洲精品成人午夜在线,日韩在线 欧美成人 (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })();