如何編譯OpenWrt

(!文末,附加人生如戲寫的編譯OPENWRT的TXT內容,可直接跳至末尾,有例子)
  Openwrt 官方正式的發行版是已編譯好了的映像文件(後綴名bin或trx、trx2),此映像文件可從Openwrt官方網站的下載頁面中輕鬆獲取到,連接地址爲 OpenWrt官方網站。這些編譯好的映像文件是基於默認的配置設置,且只針對受支持的平臺或設備的。因此,爲什麼要打造一個自己的映像文件,理由有以下四點: 
您想擁有一個個性化的配置OpenWrt(彰顯個性,在朋友圈子裏顯擺顯擺,開個玩笑);
您想在實驗性的平臺上測試OpenWrt;
您參與測試或參與開發OpenWrt的工作;
或者,最簡單的目的就是爲了保持自己的Openwrt爲最新版本;
  若想實現上述目的,其實很簡單,按下述文字即可成功編譯出一個您的Openwrt來。 
準備工作
 在開始編譯Openwrt之前需要您做些準備工作;與其他編譯過程一樣,類似的編譯工具和編譯環境是必不可少的: 
 一個構建OpenWrt映像的系統平臺,簡單說就是準備一個操作系統(比如Ubuntu、Debian等);
 確保安裝了所需的依賴關係庫, (在debian系統中就是安裝各種需要的軟件包)
 OpenWrt源代碼副本
 首先, 開機登陸到支持編譯Openwrt的操作系統(廢話了)。實體機或者虛擬機(Vmware 或者 Qemu)裏的操作系統都行,這裏推薦使用Linux系統。 bsd和mac osx系統也可以編,但不推薦,且未驗證是否可編譯成功。下文假定您使用的是Debian操作系統,使用 apt-get 來管理包. 替代的選擇是 Ubuntu (分支 Kubuntu, Xubuntu 等即可)。
 第二步, 就是安裝所需要的各種軟件包, 包括編譯器,解壓工具,特定的庫等. 這些工作可以簡單的通過鍵入以下命令 (通常需要root 或者是 sudo 權限),以root權限安裝下列軟件包(可能並不完整,會有提示,提示缺少即裝就可以了):
 32位(x86)請執行下列命令: 
# apt-get install build-essential asciidoc binutils bzip2 gawk gettext \
  git libncurses5-dev libz-dev patch unzip zlib1g-dev
 
 64位(x86_64)請執行下列命令(多裝了哪些庫或軟件包呢?請您仔細看一看哦): 
# apt-get install build-essential asciidoc binutils bzip2 gawk gettext \
  git libncurses5-dev libz-dev patch unzip zlib1g-dev ia32-libs \
  lib32gcc1 libc6-dev-i386
 
 參考 本列表中 所列的編譯環境所需要軟件包或庫。
 某些依賴的爲庫或軟件包也許操作系統中已經安裝過,此時apt-get會作出提示(提示您忽略或重新安裝的),別緊張,放輕鬆些,編譯Openwrt不會像編譯DD-WRT那樣難的(至少本人是體會到了編譯DD-WRT的難)。
 最後下載一份完整的 Openwrt 源碼到編譯環境中。關於Openwrt的源代碼下載,途徑有二,一是通過 svn ,一是通過 git,建議使用 svn ,因爲Openwrt主要以 svn 來維護Openwrt系統的版本。另外,請注意Openwrt中不同的分支版本,一個是用得較多的開發快照,俗稱 trunk,二是穩定版,俗稱 backfire。 
安裝Subversion
 若你想通過svn下載源代碼,你需安裝 Subversion。Subversion,或稱SVN, 是OpenWrt的project中用來控制版本的系統,它非常類似的 CVS的界面和使用條款。 執行下述命令即可安裝SVN,很容易的: 
# apt-get install subversion
 
 Subversion安裝完畢,通過SVN命令可獲取得到一份OpenWrt純淨源代碼。您還得創建一個目錄以便存放獲取得到的Openwrt源代碼,要獲取源代碼你還得輸入subversion命令來獲取 (svn裏這種操作稱之爲'check out') 。命令很簡單的,繼續看下去就能見到了,彆着急,耐心點兒。 
編譯流程
 編譯專屬於您的設備的特定Openwrt固件以一下五個步驟: 
 通過Subversion命令獲得源代碼;
 更新(或安裝) package feeds[package feeds無法確切翻譯,待譯吧);
 創建一個默認配置以檢查編譯環境是否搭建好了 (假如需要的話);
 用Menuconfig來配置即將編譯生成的固件映像文件的配置項;
 最後開始編譯固件;
