2023年全國(guó)碩士研究生考試考研英語(yǔ)一試題真題(含答案詳解+作文范文)_第1頁(yè)
已閱讀1頁(yè),還剩18頁(yè)未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說(shuō)明:本文檔由用戶(hù)提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡(jiǎn)介

1、<p>  嵌入式Linux概述</p><p><b>  摘要 </b></p><p>  本文我將論述一下嵌入式Linux目前的發(fā)展趨勢(shì)(狀況)。我將概述Linux是什么,嵌入式Linux系統(tǒng)與桌面系統(tǒng)有什么不同的特點(diǎn)。然后,我將詳細(xì)地論述六個(gè)關(guān)鍵領(lǐng)域: </p><p><b>  ?配置 </b>&l

2、t;/p><p><b>  ?實(shí)時(shí)性</b></p><p><b>  ?圖形用戶(hù)界面 </b></p><p><b>  ?開(kāi)發(fā)工具支持 </b></p><p><b>  ?經(jīng)濟(jì)性 </b></p><p><b>

3、;  ?技術(shù)支持選項(xiàng) </b></p><p>  下面,我將比較嵌入式Linux與Windows CE的實(shí)時(shí)性,操作系統(tǒng)映像大小和內(nèi)存需求。然后我會(huì)討論一些基于嵌入式Linux的零售設(shè)備并與大家討論一下關(guān)于嵌入式Linux一些大概的評(píng)論 。 </p><p><b>  簡(jiǎn)介 </b></p><p>  除非你在過(guò)去的幾年里一直

4、與世隔絕,否則毫無(wú)疑問(wèn)你一定聽(tīng)說(shuō)過(guò)Linux操作系統(tǒng)。作為微軟的Windows NT在軟件開(kāi)源中的競(jìng)爭(zhēng)對(duì)手,它已經(jīng)在軟件開(kāi)發(fā)和系統(tǒng)管理社區(qū),以及主流的非技術(shù)性新聞媒體上被廣泛宣傳和激烈的討論。 </p><p>  當(dāng)Linux系統(tǒng)首次推出的時(shí)候,它是專(zhuān)門(mén)針對(duì)運(yùn)行在英特爾80x86或兼容的微處理器上臺(tái)式電腦。引用Linux操作系統(tǒng)的創(chuàng)始Linus Torvalds說(shuō)過(guò)的一句話(huà): “ 從Linux操作系統(tǒng)誕生之日起

5、,它將只會(huì)運(yùn)行在擁有一塊IDE硬盤(pán)的PC上” ?;厥字两駷橹沟?1世紀(jì),這句話(huà)顯得非?;?。如今的Linux已經(jīng)被移植到許多不同的微處理器上并運(yùn)行在許多并不含有硬盤(pán)的平臺(tái)上。這些設(shè)備甚至沒(méi)有通用的計(jì)算機(jī)系統(tǒng),也沒(méi)有如網(wǎng)絡(luò)路由器,核心監(jiān)控程序和用來(lái)跟蹤旋風(fēng)管的數(shù)據(jù)收集單位。正是這些類(lèi)型的系統(tǒng),被統(tǒng)稱(chēng)為“嵌入式Linux” 。 </p><p>  在下一節(jié)我會(huì)關(guān)注嵌入式Linux系統(tǒng)和它的堂兄弟桌面Linux系統(tǒng)之

6、間的區(qū)別。然后,我要回詳細(xì)描述嵌入式Linux在:配置,實(shí)時(shí)性, GUIs ,開(kāi)發(fā)工具的支持,經(jīng)濟(jì)性,和技術(shù)支持這六個(gè)方面的特點(diǎn)。然后,我將比較一下基于同樣配置的嵌入式Linux內(nèi)核與Windows CE內(nèi)核的大小和實(shí)時(shí)性特征。 </p><p>  然后,我將討論三個(gè)基于嵌入式Linux的有趣的設(shè)備:光學(xué)遙測(cè)系統(tǒng),NetTel路由器和IBM公司的掌上電腦研究項(xiàng)目“ itsy ” 。我會(huì)再總結(jié)了一些一般性意見(jiàn)的作

7、用和未來(lái)的嵌入式Linux 。 </p><p>  是什么讓Linux成為“嵌入式”? </p><p>  迄今為止在這篇文章里我已經(jīng)多次使用了“嵌入式Linux” ,但我還沒(méi)有真正確定這個(gè)詞的含義。是不是如果系統(tǒng)不是從硬盤(pán)上啟動(dòng)的就可以被稱(chēng)為嵌入式系統(tǒng)?是不是所有從硬盤(pán)上啟動(dòng)的系統(tǒng)都不是嵌入式系統(tǒng)?本節(jié)將列出五個(gè)不同的嵌入式系統(tǒng),來(lái)解答這類(lèi)問(wèn)題。注意,這些設(shè)備都不是專(zhuān)用于Linux

8、的,但都具有嵌入式系統(tǒng)的普遍特征。 </p><p>  從歷史上看,嵌入式系統(tǒng)的界定已經(jīng)成為一個(gè)巨大的,有爭(zhēng)議的灰色地帶。許多激烈的討論已經(jīng)涉及到某一特定系統(tǒng)是不是“嵌入式” -尤其是在各方自由酗酒和大量的怪胎參加。我即將論述的這些屬性特點(diǎn)肯定不能讓所有人都滿(mǎn)意,但它是一個(gè)通則,也足以明確區(qū)分所有的嵌入式系統(tǒng),更加全面的描述是沒(méi)有必要的。 </p><p>  這五個(gè)嵌入式系統(tǒng)通常都有的

