openwrt编译和开发过程中经常要添加自己的程序进去,一般都是放在package路径下,但是编译调试的时候每次都要make整个固件,特别麻烦,偶尔发现了有人说可以单独编译package下的程序,就像这样:
make package/xxxxx/compile V=99 

xxxxx就是你需要单独编译的程序。编译完成后去bin/ramips/packages里面找到对应的ipk,上传到板子,opkg install就可以了。

一、插件源码下载

1.锐捷

1
2
git clone https://github.com/KyleRicardo/MentoHUST-OpenWrt-ipk
git clone https://github.com/BoringCat/luci-app-mentohust.git

2.Rosy主题

1
git clone https://github.com/rosywrt/luci-theme-rosy.git

二、下载存放路径

1
/home/cheng/openwrt/lede/package

三、配置

1
make menuconfig

选中,但不编译进固件

1.锐捷

1
2
3
4
-> Network
-> Ruijie
<M> mentohust………………………………….. A Ruijie Client Daemon
-> LuCI

-> 3. Applications

1
<M> luci-app-mentohust…………………. MentoHUST 802.1X Client for LuCI

2.Rosy主题

1
-> LuCI

-> 4. Themes

1
<M> luci-theme-rosy……………………………………….. Rosy Theme

四、编译

1
2
3
make package/MentoHUST-OpenWrt-ipk/compile V=99
make package/luci-app-mentohust/compile V=99
make package/luci-theme-rosy/luci-theme-rosy/compile V=99

五、ipk生成路径

路径:

1
bin/packages/mipsel_24kc/base

文件名

1
2
3
mentohust_0.3.1-1_mipsel_24kc.ipk
luci-app-mentohust_1.1.-0_all.ipk
luci-theme-rosy_git-19.069.38477-5ed9705-1_all.ipk

六、上传ipk至路由器

清除原有密钥

1
ssh-keygen -f “/home/cheng/.ssh/known_hosts” -R 192.168.10.1

拷贝至路由器

1
2
3
scp mentohust_0.3.1-1_mipsel_24kc.ipk root@192.168.10.1:/tmp
scp luci-app-mentohust_1.1.-0_all.ipk root@192.168.10.1:/tmp
scp luci-theme-rosy_git-19.069.38477-5ed9705-1_all.ipk root@192.168.10.1:/tmp

七、安装

ssh进入路由器

1
2
3
4
cd /tmp
opkg install mentohust_0.3.1-1_mipsel_24kc.ipk
opkg install luci-app-mentohust_1.1.-0_all.ipk
opkg install luci-theme-rosy_git-19.069.38477-5ed9705-1_all.ipk