下載源代碼
 最後,下載一份完整的OpenWrt源代碼。你可選擇: 
 下載穩定發行版,或
 下載開發版 (俗稱"trunk"版)。
使用發行版的源碼
 截止本文時, Openwrt公開發行的穩定版爲 OpenWrt 10.03 "backfire"。此版本是最穩定的,但也許不包括最新更新的補丁或最新編寫的出的新功能。
 下述代碼即舉例說明了通過svn從brandkfire獲得backfire源代碼(此版本意思是從trunk分支的補丁也在backfire版本中了,即包含修復補丁): 
# mkdir OpenWrt/
# cd OpenWrt/
# svn co svn://svn.openwrt.org/openwrt/branches/backfire
 
註解: 上述svn命令將在當前目錄創建一個 OpenWrt/backfire/ 子目錄,此目錄包含此命令獲取到的源代碼。
 您也可以通過下述命令,下載不含修復補丁的backfire的原版源碼: 
# svn co svn://svn.openwrt.org/openwrt/tags/backfire_10.03
 
使用開發版源代碼
 當前的開發版本分支(trunk)已包含最新的實驗補丁。此分支或許還突破了Openwrt原來所不支持的硬件設備的限制哦,驚喜的同時也有風險存在。因此,編譯trunk版,慎之~ 
# mkdir OpenWrt/
# cd OpenWrt/
# svn co svn://svn.openwrt.org/openwrt/trunk/
 
 更多詳細資料詳見: https://dev.openwrt.org/wiki/GetSource
跟進並更新源代碼
 因Openwrt的源代碼隨時都會變動,故此命令將確保您所獲取得到的源碼的最新性。下述假設您用的是backfire版本的源碼: 
## Here, backfire is the directory name of the current release branch you're tracking
# cd OpenWrt/backfire/
# svn up
 
 'svn up' 命令用於更新SVN上更新了,但本地尚未更新的這部分源代碼(本人實踐證明此命令會將本地源碼與SVN上的源碼先比較,若SVN有更新纔會下載更新的部分,很實用的一個命令)。如果未指定目標路徑,則此命令將更新當前目錄及當前目錄的子目錄內的源碼。 
Feeds下載
 Feeds即爲包含到你的OpenWrt環境中的額外軟件包的索引之類的。(feed譯名很多,莫衷一是,至2008年底爲止,還沒有一個十分通用而備受認可的中文譯名;所以此文當中我們用英文feed來稱呼)。 最主要的Feeds有以下三個: 
 'packages' - 路由的基本功能,
 'LuCI' - OpenWrt默認的GUI(WEB管理界面), 及
 'Xwrt' - 其他的GUI。
 一般情況,你至少需要含 'packages' 和 'LuCI'兩個Feeds。
 下載完feeds之後, (爲編譯OpenWrt的recipies額外的預定義包) 您可以檢查哪些feeds要包括在內。編輯在你的編譯環境的根目錄下的'feeds.conf.default'文件。
 然後使用下列命令開始下載(注:可能你需要先運行cd trunk進入trunk目錄才能成功執行下列命令): 
# ./scripts/feeds update -a
 
 在此之後,下載的軟件包需要安裝。亦即指的下邊的命令啦。若路過下邊的install命令則後續make menuconfig將無法成功執行!(注:可能你需要先運行cd trunk進入trunk目錄才能成功執行下列命令): 
# ./scripts/feeds install -a
 
 只需編輯Feeds的配置文件或運行更新命令,即可很方便地更新或添加新的實驗性的packages到源碼中並編譯到OpenWrt固件去。
 注意:請老壇友及舊的新聞組成員們注意了,這一步取代了創建符號鏈接symlinks的老辦法哦。 
更新Feeds
 諸如此類源碼,你得定期更新Feeds。 通過如上相同的命令: 
# ./scripts/feeds update -a
# ./scripts/feeds install -a
 
 注意:若你清楚地知道你不需添加新的packages到menuconfig中去,那麼你可在更新Feeds時跳過這一步。 
生成配置
 You may not have to make configration always after updating sources and feeds, but making it ensures that all packages from source and feeds are correctly included in your build configuration. 
Defconfig
 下一步是檢查編譯環境,若可進行編譯則生成默認配置: 
# make defconfig
 
 若defconfig回顯提示缺少軟件包或編譯庫等依賴,則按提示安裝所缺軟件包或庫等即可,不難的,細心點就行。 
