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

📄 basic_compilation.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="basic_compilation" id="basic_compilation">Basic Compilation</a></h2><div class="level2"><p>The latest version of uClinux for Blackfin can be obtained from the <a href="http://blackfin.uclinux.org/projects/uclinux533" class="urlextern" title="http://blackfin.uclinux.org/projects/uclinux533"  rel="nofollow">Blackfin/uClinux</a> website. The current kernel source supports all existing blackfin parts.</p><p>Click on the <em>Files</em> tab to obtain the latest release of uClinux.</p><p> <a href="installing_the_blackfin_tool_chain.html" class="wikilink1" title="installing_the_blackfin_tool_chain.html">Installing the Blackfin Tool Chain</a> </p><p>Depending on the version of uClinux there may be a variety of file types available.  These file types are summarized below: </p><ul><li class="level1"><div class="li"> <strong>files with no extension</strong> - These files can be anything. Use the unix <code>file</code> command to determine what file type it is. <pre class="code">user@host:~/uClinux-dist&gt; file linux-2.6.x/linuxlinux-2.6.x/linux: ELF 32-bit LSB executable, version 1 (SYSV), statically linked, not strippeduser@host:~/uClinux-dist&gt; file linux-2.6.x/Makefilelinux-2.6.x/Makefile: ASCII English textuser@host:~/uClinux-dist&gt; file config.archconfig.arch: symbolic link to `vendors/AnalogDevices/BF537-EZKIT/config.arch'</pre><p> ELF files are pre鈥慶ompiled memory images ready for download to the target system.  They provide a good starting point because on other steps need to be done on the file beofre running on the target.</p></div></li><li class="level1"><div class="li"><em><strong>.tar.bz2 </strong></em><strong>files</strong> - These files are usually zipped source files.  They must be decompressed with <em>bunzip2</em> and extracted with <em>tar</em>.  The source can then be compiled into a elf, or compressed binary file which can be loaded onto the target system.  Compiling uClinux from source allows for customization of the kernel as well as  a choice of helper applications.</div></li><li class="level1"><div class="li"><em><strong>.tar.gz</strong></em><strong> files</strong> - The same as <em>*.tar.bz2</em> files except that they must be decompressed with <em>gzip</em>.</div></li><li class="level1"><div class="li"> <strong>Patch files</strong> - These files apply changes and bug fixes to the uClinux kernel.  Instructions on applying a particular patch can be found in the release description.</div></li></ul><p> Instructions on compiling uClinux from source are given below.</p><p>First decompress and extract the source files by enter the following commands:</p><pre class="code">bash$ bunzip2 -d &lt;filename&gt;  **(for *.bz2 files) bash$ gzip -d &lt;filename&gt;**  (for *.gz files) bash$ tar -xvf &lt;filename of unzipped file&gt;</pre><p>Apply any patches as per instructions given in the release description.  Generally only the latest patch will need to be applied.  Next change directory (<strong>cd</strong>) to the uClinux-dist directory that was created and type the following command:</p><pre class="code">bash$ make menuconfig</pre><p> &ldquo;&rdquo;&ldquo;&rdquo; </p><p> <acronym title="Graphical User Interface">GUI</acronym><strong>xconfig</strong><strong>xconfig</strong><strong>make </strong><strong>menuconfig</strong><strong>make xconfig</strong><strong>make menuconfig</strong> </p><p> After a few commands are executed the <strong>Embedded Linux Configuration</strong> window should be displayed:</p><p><a href="media/makemenuconfig1.png" class="media" target="_blank" title="makemenuconfig1.png"><img src="media/makemenuconfig1.png" class="media" alt="" /></a></p><p>Click on <strong>Vendor/Product Selection</strong>.</p><p>The <strong>Vendor/Product Selection</strong> window should now appear:</p><p><a href="media/vendors.png" class="media" target="_blank" title="vendors.png"><img src="media/vendors.png" class="media" alt="" /></a></p><p>Ensure <strong>Analog Devices</strong> is selected under <strong>Vendor</strong>.</p><p>Ensure <strong>BF533</strong> is selected under <strong>ADI Products</strong> when compiling for the STAMP board.</p><p>Click <strong>Main Menu</strong> to return.</p><p>Back at the <strong>Embedded Linux Configuration</strong> window click on <strong>Kernel/Library/Defaults Selection</strong>.</p><p>The <strong>Kernel/Library/Defaults Selection</strong> window should now appear:</p><p><a href="media/kernellibrary.png" class="media" target="_blank" title="kernellibrary.png"><img src="media/kernellibrary.png" class="media" alt="" /></a></p><p>Select <strong> &lsquo;y&rsquo; </strong>for <strong>Customize Kernel Setting</strong> and <strong>Customize Vendor/User Settings</strong></p><p>Click <strong>Main Menu</strong> then click <strong>Save and Exit</strong>.</p><p>After a few more commands are executed the <strong>Kernel Configuration</strong> window should be displayed:</p><p><a href="media/kernelconfig.png" class="media" target="_blank" title="kernelconfig.png"><img src="media/kernelconfig.png" class="media" alt="" /></a></p><p> The kernel configuration window allows you to configure various kernel options and device drivers.  If this is the first time compiling the kernel it is recommenced that you keep the default options by choosing <em><strong>File-Save</strong></em> followed by <em><strong>File-Exit</strong></em>.  Later you can try recompiling the kernel with different options enabled.</p><p>   </p><p> After a few more commands are executed the <strong>User Application Configuration</strong> window should be displayed:</p><p><a href="media/useroptions.png" class="media" target="_blank" title="useroptions.png"><img src="media/useroptions.png" class="media" alt="" /></a></p><p>This window allows you to select various helper applications to include.  If this is the first time compiling the kernel it is recommenced that you keep the default options by simply clicking <strong>Save and Exit</strong>.  Later you can try recompile uClinux with different helper applications added.</p><p>   </p><p> Configuration is now complete.  Next the kernel and root file system must be updated.  To do this enter the command:</p><pre class="code">bash$ make</pre><p>  </p><p>If you receive errors indicating that certain files could not be found you may have to copy all the files from the directories <code>.../uClinux-dist/linux-2.x.x/include/</code> and .<code>../uClinux鈥慸ist/lib/</code><code>libc</code><code>/include/</code> into a directory named <code>&lt;tool chain installation directory&gt;/bin鈥慹lf/include/</code>.  You may have to created this directory if it does not already exist.</p><p>After the kernel has compiled successfully, the file <code>linux</code> will be created in the directory <code>./uClinux鈥慸ist/images</code>.  This file is a ELF image of uClinux that can be loaded onto the target system via U-Boot.  For more information see the <a href="das_u-boot_on_blackfin.html" class="wikilink1" title="das_u-boot_on_blackfin.html">U-Boot</a> section of this document.</p><p>Standard input and output in uClinux are handled through a serial connection.  To communicate with the target system a terminal program and a serial link are required.  For more information on setting up a terminal program to communicate with uClinux see <a href="terminal_programs.html" class="wikilink1" title="terminal_programs.html">Terminal Programs </a> on page .</p><p> <strong>root</strong><strong>uClinux</strong>  </p></div></body></html>

⌨️ 快捷键说明

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