嵌入式技术分享

Embedded Technology Sharing

【教程笔记】用OpenWRT单独编译ipk插件

《【教程笔记】用OpenWRT单独编译ipk插件》

视频教程链接:https://www.bilibili.com/video/av51301805/

一、插件源码下载
1.锐捷
git clone https://github.com/KyleRicardo/MentoHUST-OpenWrt-ipk
git clone https://github.com/BoringCat/luci-app-mentohust.git
2.Rosy主题
git clone https://github.com/rosywrt/luci-theme-rosy.git

二、下载存放路径
/home/cheng/openwrt/lede/package

三、配置
make menuconfig
<M> 选中,但不编译进固件
1.锐捷
-> Network
-> Ruijie
<M> mentohust………………………………….. A Ruijie Client Daemon
-> LuCI
-> 3. Applications
<M> luci-app-mentohust…………………. MentoHUST 802.1X Client for LuCI

2.Rosy主题
-> LuCI
-> 4. Themes
<M> luci-theme-rosy……………………………………….. Rosy Theme

四、编译
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生成路径
路径:
bin/packages/mipsel_24kc/base
文件名
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至路由器
清除原有密钥
ssh-keygen -f “/home/cheng/.ssh/known_hosts” -R 192.168.10.1
拷贝至路由器
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进入路由器
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

如果文章对您有帮助,欢迎移至上方按钮打赏博主;