9、屬性是: </p><p><b>  ?無(wú)盤(pán)啟動(dòng)和儲(chǔ)存 </b></p><p><b>  ?無(wú)BIOS </b></p><p>  ?空間占用和運(yùn)行內(nèi)存有限 </p><p><b>  ?內(nèi)存管理 </b></p><p>  ?針對(duì)少量特定的

10、應(yīng)用 </p><p>  當(dāng)你第一次啟動(dòng)和運(yùn)行嵌入式系統(tǒng)時(shí)自舉是第一個(gè)需要解決的問(wèn)題。當(dāng)給硬件供電時(shí)首先會(huì)發(fā)生什么事?那些只關(guān)注桌面電腦系統(tǒng)的用戶(hù)和開(kāi)發(fā)者很少考慮在嵌入式系統(tǒng)中至關(guān)重要的議題。 </p><p>  大多數(shù)嵌入式系統(tǒng)都是從非硬盤(pán)類(lèi)媒體啟動(dòng)的。這些媒體可能是Flash存儲(chǔ)器,或是讀/寫(xiě)或只讀存儲(chǔ)器如EEPROM。另外,這種設(shè)備可能不是從內(nèi)部存儲(chǔ)介質(zhì)上啟動(dòng)的,而是在啟動(dòng)時(shí)從網(wǎng)

11、絡(luò)上下載操作系統(tǒng)映像。內(nèi)存可以在系統(tǒng)運(yùn)行時(shí)存儲(chǔ)數(shù)據(jù),非易失性存儲(chǔ)器如Flash存儲(chǔ)器可在系統(tǒng)關(guān)機(jī)時(shí)存儲(chǔ)數(shù)據(jù)。 </p><p>  嵌入式系統(tǒng)通常不使用磁盤(pán)類(lèi)存儲(chǔ)器,原因是硬盤(pán)驅(qū)動(dòng)器的能耗和速度方面不符合要求。與Flash存儲(chǔ)器相比硬盤(pán)需要消耗更多的能源,速度也很慢 。在經(jīng)濟(jì)上,在每字節(jié)成本上硬盤(pán)當(dāng)然比閃存低,但今天的嵌入式系統(tǒng)很少需要幾個(gè)GB的存儲(chǔ),只有幾百個(gè)字節(jié)的Flash存儲(chǔ)器是一個(gè)更好的解決辦法。 <

12、;/p><p>  基本輸入/輸出系統(tǒng)( BIOS )是電腦中一個(gè)重要的軟件,盡管它被大多數(shù)人所忽略。它的作用是初始化PC的內(nèi)置硬件,并提供基本的硬件操作手段。一個(gè)典型的桌面操作系統(tǒng),包括Linux ,是建立在BIOS之上的,需要充分利用它。在嵌入式系統(tǒng)中你沒(méi)有奢侈的BIOS,在操作系統(tǒng)內(nèi)核啟動(dòng)運(yùn)行之前,你必須手動(dòng)初始化你的硬件到一個(gè)可以運(yùn)行的狀態(tài)。</p><p>  它似乎不是一個(gè)大問(wèn)題。

13、很少有嵌入式硬件平臺(tái)會(huì)擁有一個(gè)和PC一樣復(fù)雜的主板架構(gòu),它們通常更容易配置。通常硬件制造商們都會(huì)提供示例代碼讓你能很快適應(yīng)并讓系統(tǒng)啟動(dòng)和運(yùn)行起來(lái)。 </p><p>  正如我們前面提到的,嵌入式系統(tǒng)并不需要目前大多數(shù)臺(tái)式機(jī)那樣的大容量?jī)?nèi)存和存儲(chǔ)器。一些嵌入式系統(tǒng)只需要幾百字節(jié)的RAM和ROM就能運(yùn)行 ,最大不超過(guò)幾兆字節(jié)。這與一個(gè)擁有看似無(wú)限資源的桌面系統(tǒng)相去甚遠(yuǎn),也是一個(gè)程序員從桌面系統(tǒng)過(guò)渡到嵌入式系統(tǒng)最大的

14、絆腳石。 </p><p>  內(nèi)存管理是嵌入式系統(tǒng)另一個(gè)巨大的區(qū)別。由于儲(chǔ)存要求嚴(yán)格,而且沒(méi)有存放交換文件通常需要的虛擬內(nèi)存系統(tǒng)。此外,嵌入式系統(tǒng)上運(yùn)行的各種微處理器,其中一些不具備虛擬內(nèi)存所必須的內(nèi)存管理單元。</p><p>  另外,值得注意的是,嵌入式Linux可同時(shí)滿(mǎn)足這些要求。任何Linux系統(tǒng)都可以在編譯操作系統(tǒng)映像的時(shí)候?qū)⑻摂M內(nèi)存大小設(shè)置為0來(lái)消除交換文件。此外, 改良后

15、的Linux系統(tǒng)不需要MMU 。 uCLinux操作系統(tǒng)運(yùn)行在多種32位微處理器上,它沒(méi)有MMU并且只使用物理內(nèi)存處理。 </p><p>  最后,嵌入式系統(tǒng)通常是針對(duì)一系列專(zhuān)門(mén)任務(wù)而設(shè)計(jì)的。他們可能沒(méi)有任何用戶(hù)界面,只擁有幾個(gè)指示燈。用戶(hù)無(wú)法安裝和運(yùn)行除了定制軟件以外的任何東西,該系統(tǒng)的最初目的只是為了運(yùn)行這幾個(gè)特定的軟件。與之對(duì)比的是桌面計(jì)算機(jī)系統(tǒng),用戶(hù)通??梢园惭b和運(yùn)行的自定義軟件包,并能完成系統(tǒng)設(shè)計(jì)者從

