1,在14.07版本測試下,首先必須保證U盤文件系統格式爲ext3/ext4這樣的。html
也就是須要支持符號連接。vim
否則在安裝的時候會報錯。less
這個報錯不是每次安裝都會產生,只有在須要安裝lib的時候,測試
由於須要軟鏈接U盤上的lib到系統的lib path 下面纔會報錯。spa
若是隻是安裝軟件,仍是能夠用的。orm
2,須要設定環境變量,PATH和LD_LIBRARY_PATH,htm
位置在 /etc/profile文件裏。blog
原先狀況是沒有 LD_LIBRARY_PATH 項的,須要增長上去。ci
注意:修改環境變量後,須要 source /etc/profile 使其生效get
修改後/etc/profile內容:紅色爲新增長內容
#!/bin/sh
[ -f /etc/banner ] && cat /etc/banner
export LD_LIBRARY_PATH=/mnt/sda1/packages/usr/lib
export PATH=/usr/bin:/usr/sbin:/bin:/sbin:/mnt/sda1/packages/usr/bin:/mnt/sda1/packages/usr/sbin
export HOME=$(grep -e "^${USER:-root}:" /etc/passwd | cut -d ":" -f 6)
export HOME=${HOME:-/root}
export PS1='\u@\h:\w\$ '
[ -x /bin/more ] || alias more=less
[ -x /usr/bin/vim ] && alias vi=vim || alias vim=vi
[ -z "$KSH_VERSION" -o \! -s /etc/mkshrc ] || . /etc/mkshrc
[ -x /usr/bin/arp ] || arp() { cat /proc/net/arp; }
[ -x /usr/bin/ldd ] || ldd() { LD_TRACE_LOADED_OBJECTS=1 $*; }
3,修改 /etc/opkg.conf文件
追加dest usb定義
echo dest usb /mnt/sda2/packages/ >> /etc/opkg.conf
修改該配置文件後,使用 opkg update 使其更新生效
修改後文件內容:紅色爲新增長內容
dest root /
dest ram /tmp
lists_dir ext /var/opkg-lists
option overlay_root /overlay
src/gz barrier_breaker_base http://downloads.openwrt.org/barrier_breaker/14.07/ar71xx/generic/packages/base
src/gz barrier_breaker_luci http://downloads.openwrt.org/barrier_breaker/14.07/ar71xx/generic/packages/luci
src/gz barrier_breaker_management http://downloads.openwrt.org/barrier_breaker/14.07/ar71xx/generic/packages/management
src/gz barrier_breaker_oldpackages http://downloads.openwrt.org/barrier_breaker/14.07/ar71xx/generic/packages/oldpackages
src/gz barrier_breaker_packages http://downloads.openwrt.org/barrier_breaker/14.07/ar71xx/generic/packages/packages
src/gz barrier_breaker_routing http://downloads.openwrt.org/barrier_breaker/14.07/ar71xx/generic/packages/routing
src/gz barrier_breaker_telephony http://downloads.openwrt.org/barrier_breaker/14.07/ar71xx/generic/packages/telephony
dest usb /mnt/sda1/packages/
4,使用說明
opkg install -dest usb madplay
-dest usb: 指定安裝目錄
網上參考的一個例子,至少我用來安裝madplay是不行的。