openwrt不支持opkg的解決辦法

opkg是openwrt的插件安裝命令,類似Ubuntu上的apt-get或者centos上的yum。
好多采用openwrt系統的設備,最後都把opkg裁剪掉了,如果拿到一個設備又想用opkg安裝網絡上下載到的ipk包,應該怎麼辦呢?
其實也不是特別麻煩。
1 找到對應的openwrt版本。
openwrt的版本不多就這麼幾個

https://archive.openwrt.org/backfire/
https://archive.openwrt.org/attitude_adjustment/
https://archive.openwrt.org/barrier_breaker/
https://archive.openwrt.org/chaos_calmer/

後面的1407和1505版本算是用比較流行的。在1505之後,OP和lede合併了,出了兩個版本1701和1806,感興趣可以去看看

https://archive.openwrt.org/releases/

2 下載編譯。
不多說了,網上都是教程。
3 opkg移植。
其實就是拷貝,opkg編譯生成的路徑,我的是下面這個:

build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/opkg-unsigned/opkg-9c97d5ecd795709c8584e972bfdf3aee3a5b846d/ipkg-install/usr/bin

裏面的名字是這個opkg-cl,沒關係,拷貝的到設備的/bin/下重命名一下就好了。

4 opkg配置文件
需要在設備的/etc/下建立對應的配置文件:
opkg.conf

dest root /
dest ram /tmp
lists_dir ext /var/opkg-lists
option overlay_root /overlay

這樣就大功告成了。
如果想更新opkg的源,可以參考這個

https://blog.csdn.net/lixuande19871015/article/details/46814173
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章