Menuconfig
 menuconfig是一個基於文本的工具,它處理選擇的目標(需要還是不需要)、編譯生成軟件包(openwrt下是IPKG格式)以及內核選項(編譯成模塊還是內核)等等 
# make menuconfig
 
 在你離開並保存配置文件(默認都是.config)後,將自動配置依賴關係,讓你可以着手編譯更新的固件。
 大衆可通過'menuconfig'這一簡單的圖形化的配置環境,非常輕鬆地編譯出專屬您本人的OpenWrt固件。
 可以用'menuconfig',以開發的意圖來編譯OpenWrt的固件,爲自己(個人)創造一個結構簡單但是功能強大的環境。(上句實在難翻譯,只能意譯。並且也請大家都學習下編譯OP固件,讓以OP固件盈利的人丟掉那骯髒的飯碗!)
 Menuconfig或多或少有些難以說明的地方,即使是最專業的配置,也可以尋求幫助並加以解決。 需要你指定何種目標平臺,要包含的package軟件包和內核模塊等均需要你指定,配置標準的過程中會包括修改: 
 目標平臺(即路由器何種架構,BCM呢還是AR均可選擇)
 選擇要包含的package軟件包
 構建系統設置
 內核模塊
 Target system is selected from the extensive list of supported platforms, with the numerous target profiles – ranging from specific devices to generic profiles, all depending on the particular device at hand. Package selection has the option of either 'selecting all package', which might be un-practical in certain situation, or relying on the default set of packages will be adequate or make an individual selection. It is here needed to mention that some package combinations might break the build process, so it can take some experimentation before the expected result is reached. Added to this, the OpenWrt developers are themselves only maintaining a smaller set of packages – which includes all default packages – but, the feeds-script makes it very simple to handle a locally maintained set of packages and integrate them in the build-process.
 假如你需要LuCI, 要到Administration 菜單裏,在LuCI組件的子菜單下, 並選擇: luci-admin-core, luci-admin-full, and luci-admin-mini組件包。
 假如你不需要PPP,你可到Network菜單下取消對它的選擇,以便編譯時不包含此組件。
 Menuconfig用法: 確保這些組件包是以 '*'星號標記而不是 'M'標記。 
 如果你是以星號 '*'標記該組件包, 則該組件包將編譯進最終生成的OpenWrt固件中。 
 如果你僅以 'M'標記該組件包, 則該組件包將不會編譯進最終生成的OpenWrt固件中。
 The final step before the process of compiling the intended image(s) is to exit 'menuconfig' – this also includes the option to save a specific configuration or load an already existing, and pre-configured, version.
 Exit and save. 
Source Mirrors
 The 'Build system settings' include some efficient options for changing package locations which makes it easy to handle a local package set: 
 Local mirror for source packages
 Download folder
 In the case of the first option, you simply enter a full URL to the web or ftp server on which the package sources are hosted. Download folder would in the same way be the path to a local folder on the build system (or network). If you have a web/ftp-server hosting the tarballs, the OpenWrt build system will try this one before trying to download from the location(s) mentioned in the Makefiles . Similar if a local 'download folder', residing on the build system, has been specified. The 'Kernel modules' option is required if you need specific (non-standard) drivers and so forth – this would typically be things like modules for USB or particular network interface drivers etc. 
編譯固件
 萬事具備,只欠東風,通過下面簡單的make命令來編譯: 
# make
 
在多核電腦中編譯
 具有多核CPU處理器的電腦進行編譯,使用下述參數可令編譯過程加速。 常規用法爲 <您cpu處理器的數目 + 1> – 例如使用3進程來編譯 (即雙核CPU), 命令及參數如下: 
# make -j 3
 
後臺編譯
 若你在這個系統內編譯OpenWrt的同時還處理其他,可以讓閒置的I/O及CPU來在後臺編譯固件 (雙核CPU): 
# ionice -c 3 nice -n 20 make -j 2
 
編譯簡單的基本的軟件包
 當你爲OpenWrt開發或打包軟件包,編譯簡單的基本的軟件包可以很輕易地編譯該軟件包 (例如, 軟件包cups): 
# make package/cups/compile V=99
 
 一個在Feeds裏的軟件包大約是這樣子的: 
# make package/feeds/packages/ndyndns/compile V=99
 
編譯錯誤
 如果因某種不知道的原因而編譯失敗,下面有種簡單的方法來得知編譯到底錯在哪裏了: 
