BusyBox

维基百科,自由的百科全书
跳转至: 导航搜索
BusyBox
Screenshot
BusyBox的截图
開發者 Erik Andersen[1], Rob Landley[2], Denys Vlasenko[3]
初始版本 1999年11月4日 (1999-11-04)[4]
作業系統 Unix-like
類型 Independent SUSp XCU implementation

BusyBox 是一個遵循GPL、以自由軟體形式發行的應用程式,由於執行檔尺寸小、並使用 Linux內核,這使得它非常適合使用於嵌入式系统。此外,由於BusyBox功能強大,因此有些人將 BusyBox 稱為 Linux 工具裡的瑞士軍刀。[5]

目录

歷史 [编辑]

BusyBox最初是由 布魯斯·斐倫斯1996年為Debian GNU/Linux安裝盤編寫的, 其原始構想是希望在一張軟碟上能放入一個開機系統,以作為急救盤和安裝盤。後來它變成了崁入式Linux設備和系統和Linux發行版安裝程序的實質標準,因為每個Linux執行檔需要數Kb的空間,而整合兩百多個程式的BusyBox可以節省大量空間。

Enrique Zanardi負責維護BusyBox並專注在Debian 启动软盘英语Boot disk安裝系統的需求直到 1998年,再由負責 Linux路由器计划英语Linux Router Project的 Dave Cinege 接手。Cinege 做了一些增加:建立了一個模組化的Build環境、轉移 BusyBox's 目標到一般高階的 嵌入式系統。當 1999年 LRP 開發進度趨緩時,Lineo, Inc.的 Erik Andersen 在1999年開始正式地接手這個專案繼續維護它到2006年三月。在這段期間,Linux的 嵌入式系統的市場明顯地成長,連帶使BusyBox 轉趨成熟,同時擴展二者的使用群和功能。

Denis Vlasenko英语丹尼斯·弗拉先科是目前BusyBox的維護者。

功能 [编辑]

BusyBox可以被自訂化以提供一個超過兩百種功能的子集。它可以提供多數詳列在單一UNIX規範裡的功能,以及許多使用者會想在 Linux 系統上看到的功能。BusyBox 使用ash英语ash shell[6][7]在 BusyBox的網站上可以找到所有功能的列表。[8]

單一可執行檔 [编辑]

典型的電腦程式對每個應用程式都有個別的二進制執行檔)檔案。BusyBox 是一單一二進制程式,這是許多應用程式的集合,在適當參數的特定方法下,每個都可透過以不同的名稱(每個不同的名字藉由符号链接硬鏈接英语hard link支援[9])呼叫單一 BusyBox 二進制程式來存取。

BusyBox 受惠於單一可執行檔策略,如此一來省去了每個執行檔必需有的檔頭 (特別是 ELF的可執行檔), 這也讓 Busybox 不需要 函式庫 便可達成程式碼共用。這個技巧與 FreeBSD 中的 crunchgen[10] 指令相似。與使用 crunchgen 建立的合併工具程式不同在於,Busybox 只提供每個工具程式的簡化版 (如: ls 指令不提供排序功能)。

共享通用的程式碼,並以程式大小最佳化為目標,使以 BusyBox 建構的系統所需要的空間遠小於使用對應的完整工具所需要的空間。研究 [11] 比較了GNU, Busybox, asmutilsPerl 實作的標準 Unix 指令發現特定狀況下,BusyBox 的執行速度會優於其他實作,但並非總是如此。

範例 [编辑]

BusyBox 所包含的程式只需要簡單的將名稱附加在第一個參數即可執行:

/bin/busybox ls

更常見的作法是,這些指令會以連結 (使用 硬連結 或者 符號連結) 至 BusyBox 可執行檔,BusyBox 會偵測其被連結時的名稱,並執行對應的指令。舉例來說,只要將 /bin/ls 連結到 /bin/busybox,即可執行

/bin/ls

命令 [编辑]

註釋 [编辑]

  1. ^ Erik Andersen's Homepage
  2. ^ Active Projects, Rob Landley's website
  3. ^ Denys Vlasenko, BusyBox maintainer
  4. ^ http://www.softwarefreedom.org/resources/2009/busybox-complaint-2009-12-14.pdf
  5. ^ http://www.busybox.net/downloads/BusyBox.html The self-dubbed slogan for 'The Swiss Army Knife of Embedded Linux' source. The slogan is right under the header.
  6. ^ http://busybox.net/cgi-bin/viewcvs.cgi/trunk/busybox/shell/Config.in?rev=11083 The 'ash' shell adds about 60k in the default configuration and is the most complete and most pedantically correct shell included with busybox. This shell is actually a derivative of the Debian 'dash' shell (by Herbert Xu), which was created by porting the 'ash' shell(written by Kenneth Almquist) from NetBSD.
  7. ^ ash variants
  8. ^ BusyBox - The Swiss Army Knife of Embedded Linux
  9. ^ http://www-128.ibm.com/developerworks/library/l-busybox/index.html
  10. ^ crunchgen man page at freebsd.org
  11. ^ Doug Thayer, Keith Miller. Four UNIX Programs in Four UNIX Collections: Seeking Consistency in an Open Source Icon. Proceedings of Midwest Instruction and Computing Symposium. University of Minnesota, Morris. 16–17 April 2004. 

參看 [编辑]

  • toybox - complete implementation of the standard Linux command line utilities, with minimal external dependencies. by Rob Landley.

外部連結 [编辑]

Wikibooks-logo.svg
您可以在維基教科書中查找此百科条目的相關電子教程: