zedboard 开发记录---交叉编译环境搭建

时间:2021-05-20 14:53:42

基于ubuntu15.04的交叉变异环境设置

首先,安装依赖:

   
   
  
  

    apt-get install ia32-libs ia32-libs-gtk

    sudo apt-get install git

git的配置过程不详细说了

输入密码后,接着克隆代码,

   
   
  
  
    cd ~
    git clone https://github.com/xupsh/CodeSourcery.git
等待下载完之后,

切换到超级用户:

   
   
  
  

    sudo s

    //进入到Codesourcery目录

    cd CodeSourcery

之后执行

   
   
  
  
    root@super-ThinkPad-Edge-E440:~/CodeSourcery# echo "export PATH=~/CodeSourcery/bin:$PATH">>~/.bashrc
    root@super-ThinkPad-Edge-E440:~/CodeSourcery# echo "export CROSS_COMPILE=arm-xilinx-linux-gnueabi">>~/.bashrc

检验安装是否成功

   
   
  
  
    arm-xilinx-linux-gnueabi-gcc -v
    //然后就会出现这么一大堆
    Using built-in specs.
    COLLECT_GCC=arm-xilinx-linux-gnueabi-gcc
    COLLECT_LTO_WRAPPER=/home/super/CodeSourcery/bin/../libexec/gcc/arm-xilinx-linux-gnueabi/4.7.2/lto-wrapper
    Target: arm-xilinx-linux-gnueabi
    Configured with: /scratch/janisjo/build6/2012.09-xilinx-linux-release/src/gcc-4.7-2012.09/configure --build=i686-pc-linux-gnu --host=i686-pc-linux-gnu --target=arm-xilinx-linux-gnueabi --enable-threads --disable-libmudflap --disable-libssp --disable-libstdcxx-pch --with-arch=armv5te --with-arch=armv7-a --with-cpu=cortex-a9 --with-float=softfp --with-fpu=neon-fp16 --disable-multilib --with-gnu-as --with-gnu-ld --with-specs='%{save-temps: -fverbose-asm} %{funwind-tables|fno-unwind-tables|mabi=*|ffreestanding|nostdlib:;:-funwind-tables} -D__CS_SOURCERYGXX_MAJ__=2012 -D__CS_SOURCERYGXX_MIN__=9 -D__CS_SOURCERYGXX_REV__=104 %{O2:%{!fno-remove-local-statics: -fremove-local-statics}} %{O*:%{O|O0|O1|O2|Os:;:%{!fno-remove-local-statics: -fremove-local-statics}}}' --enable-languages=c,c++ --enable-shared --enable-lto --enable-symvers=gnu --enable-__cxa_atexit --with-pkgversion='Sourcery CodeBench Lite 2012.09-104' --with-bugurl=https://support.codesourcery.com/GNUToolchain/ --disable-nls --prefix=/opt/codesourcery --with-sysroot=/opt/codesourcery/arm-xilinx-linux-gnueabi/libc --with-build-sysroot=/scratch/janisjo/build6/2012.09-xilinx-linux-release/install/arm-xilinx-linux-gnueabi/libc --with-gmp=/scratch/janisjo/build6/2012.09-xilinx-linux-release/obj/pkg-2012.09-104-arm-xilinx-linux-gnueabi/xilinx-2012.09-104-arm-xilinx-linux-gnueabi.extras/host-libs-i686-pc-linux-gnu/usr --with-mpfr=/scratch/janisjo/build6/2012.09-xilinx-linux-release/obj/pkg-2012.09-104-arm-xilinx-linux-gnueabi/xilinx-2012.09-104-arm-xilinx-linux-gnueabi.extras/host-libs-i686-pc-linux-gnu/usr --with-mpc=/scratch/janisjo/build6/2012.09-xilinx-linux-release/obj/pkg-2012.09-104-arm-xilinx-linux-gnueabi/xilinx-2012.09-104-arm-xilinx-linux-gnueabi.extras/host-libs-i686-pc-linux-gnu/usr --with-ppl=/scratch/janisjo/build6/2012.09-xilinx-linux-release/obj/pkg-2012.09-104-arm-xilinx-linux-gnueabi/xilinx-2012.09-104-arm-xilinx-linux-gnueabi.extras/host-libs-i686-pc-linux-gnu/usr --with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm' --with-cloog=/scratch/janisjo/build6/2012.09-xilinx-linux-release/obj/pkg-2012.09-104-arm-xilinx-linux-gnueabi/xilinx-2012.09-104-arm-xilinx-linux-gnueabi.extras/host-libs-i686-pc-linux-gnu/usr --with-libelf=/scratch/janisjo/build6/2012.09-xilinx-linux-release/obj/pkg-2012.09-104-arm-xilinx-linux-gnueabi/xilinx-2012.09-104-arm-xilinx-linux-gnueabi.extras/host-libs-i686-pc-linux-gnu/usr --disable-libgomp --disable-libitm --enable-poison-system-directories --with-build-time-tools=/scratch/janisjo/build6/2012.09-xilinx-linux-release/install/arm-xilinx-linux-gnueabi/bin --with-build-time-tools=/scratch/janisjo/build6/2012.09-xilinx-linux-release/install/arm-xilinx-linux-gnueabi/bin
    Thread model: posix
    gcc version 4.7.2 (Sourcery CodeBench Lite 2012.09-104)
说明此时配置已经成功