16、來(lái)沒(méi)有考慮過(guò)的任務(wù)。 </p><p>  很明顯我們不能忘了實(shí)時(shí)性這方面的問(wèn)題。雖然在世界上這是一個(gè)熱門(mén)的話(huà)題,但是對(duì)嵌入式系統(tǒng)來(lái)說(shuō)它并不是一個(gè)普遍的要求。許多嵌入式系統(tǒng)沒(méi)有任何硬件或軟件上的實(shí)時(shí)要求,是能完全滿(mǎn)足大部分用戶(hù)的操作系統(tǒng)。嵌入式Linux有實(shí)時(shí)子系統(tǒng)的選項(xiàng),我們將在下面的章節(jié)里討論。 </p><p>  嵌入式Linux詳情 </p><p>  

17、在未來(lái)數(shù)節(jié),我們將在六個(gè)具體領(lǐng)域里討論嵌入式Linux的細(xì)節(jié)。這些領(lǐng)域涵蓋了Linux在嵌入式系統(tǒng)中的各個(gè)方面的作用。目標(biāo)是解決系統(tǒng)從規(guī)約到維修的整個(gè)生命周期內(nèi)各個(gè)階段的問(wèn)題。其中的一些問(wèn)題,如經(jīng)濟(jì)性和技術(shù)支持,在整個(gè)系統(tǒng)開(kāi)發(fā)過(guò)程中,是非技術(shù)性的卻又很重要的問(wèn)題, </p><p><b>  配置 </b></p><p>  能夠針對(duì)特定設(shè)備定制操作系統(tǒng)是嵌入式系

18、統(tǒng)一個(gè)非常重要的特征。你一定不想你的系統(tǒng)映像中包含一個(gè)你不需要的幾兆字節(jié)的圖形用戶(hù)界面支持代碼。將內(nèi)核裁剪到能夠滿(mǎn)足所有需求的盡可能小的體積,這將是每一個(gè)設(shè)計(jì)師在硬件能夠啟動(dòng)和運(yùn)行以后所要面臨的第一個(gè)任務(wù),它將是一個(gè)非常艱難的任務(wù)。 </p><p>  配置嵌入式Linux系統(tǒng)與配置桌面Linux系統(tǒng)并無(wú)太大的區(qū)別。系統(tǒng)構(gòu)建過(guò)程中使用簡(jiǎn)單的文本文件來(lái)選擇包含的組件。安裝模塊用于在系統(tǒng)啟動(dòng)時(shí)裝載所選子系統(tǒng)。還可以

19、在運(yùn)行時(shí)動(dòng)態(tài)加載和卸載模塊,來(lái)定制必要的可選組件。 </p><p>  這種靈活的配置方式對(duì)嵌入式系統(tǒng)是非常有益的。它不僅可以讓你動(dòng)態(tài)地添加和刪除可選組件,也可以讓你做部分更新。把系統(tǒng)分成幾個(gè)可單獨(dú)加載的模塊,而不是單一模塊,這樣就可以在不需要改變整體映像的情況下升級(jí)或添加新的模塊。特別是在你的設(shè)備連接到網(wǎng)絡(luò)時(shí),它能進(jìn)行遠(yuǎn)程更新。 </p><p>  Linux安裝模塊有一個(gè)缺點(diǎn),它有

20、潛在的穩(wěn)定性問(wèn)題。由于模塊是動(dòng)態(tài)整合到Linux內(nèi)核,他們能充分利用操作系統(tǒng)的資源卻不能獲得內(nèi)存保護(hù)。對(duì)于沒(méi)有MMU硬件的設(shè)備這不是問(wèn)題。此外,由于系統(tǒng)是一個(gè)閉合環(huán)路,為了更容易維護(hù)系統(tǒng)的完整性,用戶(hù)不能在空閑時(shí)安裝新的模塊。 </p><p><b>  實(shí)時(shí)性</b></p><p>  關(guān)于“實(shí)時(shí)性”有很多說(shuō)法,所以我會(huì)在描述Linux的實(shí)時(shí)功能之前對(duì)它進(jìn)行定義

21、。關(guān)于“實(shí)時(shí)”我的理解是在確定的時(shí)間界限內(nèi)執(zhí)行一個(gè)中斷和相應(yīng)的中斷服務(wù)程序。其他,如上下文切換時(shí)間和系統(tǒng)時(shí)鐘粒度,與之相關(guān),但不是核心問(wèn)題。 </p><p>  一般情況下,實(shí)時(shí)的性可分為兩大類(lèi):硬實(shí)時(shí)和軟實(shí)時(shí)。硬實(shí)時(shí)意味著遲到的響應(yīng)是錯(cuò)誤的響應(yīng)。如果系統(tǒng)不在規(guī)定時(shí)間內(nèi)響應(yīng)中斷,那么在可預(yù)見(jiàn)的時(shí)間內(nèi)就有可能發(fā)生災(zāi)難性的事情。軟實(shí)時(shí),另一種說(shuō)法就是響應(yīng)遲到不會(huì)有任何可怕的后果,但只有在確定的時(shí)間內(nèi)響應(yīng)中斷才能獲得

22、最佳性能。重要的是要記住,雖然實(shí)際數(shù)字是很重要的,但實(shí)時(shí)性的特征,實(shí)際上更多的是關(guān)于一種行為與原始速度的對(duì)比。 </p><p>  最基礎(chǔ)的Linux內(nèi)核不是實(shí)時(shí)的。不能保證在確定的時(shí)間內(nèi)處理中斷請(qǐng)求,延遲有可能會(huì)很長(zhǎng),這取決于中斷發(fā)生時(shí)系統(tǒng)的負(fù)載情況。RTLinux是為具有硬實(shí)時(shí)特性硬件而設(shè)計(jì)的Linux內(nèi)核。 </p><p>  RTLinux是由新墨西哥技術(shù)學(xué)院的Michael

