1、复制opkg到小米路由的/data路径下。
下载地址:http://sangbo.pub/soft/opkg/opkg
2、修改/etc/opkg.conf
文件,替换为以下内容:
src/gz attitude_adjustment_base http://openwrt.sangbo.pub/barrier_breaker/14.07/ramips/mt7620a/packages/base
src/gz attitude_adjustment_packages http://openwrt.sangbo.pub/barrier_breaker/14.07/ramips/mt7620a/packages/packages/
src/gz attitude_adjustment_luci http://openwrt.sangbo.pub/barrier_breaker/14.07/ramips/mt7620a/packages/luci/
src/gz attitude_adjustment_management http://openwrt.sangbo.pub/barrier_breaker/14.07/ramips/mt7620a/packages/management/
src/gz attitude_adjustment_oldpackages http://openwrt.sangbo.pub/barrier_breaker/14.07/ramips/mt7620a/packages/oldpackages/
src/gz attitude_adjustment_routing http://openwrt.sangbo.pub/barrier_breaker/14.07/ramips/mt7620a/packages/routing/
src/gz openwrt_dist http://openwrt-dist.sourceforge.net/releases/ramips/packages
src/gz openwrt_dist_luci http://openwrt-dist.sourceforge.net/releases/luci/packages
dest root /data
dest ram /tmp
lists_dir ext /data/var/opkg-lists
option overlay_root /data
arch all 100
arch ramips 200
arch ramips_24kec 300
原地址可能是被河蟹了,自己代理了一下进行访问,源地址:https://downloads.openwrt.org/
下载地址:http://sangbo.pub/soft/opkg/opkg.conf
3、添加环境变量。修改/etc/profile
文件,修改export PATH为:
export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/data:/data/usr/sbin:/data/usr/bin
再这一行下面新添加一行:
export LD_LIBRARY_PATH=/data/usr/lib
4、-1重启(reboot)生效
或者
4、-2设置临时变量
PATH=$PATH:/data:/data/usr/bin:/data/usr/sbin
LD_LIBRARY_PATH=LD_LIBRARY_PATH:/data/usr/lib
5、更新opkg
opkg update
ps:如果提示错误,缺少libc*。这里需进行安装,注意保持libc为最新版本。
2 comments
不错,学习了。
头像测试