# make V=99 2>&1 |tee build.log |grep -i error
 
 上述編譯命令意爲:V99參數,將出錯信息保存在build.log,生成輸出完整詳細的副本(with stdout piped to stderr),只有在屏幕上顯示的錯誤。
 舉例說明: 
# ionice -c 3 nice -n 20 make -j 2 V=99 CONFIG_DEBUG_SECTION_MISMATCH=y 2>&1 \
  |tee build.log |egrep -i '(warn|error)'
 
 The above saves a full verbose copy of the build output (with stdout piped to stderr) in build.log and outputs only warnings and errors while building using only background resources on a dual core CPU. 
一鍵編譯
 即使用腳本來編譯Openwrt固件。許多朋友編譯Openwrt是用的腳本來編譯的,詳見:https://forum.openwrt.org/viewtopic.php?id=28267 
生成的固件在哪
 編譯成功後所生成的固件文件位於bin目錄下,可用如下命令查看: 
# cd bin/
# ls */
 
清理
 編譯OpneWrt時你可能需要一個清潔乾淨的編譯環境。 以下操作有利用編譯工作: 
清潔
 清潔trunk/ 目錄,在編譯過程中使用“make clean”命令即可。 此命令將刪除bin目錄和build_dir目錄下的所有文件及文件夾。 
## See CAUTION below
# make clean
 
敬告: Make sure to move your compiled OpenWrt images to another location before issuing this command since it erases the contents of the "bin" directory (where the compiled OpenWrt images live). 
Dirclean
 If you want to clean in addition to the build directories also the cross-compile tools (in toolchain directory), use the 'dirclean' make, which does the same as 'clean' and also deletes 'staging_dir' and 'toolchain' contents. 'Dirclean' is your basic "Full clean" operation. 
## See CAUTION below
# make dirclean
 
CAUTION: Make sure to move your compiled OpenWrt images to another location before issuing this command. 
Distclean
 If complete cleaning of the build environment is required, then all it takes is 'make distclean'. It practically nukes everything you have compiled or configured and also deletes all downloaded feeds contents and package sources. Making distclean means quite a lot downloading afterwards, so it should not be used lightly. 'Dirclean' is enough for most cases. 
## See CAUTION below
# make distclean
 
CAUTION: In addition to all else, this will erase your build configuration (.config), your toolchain and all other sources. Use with care!
 There are numerous other functionalities in the OpenWrt build system, but the above should have covered some of the fundamentals. 
Installing OpenWrt
 In comparison to the actual building of the desired image(s), the installation of the OpenWrt image can sometimes be a little, or more, of a challenge. It can be as simple as using the tools supplied by the manufacturer of the hardware (web interface or recovery tools), over manually uploading a new firmware via tftp and rebooting, to doing extensive hardware modifications with the intent of enabling JTAG access. Though, generally installation is made possible via the bootloader (Redboot, Uboot etc.) or simple copying onto a CompactFlash-card – all depending on the specific device.
 See http://wiki.openwrt.org/doc/howto/installing for the specifics. 