23、Barabanov和Victor Yodaiken于1997年2月最先發(fā)布,它不是一個(gè)單獨(dú)的,修改后的Linux內(nèi)核版本。在通盤(pán)考慮所有可能之后,它被認(rèn)為是維護(hù)性和兼容性方面的噩夢(mèng)。RTLinux被設(shè)計(jì)成一個(gè)小的、獨(dú)立的實(shí)時(shí)內(nèi)核,以及一套用于替換Linux內(nèi)核的例程,啟用和禁用中斷的模塊。 RTLinux的還提供了一個(gè)API ,允許用戶(hù)在實(shí)時(shí)內(nèi)核里創(chuàng)建任務(wù),并可以通過(guò)FIFOs或共享內(nèi)存的方法與Linux內(nèi)核里的進(jìn)程通信。 </p

24、><p>  圖1描述了系統(tǒng)是如何工作的 。當(dāng)Linux內(nèi)核調(diào)用CLI或者STI時(shí)RTLinux會(huì)禁止啟動(dòng)中斷,這些中斷請(qǐng)求被傳送到RTLinux的一個(gè)進(jìn)程中并記住目前Linux的中斷狀態(tài)。當(dāng)中斷發(fā)生時(shí),他們總是由RTLinux的內(nèi)核接手,然后傳遞給Linux內(nèi)核,如果Linux內(nèi)核不處理則中斷啟用。這允許RTLinux在沒(méi)有Linux內(nèi)核阻礙的情況下能一直對(duì)每個(gè)中斷都作出響應(yīng)。這也使得Linux內(nèi)核無(wú)法處理嵌套中斷

25、的問(wèn)題得到解決,因?yàn)镽TLinux總是最先看到中斷并確保內(nèi)核不會(huì)重復(fù)進(jìn)入內(nèi)核。</p><p>  RTLinux的并非是這個(gè)競(jìng)技場(chǎng)里唯一的成員。實(shí)時(shí)應(yīng)用程序接口( RTAI )采取了類(lèi)似的做法擴(kuò)展現(xiàn)有的Linux內(nèi)核的實(shí)時(shí)功能。他們有幾個(gè)不屬于RTLinux也沒(méi)有廣泛普及的特點(diǎn),如定期定時(shí)器。有傳言說(shuō)這兩個(gè)產(chǎn)品將會(huì)在未來(lái)的某個(gè)版本里合二為一。 </p><p>  RTLinux和RTA

26、I目前也有一些功能存在問(wèn)題。首先,很顯然這些功能特性都是后來(lái)加上去的,而不是作為固有的組成部分而設(shè)計(jì)的。雖然RTLinux很好地完成了它預(yù)定的目標(biāo),但它往往只是有益于某些類(lèi)別的應(yīng)用,如數(shù)據(jù)采集,而不是更普遍適用。另一個(gè)問(wèn)題是,RTLinux無(wú)法解決優(yōu)先級(jí)倒置這一問(wèn)題,可能會(huì)造成嚴(yán)重的錯(cuò)誤,這種錯(cuò)誤很難復(fù)制和跟蹤。 </p><p>  圖1 :基于模塊化設(shè)計(jì)的RTLinux </p><p&g

27、t;<b>  圖形用戶(hù)界面 </b></p><p>  隨著臺(tái)式機(jī)電腦已經(jīng)越來(lái)越依賴(lài)于GUIs ,而不是基于文本格式的接口,許多嵌入式系統(tǒng)也已擁有了圖形用戶(hù)界面。一個(gè)擁有GUI的嵌入式系統(tǒng)可能會(huì)有多種不同的選擇,包括低分辨率液晶顯示器,可選的VGA輸出端口,或一個(gè)完全集成的屏幕,不管是縱向或橫向的。盡管與桌面GUIs的概念類(lèi)似 ,嵌入式系統(tǒng)還是有自己獨(dú)特的要求的,如內(nèi)核體積。 </

28、p><p>  Linux操作系統(tǒng)在GUIs領(lǐng)域一直受到市場(chǎng)分散的傷害。雖然在X –Window基本上成為了事實(shí)標(biāo)準(zhǔn),但仍然有許多流行的競(jìng)爭(zhēng)對(duì)手包括Win32 API的模擬器和仿Windows 95界面 。嵌入式系統(tǒng)當(dāng)然是免費(fèi)使用這些針對(duì)臺(tái)式機(jī)的系統(tǒng),但也有一些產(chǎn)品專(zhuān)門(mén)針對(duì)特殊需求的嵌入式系統(tǒng)。 </p><p>  Lineo系統(tǒng)是嵌入式Linux的一個(gè)發(fā)行版,它提供增強(qiáng)功能和商業(yè)支持。他們

29、提供一個(gè)自定義工具包用來(lái)建立一個(gè)嵌入式GUI 。 Microwindows和NanoGUI是兩個(gè)公共開(kāi)源項(xiàng)目,它們共同提供了一個(gè)在Linux系統(tǒng)上使用的免費(fèi)的Win32 API仿真程序庫(kù)。當(dāng)然,還有其他的選擇,這些只是冰山的一角。 </p><p>  許多嵌入式設(shè)備在提供GUI時(shí),選擇一種不同的路線(xiàn)。由于如今網(wǎng)絡(luò)和Internet連接是如此普遍,許多系統(tǒng)都包含Web服務(wù),并通過(guò)HTML格式提供用戶(hù)界面。這使用戶(hù)

30、可以在任何地點(diǎn)任何平臺(tái)上都能通過(guò)網(wǎng)頁(yè)瀏覽器遠(yuǎn)程訪(fǎng)問(wèn)設(shè)備。還有,不管設(shè)備的大小和形狀都只有很少的要求,因?yàn)樗鼪](méi)有顯示器。 </p><p><b>  開(kāi)發(fā)工具支持 </b></p><p>  說(shuō)到開(kāi)發(fā)工具,嵌入式Linux開(kāi)發(fā)商可以說(shuō)是兩全其美。他們不僅可以使用與桌面系統(tǒng)相同的GNU工具包,他們還可以使用相同的硬件調(diào)試工具,那些它們一直在用的工具。您不必更換您的示波

31、器或邏輯分析儀因?yàn)槟闱袚Q到了嵌入式Linux 。 </p><p>  GNU包含了編譯器,調(diào)試器,匯編程序和鏈接程序,能夠支持各種各樣的微處理器,是軟件開(kāi)源精神一個(gè)最好的證明。他們不僅是經(jīng)過(guò)時(shí)間考驗(yàn)的,并且是免費(fèi)的,還提供源代碼,也就是說(shuō),如果你想移植到一個(gè)新的處理器,你可以自由地執(zhí)行它支持的尚未被使用過(guò)的編譯器。很少有其他嵌入式操作系統(tǒng)可以做到這一點(diǎn),它只需要一點(diǎn)調(diào)試程序的時(shí)間,而不需要預(yù)先付款。 </

32、p><p>  稍微有點(diǎn)阻礙的是,大部分GNU調(diào)試器是基于文本格式的,以靈活的運(yùn)行在不同架構(gòu)的平臺(tái)上。此外,已經(jīng)有許多人找到了GNU內(nèi)核調(diào)試器的漏洞,并且它很難使用,特別令人沮喪的是在開(kāi)發(fā)嵌入式系統(tǒng)設(shè)備驅(qū)動(dòng)程序上這一點(diǎn)是非常普遍的。對(duì)于uCLinux操作系統(tǒng)的用戶(hù)來(lái)說(shuō),另外一個(gè)區(qū)別在于它采用了一種特殊的可執(zhí)行文件格式。由于沒(méi)有虛擬內(nèi)存,可執(zhí)行程序不能遷移地址,所有的支線(xiàn)都必須使用浮動(dòng)地址代碼( PIC )來(lái)完成。如果

33、你的處理器不支持PIC功能,這就需要一個(gè)專(zhuān)門(mén)的連接器和修改調(diào)試工具。 </p><p><b>  經(jīng)濟(jì)因素 </b></p><p>  一般而言L(fǎng)inux最吸引人的地方就在于它是免費(fèi)的。雖然你可以買(mǎi)到眾多公司發(fā)行的具有更友好的安裝界面或很多附加功能的版本,但是Linux的核心代碼是可以免費(fèi)下載的,并很容易得到GNU再次發(fā)行許可證。無(wú)論是面向臺(tái)式機(jī)還是嵌入式Linu

34、x這都是可以的,但在嵌入式方面還有一些額外的問(wèn)題需要考慮。 </p><p>  再次分發(fā)你的機(jī)器上的嵌入式Linux是否需要支付版權(quán)費(fèi),這取決于你使用的Linux系統(tǒng)的供應(yīng)商。Lineo’s Embedix的版權(quán)費(fèi)是隨著不同的操作系統(tǒng)功能和額外的軟件包包括GUI工具包和Web瀏覽器而變化的。另外,不包含在正常Linux發(fā)行版內(nèi)的某些特殊硬件設(shè)備的驅(qū)動(dòng)程序,可從許多公司購(gòu)買(mǎi)到。當(dāng)然你可以自己編寫(xiě)驅(qū)動(dòng)程序,但是可以

35、利用已有資源并縮短產(chǎn)品上市時(shí)間總是會(huì)使你在“自己編寫(xiě)或購(gòu)買(mǎi)”選擇了更快捷方式??紤]到上述因素,您的嵌入式Linux產(chǎn)品可能在支付了版權(quán)費(fèi)之后還是得不到完全的自由。 </p><p>  近來(lái),另一個(gè)令人關(guān)注的問(wèn)題已經(jīng)在Linux社區(qū)引發(fā)了很多討論,實(shí)際上RTLinux是有專(zhuān)利的。雖然RTLinux的創(chuàng)作者已經(jīng)指出,不會(huì)有基于專(zhuān)利上的版權(quán)費(fèi)的要求,在國(guó)際上更詳細(xì)的Linux書(shū)面協(xié)議仍在制訂之中。 </p>

36、;<p><b>  技術(shù)支持選項(xiàng) </b></p><p>  一個(gè)讓人煩惱的大問(wèn)題是,使用不同公司發(fā)行的操作系統(tǒng)的技術(shù)支持怎么辦。當(dāng)發(fā)現(xiàn)BUG和機(jī)器出現(xiàn)故障的時(shí)候,你是否會(huì)因?yàn)闆](méi)有一個(gè)集中的組織機(jī)構(gòu)可以求助而感到被冷落?我認(rèn)為,這種情況嵌入式Linux實(shí)際上比商業(yè)系統(tǒng)要好.</p><p>  首先是因?yàn)榍度胧絃inux的開(kāi)源性質(zhì)使得它在這方面的狀態(tài)

37、更健康。當(dāng)您要跟蹤一個(gè)討厭的錯(cuò)誤的時(shí)候一個(gè)不可取代的步驟是通過(guò)源代碼。只有極少數(shù)的商業(yè)操作系統(tǒng)會(huì)向開(kāi)發(fā)者開(kāi)放源代碼,更少有商業(yè)操作系統(tǒng)會(huì)允許在代碼上修改或添加新功能。第二個(gè)原因,在Linux技術(shù)支持上,有更多合格的有經(jīng)驗(yàn)的人來(lái)回答問(wèn)題。新聞?dòng)懻摻M和電子郵件討論已經(jīng)向廣大的桌面Linux程序員和同樣多的嵌入式Linux程序員證明了它寶貴的價(jià)值。隨著Linux在臺(tái)式機(jī)和嵌入式系統(tǒng)的日益普及,開(kāi)發(fā)商們所能得到的合同和收益都會(huì)隨之而增長(zhǎng)。 &l

38、t;/p><p>  當(dāng)然,如果你確實(shí)想要舒適的一個(gè)單一的名稱(chēng),運(yùn)行時(shí)的事情出差錯(cuò),嵌入式Linux已經(jīng)如此。 Lineo對(duì)用戶(hù)提供定制版Linux的技術(shù)支持,還有幾個(gè)公司同樣如此。每個(gè)改寫(xiě)版都有自己的適應(yīng)過(guò)程,但它肯定能讓你的Linux更加符合標(biāo)準(zhǔn)更加穩(wěn)定。當(dāng)然,這一切都不是免費(fèi)的。商業(yè)公司提供的定制版Linux 通常具有較高的購(gòu)買(mǎi)成本,并且可能需要為其中的部分組件支付使用費(fèi)。 </p><p&

39、gt;  比較Windows CE和嵌入式Linux </p><p>  系統(tǒng)體積和性能是關(guān)鍵,重要的是要了解嵌入式Linux是怎樣成為一個(gè)競(jìng)爭(zhēng)者的。表1比較了嵌入式Linux與Windows CE的實(shí)時(shí)性和內(nèi)核體積以及內(nèi)存占用。 </p><p>  表1 :比較Windows CE和嵌入式Linux </p><p>  在這個(gè)比較中, “中斷延遲”是指從中斷

40、發(fā)生到系統(tǒng)響應(yīng)中斷的時(shí)間。此外,兩種系統(tǒng)都使用能支持全部網(wǎng)絡(luò)功能的最小內(nèi)核。我對(duì)內(nèi)核大小的差別并不感到驚訝,使我驚訝的是剛剛發(fā)布的Windows CE 3.0在實(shí)時(shí)性方面明顯表現(xiàn)的更好。 </p><p><b>  全球市場(chǎng)快覽 </b></p><p>  當(dāng)然,這一切都是為了創(chuàng)造一些有趣的和有用的東西。在本節(jié)中我們將看到兩個(gè)商用設(shè)備和一個(gè)研究設(shè)備,都是基于嵌入式

41、Linux 系統(tǒng)的。 </p><p>  光學(xué)遙測(cè)系統(tǒng)是本章討論的三個(gè)系統(tǒng)中體積最大,使用范圍最模糊不清的一個(gè)。它擁有一個(gè)810MB的硬盤(pán),大容量?jī)?nèi)存并且重達(dá)48鎊,光學(xué)遙測(cè)系統(tǒng)有四個(gè)串行端口,一個(gè)以太網(wǎng)接口,兩個(gè)65Kb/s的同步接口和60個(gè)輸入/輸出端口用來(lái)控制和發(fā)送報(bào)警信號(hào)。這個(gè)系統(tǒng)是嵌入式Linux在高端應(yīng)用的一個(gè)很好的例子,它能夠支持多種硬件和通信方式。 </p><p>  

42、NETtel系列網(wǎng)絡(luò)路由器是一種體積比OTS小很多的基于Linux的設(shè)備。 使用一個(gè)90MHz 的ColdFire處理器運(yùn)行uCLinux的NETtel系列路由器支持多達(dá)2個(gè)串行端口, 2個(gè)以太網(wǎng)端口, 1個(gè)PCI插槽,以及2個(gè)USB端口的各種配置并使用LED顯示狀態(tài)信息。該產(chǎn)品只需要1MB的閃存和4MB的內(nèi)存就能啟動(dòng)。ColdFire處理器是沒(méi)有MMU的;因此,該系統(tǒng)不使用虛擬存儲(chǔ)尋址。該產(chǎn)品的創(chuàng)作者完全意想不到的是,作為一個(gè)有趣的例

43、子它已經(jīng)向人們展示了如何使用的LED顯示驅(qū)動(dòng)A / D轉(zhuǎn)換器并且將路由器變成了MP3播放器。他絕對(duì)是個(gè)天才! </p><p>  康柏Itsy的體積比NETtel路由器小得多,但功能卻強(qiáng)大得多。只有一張信用卡大小,大約有一節(jié)9伏電池那么厚, Itsy使用一枚30-200MHz的StrongArm SA – 1100處理器并且擁有32MB的內(nèi)存和32 MB的Flash ROM 。它還包括一個(gè)串口, USB和IrD

44、A端口與外部世界溝通。Itsy一個(gè)主要的研究方向是降低能耗,最新的型號(hào)已經(jīng)可以使用USB端口對(duì)內(nèi)部的電池進(jìn)行充電。 </p><p>  當(dāng)然這一切都是運(yùn)行在嵌入式Linux上的。以v2.0.30版內(nèi)核為基礎(chǔ),研究人員又增加了新的硬件驅(qū)動(dòng)程序和一個(gè)專(zhuān)門(mén)的閃存文件系統(tǒng)。此外還在內(nèi)核里添加特殊的存儲(chǔ)和電源管理功能,這是開(kāi)源操作系統(tǒng)辦不到的。 Itsy目前只是一個(gè)研究項(xiàng)目,并且在可預(yù)見(jiàn)的時(shí)間內(nèi)也不可能上市。雖然如此,我

45、仍然希望這會(huì)成為不遠(yuǎn)的將來(lái)康柏公司推出的新產(chǎn)品的基礎(chǔ)。</p><p>  這僅僅是嵌入式Linux設(shè)備的冰山一角??磥?lái),它將稱(chēng)為www.linuxdevices.com上一個(gè)新的熱門(mén)話(huà)題,比過(guò)去的更加有趣和獨(dú)特。 </p><p><b>  結(jié)論 </b></p><p>  總的來(lái)說(shuō),我認(rèn)為嵌入式Linux的前途是光明的。能夠運(yùn)行于多種不

46、同的處理器,不需要MMU和極低的成本是重要的因素。此外,其受歡迎程度似乎是迅速上升,并且眾多開(kāi)發(fā)商都在迅速積累經(jīng)驗(yàn)。</p><p>  當(dāng)然每朵玫瑰得周?chē)疾紳M(mǎn)荊棘。嵌入式Linux的市場(chǎng)是非常分散的,比起其他操作系統(tǒng),它需要花費(fèi)更多的精力去尋找最適合你設(shè)計(jì)的配置。32位微處理器和極小的體積地需求對(duì)一些嵌入式設(shè)備來(lái)說(shuō)還是太大了。雖然嵌入式Linux似乎在適應(yīng)設(shè)備的數(shù)量方面打得贏了Windows CE,但這兩者之

47、間是有很大的重疊的。</p><p>  嵌入式系統(tǒng)市場(chǎng)在過(guò)去幾年里成爆炸式增長(zhǎng),Linux無(wú)疑是這個(gè)市場(chǎng)的核心??粗适侣归_(kāi)是件很有意思的事情。</p><p>  An Overview of Embedded Linux</p><p>  Andrew Tucker</p><p>  ast@halcyon.com</p&

48、gt;<p><b>  CSE 585</b></p><p>  March 2000</p><p><b>  Abstract</b></p><p>  In this paper I will discuss the current state of embedded Linux. I’ll

49、 outline what Linux is and what characteristics make an embedded Linux system different from a desktop system. I will then discuss details in six key areas: </p><p>  Configurability</p><p>  

50、Real time performance</p><p>  Graphical user interfaces</p><p>  Development tool support</p><p>  Economic considerations</p><p>  Technical support options</p>

51、<p>  Following that I will compare the real time performance, OS image size, and RAM requirements of embedded Linux with that of Windows CE. I’ll then discuss some retail devices based on embedded Linux and con

52、clude with some general observations on embedded Linux.</p><p><b>  Intro</b></p><p>  Unless you’ve been living under a rock for the last few years, you’ve no doubt heard of Linux.

53、 Touted as the open source competitor to Microsoft’s Windows NT, it has been much hype and discussion in both the software development and system administration communities, as well as mainstream non-technical news media

54、. </p><p>  When first introduced, Linux was specifically targeted to desktop PCs running an Intel 80x86 or compatible microprocessor. Linus Torvalds, the inventor of Linux, was quoted as saying “Linux wil

55、l never run on anything but a PC with an IDE hard disk since that is all that I have”. Looking back from the state of things here in the 21st century, the quote is quite humorous. Today Linux has been ported to many di

56、fferent microprocessors and runs on platforms that don’t include any hard disk at all.</p><p>  In the next section I’ll look at what distinguishes an embedded Linux system from its desktop cousins. I will

57、 then discuss the features of embedded Linux in six areas: configurability, real time performance, GUIs, development tool support, economic considerations, and technical support options. I will then compare the size and

58、 real time characteristics of an embedded Linux kernel with that of a similarly configured Windows CE kernel. </p><p>  I will then discuss three interesting devices based on embedded Linux: an optical tele

59、metry system, the NetTel router, and the IBM handheld computer research project “itsy”. I’ll then wrap up with some general observations on the usefulness and future of embedded Linux.</p><p>  What makes L

60、inux ‘embedded’?</p><p>  So far in this paper I’ve used the term “embedded Linux”, but I haven’t really defined what it means. If a system is booted from media other than a hard disk does that make it an e

61、mbedded system? Are all systems booted from hard disks not considered an embedded system? This section will lay out five distinguishing properties of an embedded system that answers these type of questions. Note that

62、none of these properties are specific to Linux, but are general characteristics of all embedded sys</p><p>  Historically, the qualifications of embedded systems have been a large, controversial gray area. M

63、any a heated discussion has involved whether or not a given system is “embedded” – especially at parties with free alcohol and a high number of geek attendees. The properties I will describe shortly will certainly not s

64、atisfy everyone. They are general rules of thumb, and are neither necessary nor sufficient to unambiguously distinguish all embedded systems.</p><p>  The five properties that are generally found in an embe

65、dded system are:</p><p>  Diskless media for booting and storage</p><p>  Lack of BIOS</p><p>  Footprint and runtime memory restrictions</p><p>  Memory management<

66、/p><p>  Dedication to a small number of tasks</p><p>  Bootstrapping is one the first areas that has to be addressed when you are first getting an embedded system up and running. What happens fir

67、st when the hardware is powered up? Users and developers who have only dealt with desktop computer systems rarely, if ever, have to think about this topic but it is of the utmost importance in an embedded system. </

68、p><p>  Most embedded systems boot from some type of diskless media. The media can be something like Flash memory, which is read/write, or read only memory such as an EEPROM. Alternatively, the device may not

69、 boot from internal media at all, but instead download the operating system image over a network when it is powered up. RAM can be used to store data while the system is running, but a persistent, non-volatile media suc

