?? 00000006.htm
字號:
<HTML><HEAD> <TITLE>武漢白云黃鶴站∶精華區</TITLE></HEAD><BODY><CENTER><H1>武漢白云黃鶴站∶精華區</H1></CENTER>發信人: dot (愛吃蘿卜和青菜), 信區: Embedded <BR>標 題: 基于IQ80321和arm-linux的軟件開發指南 <BR>發信站: 武漢白云黃鶴站 (2004年10月11日16:03:25 星期一), 站內信件 <BR> <BR>重要文檔,再次吐血推薦! <BR> <BR>《基于IQ80321和arm-linux的軟件開發指南》 【原創】 <BR> <BR> <BR>產品版本 <BR>密級 <BR>項目名稱 <BR>項目ID <BR>共 45 頁 <BR>文檔編號 <BR> <BR>基于IQ80321和arm-linux的 <BR>軟件開發指南 <BR> <BR>擬制: <BR>董曉明 <BR>日期: <BR>2004-5-9 <BR>評審: <BR>日期: <BR>批準: <BR>日期: <BR>yyyy/mm/dd <BR>簽發: <BR>日期: <BR>yyyy/mm/dd <BR>武漢東湖存儲技術有限公司 <BR>版權所有 不得復制 <BR> <BR>修 訂 記 錄 <BR>日期 <BR>修訂版本 <BR>描述 <BR>作者 <BR>2004-7-6 <BR>1.0 <BR>初稿。ARM Linux 可以在IQ80321平臺運行,有個別小問題尚未解決。 <BR>董曉明 <BR> <BR> <BR> <BR> <BR>1 概述 <BR> <BR>1.1 目的和范圍 <BR> 說明在INTEL IQ80321開發板上面運行ARM LINUX的過程,包括在主機上建立交 <BR>叉編譯環境、編譯內核、制作根文件系統和引導目標機的方法步驟。 <BR>1.2 背景 <BR> 單位:華中科技大學信息存儲系統重點實驗室 <BR> 武漢東湖存儲技術有限公司 <BR> 項目:RAID控制器(RDC) <BR> RDC核心軟件在x86平臺、Redhat Linux環境下開發。產品化階段需要首先移植 <BR>到IQ80321平臺。計劃于2004年7月底完成移植。 <BR>1.3 軟硬件環境 <BR>主機(host) <BR>目標機(target) <BR>硬件環境 <BR>PC <BR>Intel IQ80321 <BR>操作系統 <BR>Redhat Linux 9.0 <BR>arm-linux <BR> <BR>1.4 參考資料 <BR>[1] Intel IQ80321 I/O Processor Evaluation Platform Board Manual. Docume <BR>nt Number: 273521-006, November 7, 2002. <BR>[2] RedBoot User's Guide. Document Version 1.5m, July 2001. <BR>[3] The Linux MTD, JFFS HOWTO. (work in progress) v 1.16 2001/08/13. <BR><A HREF="http://ftp.linux.org.uk/pub/people/dwmw2/mtd/cvs/mtd/mtd-jffs-HOWTO.txt">http://ftp.linux.org.uk/pub/people/dwmw2/mtd/cvs/mtd/mtd-jffs-HOWTO.txt</A> <BR>[4] Intel IQ80321 Development Kit: <A HREF="http://www.intel.com/design/IIO/docs/">http://www.intel.com/design/IIO/docs/</A> <BR>dvtl_iop321.htm <BR>[5] ARM Linux: <A HREF="http://www.arm.linux.org.uk/">http://www.arm.linux.org.uk/</A> <BR>[6] BusyBox: <A HREF="http://www.busybox.net/">http://www.busybox.net/</A> <BR>[7] JFFS: <A HREF="http://developer.axis.com/software/jffs/">http://developer.axis.com/software/jffs/</A> <BR>[8] JFFS2: <A HREF="http://sources.redhat.com/jffs2/">http://sources.redhat.com/jffs2/</A> <BR>[9] MTD: <A HREF="http://www.linux-mtd.infradead.org/">http://www.linux-mtd.infradead.org/</A> <BR>[10] “一步一步的制作 arm-linux 交叉編譯環境”, <BR><A HREF="http://embdev.gotdns.org/articles/toolchain.html">http://embdev.gotdns.org/articles/toolchain.html</A> <BR>[11] 董曉明.LiPS詳細設計說明書(Linux系統裁減指南).2003.6. <BR>[12] Wookey, Chris Rutter, Jeff Sutherland, and Paul Webb. The GNU Toolc <BR>hain for ARM targets HOWTO. <A HREF="http://www.aleph1.co.uk/armlinux/docs/toolch">http://www.aleph1.co.uk/armlinux/docs/toolch</A> <BR>ain/toolchHOWTO.pdf <BR>[13] <BR> <BR> <BR> <BR> <BR>2 交叉編譯環境 <BR> <BR>2.1 概述 <BR> (參考資料[12]) <BR> The toolchain actually consists of a number of components. The main <BR>one is the <BR> compiler itself gcc, which can be native to the host or a cross-comp <BR>iler. This is <BR> supported by binutils, a set of tools for manipulating binaries. The <BR>se components are all <BR> you need for compiling the kernel, but almost anything else you comp <BR>ile also needs the <BR> C-library glibc. As you will realise if you think about it for a mom <BR>ent, compiling the <BR> compiler poses a bootstrapping problem, which is the main reason why <BR> generating a <BR> toolset is not a simple exercise. <BR> <BR>2.2 準備 <BR>2.2.1 目錄結構說明 <BR>1 <BR>2 <BR>3 <BR>描述 <BR>/root/ <BR>以root用戶登錄,HOME目錄,也是當前目錄 <BR>arm/ <BR>與此項工作有關的文件都放在這個目錄下面 <BR>arm-toolchain/ <BR>在這里安裝編譯生成的ARM工具鏈(toolchain) <BR>boot/ <BR>存放編譯生成的內核映像文件 <BR>同時把TFTP服務器的根設置在這里 <BR>build/ <BR>在這里編譯,會生成許多臨時文件和目標文件 <BR>fakeroot/ <BR>用于目標機遠程NFS掛載的根文件系統 <BR>src/ <BR>存放軟件包的源代碼,包括Linux內核源代碼 <BR>tars/ <BR>存放各個軟件包的壓縮包 <BR> <BR> 我們為建立交叉編譯環境的過程寫了一個Makefile(相當于實現批處理),下 <BR>面是Makefile中的一些定義。 <BR> TOPDIR =/root/arm <BR> PREFIX =$(TOPDIR)/arm-toolchain <BR> BUILDPATH =$(TOPDIR)/build <BR> SRCPATH =$(TOPDIR)/src <BR> TARPATH =$(TOPDIR)/tars <BR> KERNELPATH =$(SRCPATH)/linux <BR>2.2.2 定義環境變量 <BR> 在~/.bashrc文件中追加如下幾行(注意:注銷、重新登錄后才能生效): <BR> export TARGET=arm-linux <BR> export PREFIX=/root/arm/arm-toolchain <BR> export PATH=$PREFIX/bin:$PATH <BR> 或者直接在命令行給出定義。 <BR>2.2.3 選擇內核版本 <BR> 我們現在使用的Linux內核版本為linux-2.4.21-rmk1-ds0-dj9.這也是Intel官 <BR>方網站上為IQ80321開發板提供下載的內核版本。本文檔以該版本為例。 <BR> 有關arm-linux和rmk補丁(Russell King維護)的更多信息(包括最新進展) <BR>請參考這個網站和郵件列表: <BR> <A HREF="http://www.arm.linux.org.uk/">http://www.arm.linux.org.uk/</A> <BR> linux-arm-<A HREF="mailto:kernel@lists.arm.linux.org.uk">kernel@lists.arm.linux.org.uk</A> <BR> 在決定你的項目使用哪個Linux內核版本的時候,一定要考慮該版本內核是否已 <BR>經發布了對應的rmk和ds補丁。 <BR> In order to build the entire Linux kernel source with the supplied p <BR>atch, you must have the base kernel, the ARM Linux patch, the Montavista <BR> DS patch. The annotation of the filenaming as follows: patch-2.4.X-rmkY <BR>-dsZ-djV means you must have: <BR> 1. Linux-2.4.X kernel source <BR> 2. patch-2.4.X-rmkY to patch on top <BR> 3. patch-2.4.X-rmkY-dsZ to patch on top of #2 <BR> 4. patch-2.4.X-rmkY-dsZ-djV to patch on top of #3 <BR> <BR>2.2.4 下載源代碼包 <BR>項目 <BR>URL <BR>linux 內核 <BR><A HREF="ftp://ftp.kernel.org/pub/linux/kernel/v2.4/">ftp://ftp.kernel.org/pub/linux/kernel/v2.4/</A> <BR>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -