极路由4增强版编译aria2-1.34

        虽然说极路由的插件很不错,但是不知道为什么在我这里一直没有下载速度,一怒之下萌生了自己编译一个aria2的想法,网上很多人是下了openwrt的源码进行编译的,我这里虽然成功了,但是在路由器上跑不起来,可能是平台问题。后来在极路由开发平台上看到了他们提供的编译器,于是编译之旅正式开始。

1、首先进入极路由开发平台,下载对应的编译器,我的路由器对应mtmips的

http://doc.hiwifi.com/docs/sdk_usage

2、交叉编译python

编译之前先设置好交叉编译环境

export PATH=$PATH:/root/mtmips/staging_dir/toolchain-mipsel_1004kc_gcc-4.8-linaro_uClibc-0.9.33.2/bin
export STAGING_DIR=/root/mtmips/staging_dir

用极路由平台上提供的方法也可以

./scripts/cross-compile.sh ./

使用文件 python.2.7
参考网址 http://www.linuxidc.com/Linux/2014-03/98457.htm
         http://blog.csdn.net/shuxiao9058/article/details/7026205


echo ac_cv_file__dev_ptmx=no > config.site
echo ac_cv_file__dev_ptc=no >> config.site
export CONFIG_SITE=config.site
./configure --host=mipsel-linux --build=i386-linux-gnu --disable-ipv6

修改makefile
OPT=            -DNDEBUG -g -O3 -Wall -Wstrict-prototypes 
一行中,去掉-g

make
make install

3、编译libxml2

修改默认包含的python头文件地址,开始编译。

C_INCLUDE_PATH=/root/Python-2.7.15/Include:/root/Python-2.7.15
export C_INCLUDE_PATH
CPLUS_INCLUDE_PATH=$CPLUS_INCLUDE_PATH:/root/Python-2.7.15/Include:/root/Python-2.7.15
export CPLUS_INCLUDE_PATH

./configure --host=mipsel-linux  --prefix=/finrod/mips_lib/test_xml/libxml --enable-static=yes --without-zlib  
make
make install

4、编译aria2

C_INCLUDE_PATH=/root/Python-2.7.15/Include:/root/Python-2.7.15:/root/libxml2-2.9.7/include/
export C_INCLUDE_PATH
CPLUS_INCLUDE_PATH=$CPLUS_INCLUDE_PATH:/root/Python-2.7.15/Include:/root/Python-2.7.15:/root/libxml2-2.9.7/include/
export CPLUS_INCLUDE_PATH

LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/root/libxml2-2.9.7/.libs
export LD_LIBRARY_PATH
LIBRARY_PATH=$LIBRARY_PATH:/root/libxml2-2.9.7/.libs
export LIBRARY_PATH

./configure --host=mipsel-openwrt-linux-uclibc --without-gnutls --disable-nls --without-libgcrypt --with-libnettle --without-libgmp --without-libexpat --without-libcares --without-sqlite3 --with-openssl --with-libxml2 --with-libz CFLAGS="-I/root/mtmips/staging_dir/target-mipsel_1004kc_uClibc-0.9.33.2/usr/include" LDFLAGS="-L/root/mtmips/staging_dir/target-mipsel_1004kc_uClibc-0.9.33.2/usr/lib" ZLIB_CFLAGS="-I/root/mtmips/staging_dir/target-mipsel_1004kc_uClibc-0.9.33.2/usr/include" ZLIB_LIBS="-L/root/mtmips/staging_dir/target-mipsel_1004kc_uClibc-0.9.33.2/usr/lib -lz"
make -j1 V=99

5、编译完成后src目录下aria2文件有70M左右,需要做一些简化

./staging_dir/toolchain-mipsel_1004kc_gcc-4.8-linaro_uClibc-0.9.33.2/mipsel-openwrt-linux-uclibc/bin/strip ../aria2-1.34.0/src/aria2c

平台跟我一样的童鞋,可以直接拿去用,资源还在审核

https://download.csdn.net/download/cswchf/10631619

链接: https://pan.baidu.com/s/15dqd23t18V-vCLpS6r7XfQ 密码: 5a4k

 

参考文章

https://bbs.csdn.net/topics/390831859

https://www.douban.com/note/188206775/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值