点赞
  1. 阿灵说道:

    你好,我之前想编译Lean的openwrt,已经下载好了,进入固件目录后执行make package/lean/luci-app-adbyby-plus/compile V=99
    报错,请问是什么原因?

    make[2]: *** [/home/deity/lede/build_dir/target-aarch64_cortex-a53_musl/toolchain/.pkgdir/libc.installed] Error 1
    make[2]: Leaving directory '/home/deity/lede/package/libs/toolchain'
    time: package/libs/toolchain/compile#0.01#0.53#0.61
    package/Makefile:107: recipe for target 'package/libs/toolchain/compile' failed
    make[1]: *** [package/libs/toolchain/compile] Error 2
    make[1]: Leaving directory '/home/deity/lede'
    /home/deity/lede/include/toplevel.mk:216: recipe for target 'package/lean/luci-app-adbyby-plus/compile' failed
    make: *** [package/lean/luci-app-adbyby-plus/compile] Error 2

    1. cheng说道:

      直接编译固件试试

      1. 阿灵说道:

        编译固件没问题,我之前编辑成功过,算了,反正你已经提供了完整的固件了

        1. cheng说道:

          固件编译没有问题,那就说明ipk编译也没有问题,可以在bin目录下找到你想要的ipk。你找找。

      2. 阿灵说道:

        另外想请教个问题,我用N1做主路由,设置的端口转发无效,请问怎么处理?感谢!!

        1. cheng说道:

          【视频教程】http://www.right.com.cn/forum/forum.php?mod=viewthread&tid=558507

          1. 阿灵说道:

            感谢你的答复,在碰到这个问题的时候就找到你这个视频看了,我一开始就是这样设置的,但无效我才疑惑,我在恩山发了个帖子,麻烦你看一下,谢谢!
            https://www.right.com.cn/forum/forum.php?mod=viewthread&tid=675077&extra=page%3D2%26filter%3Dtypeid%26typeid%3D21

  2. kent说道:

    Tue May 28 22:44:41 2019 daemon.err uhttpd[3009]: Model mentohust/log returns SimpleForm but is dispatched via cbi(),
    Tue May 28 22:44:41 2019 daemon.err uhttpd[3009]: please change admin/services/mentohust/log to use the form() action instead.
    这个是什么问题?要怎样修复啊?谢谢

    1. cheng说道:

      不清楚耶,没遇到过,网上找找。

  3. shuds说道:

    你好,请问一下怎么编译filebrowser?谢谢!

    1. cheng说道:

      我这几天试着编译了一下,没成功。

  4. hahaya说道:

    你好 看了你的视频 请教下单独编译rosy遇到的问题 整体编译可以 单独编译包如下错误 求指导
    make package/luci-theme-rosy/compile V=99
    time: target/linux/prereq#0.08#0.01#0.09
    make[1]: Entering directory '/home/hahaya/lede'
    make[2]: Entering directory '/home/hahaya/lede/feeds/luci/modules/luci-base'
    make[2]: Leaving directory '/home/hahaya/lede/feeds/luci/modules/luci-base'
    time: package/feeds/luci/luci-base/host-compile#0.90#0.32#1.11
    make[2]: Entering directory '/home/hahaya/lede/package/libs/toolchain'
    touch /home/hahaya/lede/build_dir/target-x86_64_musl/toolchain/.prepared_6bb1d4d6f8ac70dfb2996a2b8ecfdee6_6664517399ebbbc92a37c5bb081b5c53_check
    mkdir -p /home/hahaya/lede/build_dir/target-x86_64_musl/toolchain
    touch /home/hahaya/lede/build_dir/target-x86_64_musl/toolchain/.prepared_6bb1d4d6f8ac70dfb2996a2b8ecfdee6_6664517399ebbbc92a37c5bb081b5c53
    rm -f /home/hahaya/lede/build_dir/target-x86_64_musl/toolchain/.configured_*
    rm -f /home/hahaya/lede/staging_dir/target-x86_64_musl/stamp/.toolchain_installed
    (cd /home/hahaya/lede/build_dir/target-x86_64_musl/toolchain/./; if [ -x ./configure ]; then find /home/hahaya/lede/build_dir/target-x86_64_musl/toolchain/ -name config.guess | xargs -r chmod u+w; find /home/hahaya/lede/build_dir/target-x86_64_musl/toolchain/ -name config.guess | xargs -r -n1 cp --remove-destination /home/hahaya/lede/scripts/config.guess; find /home/hahaya/lede/build_dir/target-x86_64_musl/toolchain/ -name config.sub | xargs -r chmod u+w; find /home/hahaya/lede/build_dir/target-x86_64_musl/toolchain/ -name config.sub | xargs -r -n1 cp --remove-destination /home/hahaya/lede/scripts/config.sub; AR="x86_64-openwrt-linux-musl-gcc-ar" AS="x86_64-openwrt-linux-musl-gcc -c -Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -ffile-prefix-map=/home/hahaya/lede/build_dir/target-x86_64_musl/toolchain=toolchain -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro" LD=x86_64-openwrt-linux-musl-ld NM="x86_64-openwrt-linux-musl-gcc-nm" CC="x86_64-openwrt-linux-musl-gcc" GCC="x86_64-openwrt-linux-musl-gcc" CXX="x86_64-openwrt-linux-musl-g++" RANLIB="x86_64-openwrt-linux-musl-gcc-ranlib" STRIP=x86_64-openwrt-linux-musl-strip OBJCOPY=x86_64-openwrt-linux-musl-objcopy OBJDUMP=x86_64-openwrt-linux-musl-objdump SIZE=x86_64-openwrt-linux-musl-size CFLAGS="-Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -ffile-prefix-map=/home/hahaya/lede/build_dir/target-x86_64_musl/toolchain=toolchain -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro " CXXFLAGS="-Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -ffile-prefix-map=/home/hahaya/lede/build_dir/target-x86_64_musl/toolchain=toolchain -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro " CPPFLAGS="-I/home/hahaya/lede/staging_dir/target-x86_64_musl/usr/include -I/home/hahaya/lede/staging_dir/toolchain-x86_64_gcc-8.4.0_musl/usr/include -I/home/hahaya/lede/staging_dir/toolchain-x86_64_gcc-8.4.0_musl/include/fortify -I/home/hahaya/lede/staging_dir/toolchain-x86_64_gcc-8.4.0_musl/include " LDFLAGS="-L/home/hahaya/lede/staging_dir/target-x86_64_musl/usr/lib -L/home/hahaya/lede/staging_dir/target-x86_64_musl/lib -L/home/hahaya/lede/staging_dir/toolchain-x86_64_gcc-8.4.0_musl/usr/lib -L/home/hahaya/lede/staging_dir/toolchain-x86_64_gcc-8.4.0_musl/lib -znow -zrelro " ./configure --target=x86_64-openwrt-linux --host=x86_64-openwrt-linux --build=x86_64-pc-linux-gnu --program-prefix="" --program-suffix="" --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --libexecdir=/usr/lib --sysconfdir=/etc --datadir=/usr/share --localstatedir=/var --mandir=/usr/man --infodir=/usr/info --disable-nls ; fi; )
    touch /home/hahaya/lede/build_dir/target-x86_64_musl/toolchain/.configured_68b329da9893e34099c7d8ad5cb9c940
    rm -f /home/hahaya/lede/build_dir/target-x86_64_musl/toolchain/.built
    touch /home/hahaya/lede/build_dir/target-x86_64_musl/toolchain/.built_check
    touch /home/hahaya/lede/build_dir/target-x86_64_musl/toolchain/.built
    rm -rf /home/hahaya/lede/build_dir/target-x86_64_musl/toolchain/.pkgdir/libc.installed /home/hahaya/lede/build_dir/target-x86_64_musl/toolchain/.pkgdir/libc
    mkdir -p /home/hahaya/lede/build_dir/target-x86_64_musl/toolchain/.pkgdir/libc
    install -d -m0755 /home/hahaya/lede/build_dir/target-x86_64_musl/toolchain/.pkgdir/libc/lib /home/hahaya/lede/build_dir/target-x86_64_musl/toolchain/.pkgdir/libc/usr/bin
    cp -fpR /home/hahaya/lede/staging_dir/toolchain-x86_64_gcc-8.4.0_musl/lib/ld-musl-*.so* /home/hahaya/lede/build_dir/target-x86_64_musl/toolchain/.pkgdir/libc/lib/
    cp: cannot stat '/home/hahaya/lede/staging_dir/toolchain-x86_64_gcc-8.4.0_musl/lib/ld-musl-*.so*': No such file or directory
    Makefile:750: recipe for target '/home/hahaya/lede/build_dir/target-x86_64_musl/toolchain/.pkgdir/libc.installed' failed
    make[2]: *** [/home/hahaya/lede/build_dir/target-x86_64_musl/toolchain/.pkgdir/libc.installed] Error 1
    make[2]: Leaving directory '/home/hahaya/lede/package/libs/toolchain'
    time: package/libs/toolchain/compile#0.09#0.02#0.12
    package/Makefile:111: recipe for target 'package/libs/toolchain/compile' failed
    make[1]: *** [package/libs/toolchain/compile] Error 2
    make[1]: Leaving directory '/home/hahaya/lede'
    /home/hahaya/lede/include/toplevel.mk:222: recipe for target 'package/luci-theme-rosy/compile' failed
    make: *** [package/luci-theme-rosy/compile] Error 2
    hahaya@ubuntu:~/lede$ make package/luci-theme-rosy/luci-theme-rosy/compile V=99
    make[1]: Entering directory '/home/hahaya/lede'
    make[2]: Entering directory '/home/hahaya/lede/feeds/luci/modules/luci-base'
    make[2]: Leaving directory '/home/hahaya/lede/feeds/luci/modules/luci-base'
    time: package/feeds/luci/luci-base/host-compile#0.86#0.35#1.09
    make[2]: Entering directory '/home/hahaya/lede/package/libs/toolchain'
    rm -rf /home/hahaya/lede/build_dir/target-x86_64_musl/toolchain/.pkgdir/libc.installed /home/hahaya/lede/build_dir/target-x86_64_musl/toolchain/.pkgdir/libc
    mkdir -p /home/hahaya/lede/build_dir/target-x86_64_musl/toolchain/.pkgdir/libc
    install -d -m0755 /home/hahaya/lede/build_dir/target-x86_64_musl/toolchain/.pkgdir/libc/lib /home/hahaya/lede/build_dir/target-x86_64_musl/toolchain/.pkgdir/libc/usr/bin
    cp -fpR /home/hahaya/lede/staging_dir/toolchain-x86_64_gcc-8.4.0_musl/lib/ld-musl-*.so* /home/hahaya/lede/build_dir/target-x86_64_musl/toolchain/.pkgdir/libc/lib/
    cp: cannot stat '/home/hahaya/lede/staging_dir/toolchain-x86_64_gcc-8.4.0_musl/lib/ld-musl-*.so*': No such file or directory
    Makefile:750: recipe for target '/home/hahaya/lede/build_dir/target-x86_64_musl/toolchain/.pkgdir/libc.installed' failed
    make[2]: *** [/home/hahaya/lede/build_dir/target-x86_64_musl/toolchain/.pkgdir/libc.installed] Error 1
    make[2]: Leaving directory '/home/hahaya/lede/package/libs/toolchain'
    time: package/libs/toolchain/compile#0.09#0.02#0.11
    package/Makefile:111: recipe for target 'package/libs/toolchain/compile' failed
    make[1]: *** [package/libs/toolchain/compile] Error 2
    make[1]: Leaving directory '/home/hahaya/lede'
    /home/hahaya/lede/include/toplevel.mk:222: recipe for target 'package/luci-theme-rosy/luci-theme-rosy/compile' failed

发表评论

电子邮件地址不会被公开。 必填项已用*标注