⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 toolchain_build_script.html

📁 ADI 公司blackfin系列的用户使用文挡。
💻 HTML
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html><head>  <title></title>  <link rel="stylesheet" media="screen" type="text/css" href="./style.css" />  <link rel="stylesheet" media="screen" type="text/css" href="./design.css" />  <link rel="stylesheet" media="print" type="text/css" href="./print.css" />  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /></head><body><a href=start.html>start</a></br><h2><a name="toolchain_build_script" id="toolchain_build_script">Toolchain Build Script</a></h2><div class="level2"><p>There is a build script for the toolchain that builds and installs the toolchain from source. This is updated as the toolchain changes, so it usually works. This can be used in combination with the cvs scripts provided to ensure that you have the most up-to-date toolchain. The locations for the build directory and the source directory must be included when you run the script. Running the script will build two toolchains, which are <a href="gcc_and_gas.html#differences_between_bfin-elf-gcc_and_bfin-uclinux-gcc" class="wikilink1" title="gcc_and_gas.html">different</a>:</p><ul><li class="level1"><div class="li"> <code>bfin-elf-*</code></div></li><li class="level1"><div class="li"> <code>bfin-uclinux-*</code></div></li></ul><p> To build from source, you need the source of the kernel and toolchain. The kernel source is required because that is where uClibc lives. It is important that the dates of the kernel and toolchain source be close to each other. For normal development, this means you should use a release toolchain source, with a release toolchain kernel. </p><p>If you need to build a cvs toolchain, it is recommended to use a cvs kernel source. Although, at first glance, it seems like the toolchain, bootloader, libraries, and kernel should be seperate - that is <strong>not</strong> true. A bug in the toolchain and cover up problems in the kernel, and bootloader, as toolchains are fixed, bootloaders, and kernels must also be modified. Debugger lives in both the toolchain cvs (for the host part), and the kernel cvs (for the target gdbserver). Adding new features like shared libraries require changes in both the toolchain and kernel cvs. Because of these, and other issues, building a cvs toolchain, and using a non-cvs kernel uClibc is not supported/tested/validated.</p><p>Building takes awhile - (it builds the bfin-elf toolchain, compiles uClibc with bfin-elf, and then builds the bfin-uclinux toolchain with uClibc (built for Blackfin). The output will give you ~/gcc-elf and ~/gcc-uclinux (for the two toolchains).</p><p>bfin-uclinux should be used to build kernel and kernel applications.</p><p>bfin-elf should be used to build non-kernel/non-uClibc applications (like U-Boot).</p><p>For example to run the script a command similar to this must be issued: </p><pre class="code">./BuildToolChain -s /home/user/checkouts/gcc/ \  -k /home/user/checkouts/kernel/uClinux-dist \  -u /home/user/checkouts/uboot/u-boot_1.1.3  \  -b /home/user/gcc-build/ -o /home/user/cvsoutput </pre><p>Options can be in any order, but must included:</p><ul><li class="level1"><div class="li"> <code>-s</code> is the toolchain source directory</div></li></ul><p> There are also some optional, but recommended flags:</p><ul><li class="level1"><div class="li"> <code>-k</code> is the kernel source directory, </div></li><li class="level1"><div class="li"> <code>-b</code> is the directory where the toolchain is built (default is current directory)</div></li><li class="level1"><div class="li"> <code>-o</code> is the output directory</div></li><li class="level1"><div class="li"> <code>-u</code> builds <code>mkimage</code>(to create compressed images) and <code>gen_eth_addr</code> (to generate private MAC addresses). Without this option, the default kernel will be built without a compressed image (something that most people want).</div></li></ul><p> There are also some optional flags:</p><ul><li class="level1"><div class="li"> <code>-c GCC_VERSION</code> gcc version to build (either 3.4 or 4.1).  Can be given multiple times</div></li><li class="level1"><div class="li"> <code>-p</code> Check prerequisites</div></li><li class="level1"><div class="li"> <code>-d</code> Date Stamp all output files</div></li><li class="level1"><div class="li"> <code>-i</code> Build binutils libraries for use on the target. This is required when doing things like profiling.</div></li><li class="level1"><div class="li"> <code>-h</code> prints out help</div></li><li class="level1"><div class="li"> <code>-t</code> tests the <code>bfin-elf</code> toolchain on the simulator</div></li><li class="level1"><div class="li"> <code>-T IP_NUM</code> tests the <code>bfin-uclinux</code> toolchain on the hardware. Note - IP_NUM must be a Blackfin platform, which is running rcp, and rsh.</div></li><li class="level1"><div class="li"> <code>-m MAKE</code> Default make (leave blank to use system make)</div></li></ul><p>   <code>cvsoutput-elf</code><code>cvsoutput-uclinux</code> </p><p>The output of the buildscript will look something like (this will also tell you how long it can take ~40min on a fast machine).</p><pre class="code">*** Cleaning Elf Toolchain         Wed Aug 17 18:18:43 EDT 2005*** Configuring Elf Toolchain      Wed Aug 17 18:18:43 EDT 2005*** Building Elf Toolchain         Wed Aug 17 18:18:49 EDT 2005*** Installing Elf Toolchain       Wed Aug 17 18:37:18 EDT 2005*** Building Elf elf2flt           Wed Aug 17 18:37:46 EDT 2005*** Cleaning Elf elf2flt           Wed Aug 17 18:37:46 EDT 2005*** Make Elf elf2flt               Wed Aug 17 18:37:49 EDT 2005*** Installing Elf elf2flt         Wed Aug 17 18:37:53 EDT 2005*** Building Elf genext2fs         Wed Aug 17 18:37:53 EDT 2005*** Cleaning Elf genext2fs         Wed Aug 17 18:37:53 EDT 2005*** Make Elf genetx2fs             Wed Aug 17 18:37:57 EDT 2005*** Installing Elf genext2fs       Wed Aug 17 18:37:59 EDT 2005*** Configuring uClibc             Wed Aug 17 18:38:00 EDT 2005*** Cleaning uClibc                Wed Aug 17 18:38:04 EDT 2005*** Building uClibc                Wed Aug 17 18:38:14 EDT 2005*** Installing uClibc              Wed Aug 17 18:40:03 EDT 2005*** Cleaning uClinux toolchain     Wed Aug 17 18:40:07 EDT 2005*** Configuring uClinux toolchain  Wed Aug 17 18:40:07 EDT 2005*** Building uClinux toolchain     Wed Aug 17 18:40:14 EDT 2005*** Installing uClinux toolchain   Wed Aug 17 18:57:28 EDT 2005*** Building uClinux elf2flt       Wed Aug 17 18:57:50 EDT 2005*** Cleaning uClinux elf2flt       Wed Aug 17 18:57:50 EDT 2005*** Building uClinux elf2flt       Wed Aug 17 18:57:53 EDT 2005*** Installing uClinux elf2flt     Wed Aug 17 18:57:57 EDT 2005*** Building uClinux genext2fs     Wed Aug 17 18:57:57 EDT 2005*** Cleaning uClinux genext2fs     Wed Aug 17 18:57:57 EDT 2005*** Make uClinux genetx2fs         Wed Aug 17 18:58:01 EDT 2005*** Installing uClinux genext2fs   Wed Aug 17 18:58:03 EDT 2005*** Testing 'bfin-elf-gcc -v'Reading specs from /home/rgetz/gcc-elf/lib/gcc/bfin-elf/3.4.4/specsConfigured with: /home/rgetz/checkouts/gcc/binutils/binutils-2.15/configure --target=bfin-elf --prefix=/home/rgetz/gcc-elf --disable-libstdcxx-pchThread model: singlegcc version 3.4.4*** Testing 'bfin-uclinux-gcc -v'Reading specs from /home/rgetz/gcc-uclinux/lib/gcc/bfin-uclinux/3.4.4/specsConfigured with: /home/rgetz/checkouts/gcc/binutils/binutils-2.15/configure --enable-threads=posix --target=bfin-uclinux --prefix=/home/rgetz/gcc-uclinux --disable-libstdcxx-pchThread model: posixgcc version 3.4.4*** Done                       Wed Aug 17 18:58:03 EDT 2005</pre><p>The latest build script as well as toolchain source can be downloaded from cvs by using the command:</p><pre class="code">cvs -d :pserver:anonymous@cvs.blackfin.uclinux.org:/cvsroot/gcc3 checkout .</pre></div></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -