创建仓库,生成 Packages.gz
git clone git://git.yoctoproject.org/opkg-utils
cd opkg-utils
./opkg-make-index /home/xxx/repo/packages/ > /homexxx/repo/packages/Packages
cd /home/xxx/repo/packages
gzip Packages
SSH 连接路由器后执行命令
查看 OPKG 源配置:
cat /etc/opkg.conf
编辑源:
vim /etc/opkg.conf
更新包:
opkg update
查看已安装包:
opkg list-installed
查询目标包:
opkg list | grep luci-theme-nonnicolor
安装目标包:
opkg install luci-theme-nonnicolor
删除目标包:
opkg remove
也可使用我的源地址
x86:
src/gz openwrt_core https://nonnix.cn/repo/all/targets/x86/64/packages
src/gz openwrt_base https://nonnix.cn/repo/all/packages/x86_64/base
src/gz openwrt_luci https://nonnix.cn/repo/all/packages/x86_64/luci
src/gz openwrt_packages https://nonnix.cn/repo/all/packages/x86_64/packages
src/gz openwrt_routing https://nonnix.cn/repo/all/packages/x86_64/routing
src/gz openwrt_telephony https://nonnix.cn/repo/all/packages/x86_64/telephony
MT7621A:
src/gz openwrt_core https://nonnix.cn/repo/all/targets/ramips/mt7621/packages
src/gz openwrt_base https://nonnix.cn/repo/all/packages/mipsel_24kc/base
src/gz openwrt_luci https://nonnix.cn/repo/all/packages/mipsel_24kc/luci
src/gz openwrt_packages https://nonnix.cn/repo/all/packages/mipsel_24kc/packages
src/gz openwrt_routing https://nonnix.cn/repo/all/packages/mipsel_24kc/routing
src/gz openwrt_telephony https://nonnix.cn/repo/all/packages/mipsel_24kc/telephony
经常会有依赖错误问题,可以尝试把各种包都放到opkg软件源里,方便安装依赖
在 /etc/opkg.d 里的每个文件都加入一行指令:
find /etc/opkg.d/ -name '*.conf' | xargs sed -i '2isrc/gz openwrtio https://nonnix.com/repo/packages/x86_64/packages'