(在Ubuntu 16.04 64bit系统下)编译LEDE系统mvebu架构的package

由于博主本人使用的路由器是Linksys wrt1200ac(基于mvebu架构的CPU), 本文演示了在Ubuntu16.04系统下交叉编译mvebu架构的OpenWrt软件包过程.

注意事项:
1, 本文基于Ubuntu16.04, 理论上Debian 8 64bit也可以操作本文
2, 由于在make过程中还会数次连接网络去下载依赖包, 建议在操作前确保自己的网络是可以穿墙的
3, OpenWrt的/tmp目录体积最大, 进行安装软件以前, 应该先把软件拷贝到此目录.

准备环境及下载源码

sudo apt-get install gawk libncurses5-dev libz-dev zlib1g-dev  git ccache

wget https://downloads.lede-project.org/releases/17.01.2/targets/mvebu/generic/lede-sdk-17.01.2-mvebu_gcc-5.4.0_musl-1.1.16_eabi.Linux-x86_64.tar.xz

xz -d lede-sdk-17.01.2-mvebu_gcc-5.4.0_musl-1.1.16_eabi.Linux-x86_64.tar.xz 

tar xvf lede-sdk-17.01.2-mvebu_gcc-5.4.0_musl-1.1.16_eabi.Linux-x86_64.tar 

cd lede-sdk-17.01.2-mvebu_gcc-5.4.0_musl-1.1.16_eabi.Linux-x86_64

安装基础软件包

./scripts/feeds update
./scripts/feeds install libpcre
./scripts/feeds install zlib    #如果是fedora等系统请使用dnf install zlib-devel
./scripts/feeds install libopenssl

开始编译

#获取ssr源码并放入LEDE的package目录
git clone https://github.com/shadowsocksr-rm/openwrt-shadowsocksr.git package/feeds/shadowsocksr-libev
git clone https://github.com/shadowsocksr-rm/luci-app-shadowsocksr.git package/feeds/luci-app-shadowsocksr

make menuconfig
# 选择要编译的包,luci -> Applications -> luci-app-shadowsocksR -> Save

# 开始编译
make package/feeds/luci-app-shadowsocksr/compile V=99
make package/feeds/shadowsocksr-libev/compile V=99

编译完成之后目标文件在./bin/packages/$targets/base

参考文档
https://github.com/shadowsocksr-backup/shadowsocksr-libev
https://github.com/shadowsocks/openwrt-shadowsocks
https://github.com/ywb94/openwrt-ssr
https://github.com/liudf0716/apfree_wifidog/wiki/%E5%9F%BA%E4%BA%8ELEDE%E7%BC%96%E8%AF%91Apfree_wifidog
https://iteachs.com/?post=25
https://downloads.lede-project.org/releases/17.01.2/targets/mvebu/generic/

(在Ubuntu 16.04 64bit系统下)编译LEDE系统mvebu架构的package》上有1条评论

  1. 编译不成功,显示如下:

    bash: po2lmo: command not found
    Makefile:81: recipe for target ‘/home/jerry/lede-sdk-17.01.2-mvebu_gcc-5.4.0_musl-1.1.16_eabi.Linux-x86_64/build_dir/target-arm_cortex-a9+vfpv3_musl-1.1.16_eabi/luci-app-shadowsocksr/.prepared_a4be5271009353c074f8bfcae8c6d12e’ failed
    make[2]: *** [/home/jerry/lede-sdk-17.01.2-mvebu_gcc-5.4.0_musl-1.1.16_eabi.Linux-x86_64/build_dir/target-arm_cortex-a9+vfpv3_musl-1.1.16_eabi/luci-app-shadowsocksr/.prepared_a4be5271009353c074f8bfcae8c6d12e] Error 127
    make[2]: Leaving directory ‘/home/jerry/lede-sdk-17.01.2-mvebu_gcc-5.4.0_musl-1.1.16_eabi.Linux-x86_64/package/feeds/luci-app-shadowsocksr’
    package/Makefile:105: recipe for target ‘package/feeds/luci-app-shadowsocksr/compile’ failed
    make[1]: *** [package/feeds/luci-app-shadowsocksr/compile] Error 2
    make[1]: Leaving directory ‘/home/jerry/lede-sdk-17.01.2-mvebu_gcc-5.4.0_musl-1.1.16_eabi.Linux-x86_64’
    /home/jerry/lede-sdk-17.01.2-mvebu_gcc-5.4.0_musl-1.1.16_eabi.Linux-x86_64/include/toplevel.mk:191: recipe for target ‘package/feeds/luci-app-shadowsocksr/compile’ failed
    make: *** [package/feeds/luci-app-shadowsocksr/compile] Error 2

    请问是什么情况呢?

发表评论

电子邮件地址不会被公开。