[Tomato] 在RT-N16 JFFS 上安裝 optware
作者: Aven 日期: 2011-07-22 00:19
RT-N16 刷完韌體還想玩什麼新鮮玩意? 32MB Flash 刷完 8MB 的韌體,千萬別浪費剩餘 24MB 空間,透過啟動 JFFS 功能,不必插 USB 隨身碟,馬上多出 24MB 空間可以使用。不過這空間大小有些尷尬,放不了幾個檔案,但何不拿來安裝 optware 呢? 底下就來介紹在 JFFS 空間裡安裝 optware。
開啟 JFFS 功能
刷完 Tomato 後,JFFS 功能預設是關閉的,所以必須到 路由器管理 => JFFS 裡手動開啟,並且執行 格式化/清除 功能,系統會進行格式化 JFFS 空間,如下圖。
指定 opt 路徑
optware 預設路徑已固定使用 /opt 路徑,所以當我們格式化 JFFS 空間後,必須把 /opt 指向 JFFS 路徑,這樣日後安裝 optware 套件,才會寫入 JFFS。
root@rt-n16:/# mkdir /jffs/opt
root@rt-n16:/# mount -o bind /jffs/opt /opt
設定自動掛載
在 路由器管理 => JFFS => 掛載後執行 欄位裡填入 mount -o bind /jffs/opt /opt
下次重啟時,系統會自動掛載進來。
下載安裝 optware script
這裡參考 TomatoUSB 上的教程下載 optware-install.sh
root@rt-n16:/# wget http://tomatousb.org/local--files/tut:optware-installation/optware-install.sh -O - | tr -d '
' > /tmp/optware-install.sh
Connecting to tomatousb.org (74.86.234.146:80)
Connecting to tomatousb.wdfiles.com (67.228.37.26:80) - 100% |***********************************************************************************************************************| 2826 --:--:-- ETA
變更程可執行檔
root@rt-n16:/# chmod +x /tmp/optware-install.sh
開始安裝 optware 環境
root@rt-n16:/# sh /tmp/optware-install.sh Checking system config ... Using 192.168.2.10 as the default gateway. Using the following nameserver(s): nameserver 127.0.0.1 Warning: local nameserver is different than gateway! Check config or enter: sed -i s/192.168.*/192.168.2.10/ /tmp/resolv.conf and try again, or wait to see if your download continues anyway. Installing package uclibc-opt_0.9.28-13_mipsel.ipk ... Some newer versions of DD-WRT does not show download progress bar, so just be patient - or check STATUS -> BANDWIDTH tab for download activity in your routers Web-GUI, and then still wait a minute or two. Connecting to ipkg.nslu2-linux.org (140.211.169.169:80) uclibc-opt_0.9.28-13 100% |***********************************************************************************************************************| 832k 00:00:00 ETA Updating /opt/etc/ld.so.cache Installing package ipkg-opt_0.99.163-10_mipsel.ipk ... Some newer versions of DD-WRT does not show download progress bar, so just be patient - or check STATUS -> BANDWIDTH tab for download activity in your routers Web-GUI, and then still wait a minute or two. Connecting to ipkg.nslu2-linux.org (140.211.169.169:80) ipkg-opt_0.99.163-10 100% |***********************************************************************************************************************| 75822 00:00:00 ETA Downloading http://ipkg.nslu2-linux.org/feeds/optware/ddwrt/cross/stable/Packages.gz Connecting to ipkg.nslu2-linux.org (140.211.169.169:80) Packages.gz 100% |***********************************************************************************************************************| 118k 00:00:00 ETA Inflating http://ipkg.nslu2-linux.org/feeds/optware/ddwrt/cross/stable/Packages.gz Updated list of available packages in /opt/lib/ipkg/lists/optware Successfully terminated. Installing uclibc-opt (0.9.28-13) to /opt/... Downloading http://ipkg.nslu2-linux.org/feeds/optware/ddwrt/cross/stable/uclibc-opt_0.9.28-13_mipsel.ipk Connecting to ipkg.nslu2-linux.org (140.211.169.169:80) uclibc-opt_0.9.28-13 100% |***********************************************************************************************************************| 832k 00:00:00 ETA package uclibc-opt suggests installing ipkg-opt Configuring uclibc-opt Updating /opt/etc/ld.so.cache Successfully terminated. Installing ipkg-opt (0.99.163-10) to /opt/... Downloading http://ipkg.nslu2-linux.org/feeds/optware/ddwrt/cross/stable/ipkg-opt_0.99.163-10_mipsel.ipk Connecting to ipkg.nslu2-linux.org (140.211.169.169:80) ipkg-opt_0.99.163-10 100% |***********************************************************************************************************************| 75822 00:00:00 ETA Configuring ipkg-opt Successfully terminated.
檢視使用空間
還有 22.1MB 的空間可以使用
root@rt-n16:/# df -h
Filesystem Size Used Available Use% Mounted on
/dev/root 6.5M 6.5M 0 100% /
tmpfs 62.1M 152.0K 61.9M 0% /tmp
devfs 62.1M 0 62.1M 0% /dev
/dev/mtdblock3 24.3M 2.2M 22.1M 9% /opt
/dev/mtdblock3 24.3M 2.2M 22.1M 9% /jffs
/dev/mtdblock3 24.3M 2.2M 22.1M 9% /opt
更新
root@rt-n16:/# ipkg update
Downloading http://ipkg.nslu2-linux.org/feeds/optware/ddwrt/cross/stable/Packages.gz
Inflating http://ipkg.nslu2-linux.org/feeds/optware/ddwrt/cross/stable/Packages.gz
Updated list of available packages in /opt/lib/ipkg/lists/optware
Successfully terminated.
root@rt-n16:/# ipkg upgrade
Nothing to be done Successfully terminated.
檢視已安裝套件
root@rt-n16:/# ipkg list_installed
ipkg-opt - 0.99.163-10 - The Itsy Package Manager
uclibc-opt - 0.9.28-13 - micro C library for embedded Linux systems
Successfully terminated.
經過上面幾個步驟,RT-N16 可以很快速的建立起 optware 環境,馬上與上千種套件接軌,有機會我們再介紹 optware 套件的應用,若您迫不及待,可以前往WL-500g 系列改機文件索引參考如何安裝設定套件。
底下將 optware 安裝於 JFFS 的優缺點,做個整理:
優點:
1.無須外接 USB 隨身碟,無須分割磁區,即可快速打造 optware 環境。
2.因 JFFS 使用 Flash 記憶體,可視為小容量隨身碟,關機後資料依然存在。
缺點:
1.日後若韌體有升級後,上述流程還要重做一次。
2.JFFS 容量寸土寸金,僅適合安裝常用小巧的工具套件,請斟酌使用。
3.因 JFFS 使用 Flash 記憶體,故不建議在上面執行大量存取磁碟的套件,以免折損 Flash 記憶體使用壽命。
參考:
http://ahui.us/index.php/2010/08/tomato … a-optware/
http://tomatousb.org/doc:optware
延伸閱讀:
WL-500g 系列改機文件索引
https://www.nikesneakersoutlet.us.org/
https://www.louboutinheelsshoes.us.com/
https://www.nikefactory-outlet.us.org/
https://www.nikefreernrun.us.com/
https://www.airjordans.com.co/
https://www.asicsshoesoutlet.us.com/
https://www.airjordanshoesretros.us.com/
https://www.nikeoutletstores.us.org/
https://www.menwomenshoes.us/
https://www.nike-runningshoes.us/
https://www.jordan4s.us.com/
https://www.nikeoutletonline-store.us.com/
https://www.pandoranecklaces.us/
https://www.jordansretro13.us.com/
https://www.cheapnikesshoes.us.com/
https://www.nike-presto.us.com/
https://www.ultra-boosts.us.com/
https://www.jewelrycharmsrings.uk.com/
https://www.nikereactuptempo.us.com/
h