固件編譯示例
 ———–幸福的分割線:隨文附上【人生如戲】寫的編譯OPENWRT的TXT—————————-
 前言:很多玩家都想自行編譯OP固件,但是很多教程都語焉不詳,本人綜合了其他教程做了點總結,這裏非常感謝以往發教程的玩家。編譯固件不需要什麼很深奧的知識,但是要求起碼能看懂英文,會使用SSH、WINSCP軟件,瞭解OP的那些功能是由哪個軟件包提供。
 一。安裝ubuntu,具體安裝流程可以百度谷歌,這裏不詳細描述。 桌面版、服務器版都可以,因爲都是命令行操作,推薦使用服務器版本(這裏需要注意的是一定要32位的系統,64位的系統也可以編譯,但是有些莫名其妙的問題,具體原因未知)。 服務器版本安裝時有個功能選項,選擇安裝SSH服務就可以了,其他功能完全可以不安裝,因爲用不到。 op官方不推薦虛擬機,但是本人用虛擬機也沒什麼大問題,有條件的還是用真實電腦來編譯吧。
 二。ubuntu下OP編譯環境需要安裝很多組件,很多教程都是一道命令一起安裝,其實這樣會有一些組件沒有裝上的,所以還是老實的一個一個裝吧。所有命令全部爲SSH登陸後操作。
 升級組件包
 sudo apt-get update
 安裝編譯需要的組件
 sudo apt-get install gcc
 sudo apt-get install g++
 sudo apt-get install binutils
 sudo apt-get install patch
 sudo apt-get install bzip2
 sudo apt-get install flex
 sudo apt-get install bison
 sudo apt-get install make
 sudo apt-get install autoconf
 sudo apt-get install gettext
 sudo apt-get install texinfo
 sudo apt-get install unzip
 sudo apt-get install sharutils
 sudo apt-get install subversion
 sudo apt-get install libncurses5-dev
 sudo apt-get install ncurses-term
 sudo apt-get install zlib1g-dev
 sudo apt-get install subversion
 sudo apt-get install git
 sudo apt-get install gawk
 sudo apt-get install asciidoc
 sudo apt-get install libz-dev
 每一行回車後都會馬上檢測安裝或升級那個組件,官方WIKI用的是單一條命令,本人分開了,因爲這樣更容易查看每一個組件的安裝是否成功。下載東西之前會有提示本次要下載多少M的東西,問是否的,按y然後回車讓它下載就行了。當中最後面的asciidoc組件是需要下載400多MB東西的,慢慢等了。
 三。開始編譯前做些必要的步驟 新建一個openwrt目錄
 mkdir openwrt
 注:WIKI中是OpenWrt,O和W是大寫,請WINDOWS用戶注意區分大小寫! 進入openwrt目錄
 cd openwrt
 下載官網源碼到本地
 svn checkout svn://svn.openwrt.org/openwrt/trunk
 添加trunk目錄權限
 sudo chmod -R 777 trunk
 四。編譯流程。 編譯完成的固件會保存在/openwrt/trunk/bin目錄下面,可用WINSCP登陸上去提取。
 進入trunk目錄
 cd openwrt/trunk
 更新最新源碼
 ./scripts/feeds update -a
 安裝最新源碼
 ./scripts/feeds install -a
 更新版本號
 svn up
 進入編譯組件包菜單
 make menuconfig
 恢復默認編譯環境
 make defconfig
 開始編譯
 make V=99
 編譯完成後清除之前的編譯作業(使用這個命令前,記得把編譯好的固件備份出來,不然會被刪除掉,切記)
 make clean
 其中make menuconfig會有一個編譯管理器,在裏面可以選擇型號、OP功能組件,需要用到方向鍵、回車鍵、空格鍵。方向鍵是移動光標,回車鍵是確認,空格鍵是選擇(在選項框按下空格鍵,*號是編譯進固件,M是編譯但是不編譯進固件)。
 1.選擇CPU型號
 Target System—–Atheros AR71xx/AR7240/AR913x/AR934x
 2.選擇路由型號
 Target Profile—-TP-LINK TL-MR3420 v1
 3.添加luci
 LuCI—>Collections—– <*> luci
 4.添加luci的中文語言包
 LuCI—>Translations—- <*> luci-i18n-chinese
 5.添加DDNS
 LuCI—>Applications —> <*>luci-app-ddns.
 6.添加USB掛載
 Base system —> <*>block-mount
 7.添加硬盤格式支持
 Kernel modules —> Filesystems —> <*> kmod-fs-ext4
 8.添加UTF8編碼
 Kernel modules —> Native Language Support —> <*> kmod-nls-utf8
 9.添加USB擴展支持
 Kernel modules —> USB Support —> <*> kmod-usb-storage-extras.
 110.添加自動掛載工具
 Utilities —> Filesystem —> <*> badblocks
 11.添加復位鍵支持
 Utilities —> <*> restorefactory
 12.添加一鍵開關無線
 Utilities —> <*> wifitoggle
 最簡單的,只需要選正面兩項,其餘默認即可: 1、 Target System—–選擇編譯類型
 2、 Target Profile—-選擇編譯路由型號
 添加功能時儘量依靠依賴包,比如添加ddns時,只需要在luci選項裏面選擇luci-app-ddns,編譯管理器會自動加上ddns-scripts及其他依賴庫文件。 
MR3420的4M固件編譯方法
 下面舉個簡單例子:
 編譯一個mr3420的固件
 1.Target System—–選擇Atheros AR71xx/AR7240/AR913x/AR934x
 2.Target Profile—-選擇TP-LINK TL-MR3420 v1
 3.LuCI—-選擇Collections—– <*> luci
 4.LuCI—-選擇Translations—-<*> luci-i18n-chinese
 5.Exit—-Yes
 6.開始編譯make V=99,最後會得到一個4M的帶中文luci的mr3420固件。 