70、h as Flash needs to be available to store data while the system is powered off</p><p>  The reason that embedded systems typically don’t use disk based media such as a hard drive is for mostly for power cons

71、umption and speed reasons. Hard disks consume a lot more watts that are required to drive Flash memory and are significantly slower. Economically, hard disks certainly beat Flash in a cost per byte comparison but embed

72、ded systems rarely needs the multi-gigabyte storage of today’s hard drives and a few hundred kilobytes of Flash is a much better solution.</p><p>  The Basic Input/Output System (BIOS) of a PC is a significa

73、nt piece of software that goes completely unnoticed by most people. Its job in life is to initialize the built-in hardware in the PC and provide primitive operations for communicating with that hardware. A typical desk

74、top OS, including Linux, is built on top of the BIOS and takes full advantage of it. In an embedded system you don’t have the luxury of BIOS and you must manually initialize your hardware to a workable state before the

75、O</p><p>  This isn’t as big a problem as it seems. Very few embedded hardware platforms are as complex as the motherboard architecture of a typical PC and they are usually much easier to configure. Many t

76、imes the manufacturer of the hardware provides sample code that quickly is adapted to get the system up and running.</p><p>  As we mentioned earlier, embedded systems don’t need the huge amounts of memory a

77、nd storage that is present on most desktop. Some embedded systems run with only a few hundred bytes of RAM and ROM, and most don’t utilize more than a few megabytes. This is a far cry from the seemingly infinite resour

78、ces of desktop systems, and is one of the biggest stumbling blocks for desktop programmers transitioning to embedded systems.</p><p>  Memory management is another big area that distinguishes an embedded sys

79、tem. Since storage requirements are tight, there’s no place for the swap file usually required by a virtual memory system. Additionally, embedded systems run on a variety of microprocessors, some of which do not have t

80、he memory management unit necessary to implement virtual memory. </p><p>  As a side note, it is interesting to note that embedded Linux meets both these requirements. Any Linux system can eliminate the sw

81、ap file requirement by setting the size to zero when the operating system image is built. Additionally, Linux has been modified so that it does not require an MMU. uCLinux runs on a variety 32-bit microprocessors that

82、do not have an MMU and use only physical memory addressing.</p><p>  Finally, an embedded system typically is tailored to perform a dedicated series of tasks. They may not have any user interface other than

83、 a few indicator lights. The user cannot install and run any custom software other than that which the system was originally designed to run. This is in direct contrast to a desktop computer system where users routinel

84、y install and run custom software packages and can accomplish tasks never considered by the system designers.</p><p>  Conspicuously missing from this list is real time performance. Although it is a hot top

85、ic in the world of embedded systems it is not a general requirement. Many embedded systems have no hard or soft real-time requirements and are perfectly satisfied with general, nondeterministic performance of the OS. E

86、mbedded Linux does have the option of using a real-time subsystem, as we’ll discuss in a later section.</p><p>  Details of embedded Linux</p><p>  In the next few sections we will look at the d

87、etails of embedded Linux in six specific areas. The areas were chosen specifically to try to cover the end-to-end usefulness of Linux in an embedded system. The goal was to address issues that would come up in all stag

88、es of the system lifecycle, from specification to maintenance. Some of the issues, such as economics and technical support, are decidedly non-technical but nonetheless important in the overall development of a system.&l

89、t;/p><p>  Configurability</p><p>  Being able to tailor the OS image to the particular needs of a device is a very important feature in embedded systems. You don’t want to include megabytes of co

90、de that for GUI support if your system doesn’t require it. Whittling the kernel down to the smallest possible size that has all the support you need is one of the first tasks a designer faces after the hardware is up an

91、d running, and it can be a very difficult one.</p><p>  Configuring an embedded Linux system is not much different from configuring a desktop Linux system. The OS build process uses a simple text file to se

92、lect which components to include. The installable module support is then used to load the selected subsystems at boot time. It is also possible to dynamically load and unload modules during runtime, which allows you to

93、 tailor the system to use optional components only when necessary.</p><p>  This configuration ability is very useful in an embedded system. Not only does it allow you to dynamically add and remove support

94、for optional pieces, it also allows you to do partial updates. By splitting your system into several individually loadable modules instead of a single monolithic one, you can upgrade or add a new module without having t

95、o change the entire image. This is especially useful if your device is connected to a network that can be used for remote updates.</p><p>  One drawback of Linux installable modules is the potential for sta

96、bility problems. Since modules are dynamically integrated into the Linux kernel, they have full access to the OS and do not reap the benefits of memory protection. This is less of a problem on devices whose hardware do

97、esn’t have an MMU. Also, since the system is in a closed loop the user can’t install new modules at their leisure and it’s easier to maintain the integrity of the system.</p><p>  Real Time Performance</

98、p><p>  The term “real time” is bandied about a lot, so I’ll define what it implies in this paper before I describe the real time features of Linux. By “real time” I mean the ability to put deterministic bound

99、s on the time the elapses between an interrupt occurring and the corresponding interrupt service routine to execute. Other items, such as context switch time and system clock granularity, are related, but not central, i

100、ssues.</p><p>  In general, real time performance can be grouped into two broad categories: hard real time and soft real time. Hard real time means that a late answer is a wrong answer. If the system does

101、not respond to an interrupt within a fixed, predictable amount of time disastrous things can happen. Soft real time, on the other hand, doesn’t have any dire consequences associated with a late answer but relies on dete

溫馨提示

  • 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶(hù)所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 眾賞文庫(kù)僅提供信息存儲(chǔ)空間,僅對(duì)用戶(hù)上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶(hù)上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶(hù)因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

評(píng)論

0/150

提交評(píng)論