MR3420的8M固件編譯方法
 五。進階設置。
 用WINSCP登陸
 1.在路徑 /trunk/tools/firmware-utils/src/mktplinkfw.c 這個文件裏邊有個“fw max len”,默認3c0000是4M的,請改成7c0000 (這一步把固件最大限制改成8M),如果是16mflash,請改成fc0000(最大限制改成16m)。
 2、修改target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr841n.c(找相應文件)
4M:
 41 .name = "u-boot",
 42 .offset = 0,
 43 .size = 0x020000,
 44 .mask_flags = MTD_WRITEABLE,
 45 }, {
 46 .name = "kernel",
 47 .offset = 0x020000,
 48 .size = 0x140000,
 49 }, {
 50 .name = "rootfs",
 51 .offset = 0x160000,
 52 .size = 0x290000,
 53 }, {
 54 .name = "art",
 55 .offset = 0x3f0000,
 56 .size = 0x010000,
 57 .mask_flags = MTD_WRITEABLE,
 58 }, {
 59 .name = "firmware",
 60 .offset = 0x020000,
 61 .size = 0x3d0000,
 62 }
 63 };
8M::
 41 .name = "u-boot",
 42 .offset = 0,
 43 .size = 0x020000,
 44 .mask_flags = MTD_WRITEABLE,
 45 }, {
 46 .name = "kernel",
 47 .offset = 0x020000,
 48 .size = 0x140000,
 49 }, {
 50 .name = "rootfs",
 51 .offset = 0x160000,
 52 .size = 0x690000,
 53 }, {
 54 .name = "art",
 55 .offset = 0x7f0000,
 56 .size = 0x010000,
 57 .mask_flags = MTD_WRITEABLE,
 58 }, {
 59 .name = "firmware",
 60 .offset = 0x020000,
 61 .size = 0x7d0000,
 62 }
 63 };
16M::
 41 .name = "u-boot",
 42 .offset = 0,
 43 .size = 0x020000,
 44 .mask_flags = MTD_WRITEABLE,
 45 }, {
 46 .name = "kernel",
 47 .offset = 0x020000,
 48 .size = 0x140000,
 49 }, {
 50 .name = "rootfs",
 51 .offset = 0x160000,
 52 .size = 0xe90000,
 53 }, {
 54 .name = "art",
 55 .offset = 0xff0000,
 56 .size = 0x010000,
 57 .mask_flags = MTD_WRITEABLE,
 58 }, {
 59 .name = "firmware",
 60 .offset = 0x020000,
 61 .size = 0xfd0000,
 62 }
 63 };
8M::
 0x000000000000-0x000000020000 : "u-boot"
 0x000000020000-0x000000160000 : "kernel"
 0x000000160000-0x0000007f0000 : "rootfs"
 0x000000620000-0x0000007f0000 : "rootfs_data"
 0x0000007f0000-0x000000800000 : "art"
 0x000000020000-0x0000007f0000 : "firmware"
4M::
 0x000000000000-0x000000020000 : "u-boot"
 0x000000020000-0x000000160000 : "kernel"
 0x000000160000-0x0000003f0000 : "rootfs"
 0x000000304000-0x0000003f0000 : "rootfs_data"
 0x0000003f0000-0x000000400000 : "art"
 0x000000020000-0x0000003f0000 : "firmware"
16M::
 0x000000000000-0x000000020000 : "u-boot"
 0x000000020000-0x000000160000 : "kernel"
 0x000000160000-0x000000ff0000 : "rootfs"
 0x000000380000-0x000000ff0000 : "rootfs_data"
 0x000000ff0000-0x000001000000 : "art"
 0x000000020000-0x000000ff0000 : "firmware"
 如想節省編譯時間可自行下載以下dl壓縮包,編譯時就不需要花時間在線下載了: 20110512新增:dl壓縮包(國內網速真是快呀) http://u.115.com/file/dnahsytg# dl.rar
 把原來的DL刪掉,複製過去。然後恢復默認編譯環境 make defconfig 需要連續幾個恢復: 進入編譯組件包菜單 make menuconfig 也要恢復默認 進入編譯組件包菜單 make menuconfig Reset to defaults
 然後繼續 make clean make defconfig
 全部恢復後再 ./scripts/feeds update -a 安裝最新源碼 ./scripts/feeds install -a 更新版本號 svn up 進入編譯組件包菜單 make menuconfig
 開始編譯 make V=99
發佈了3 篇原創文章 · 獲贊 2 · 訪問量 4萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章