Dec 30

先配置下选项,我这里以 PolarSSL 为例:
./configure --prefix=/opt --with-crypto-library=polarssl --with-polarssl=/mmc/lib --with-polarssl-include=/mmc/include

为了解决编译时出现的 epoll 相关错误(应为 uClibc 版本低的原因),需要:
sed -i "s/epoll_create1/epoll_create/g" ./libev/ev_epoll.c

使用 ldtools 的话,可以在编译二进制文件时指定 -all-static:
sed -i "s/LDFLAGS = /LDFLAGS = -all-static/g" ./src/Makefile

然后就可以:

make
strip ./src/ss-*
make install

Oct 21

下载源码: https://github.com/madeye/shadowsocks-libev

直接编译会出错:

/tmp/cciqCfzf.s: Assembler messages:
/tmp/cciqCfzf.s:2903: Error: opcode not supported on this processor: mips1 (mips1) `sync'

修改 \shadowsocks-libev-master\libev 下的 ev.c :

找到:

#define ECB_MEMORY_FENCE         __asm__ __volatile__ ("sync"     : : : "memory")

改为:

#define ECB_MEMORY_FENCE         __asm__ __volatile__ (".set mips2; sync; .set mips0" ::: "memory")

有两处,都改吧。(参考:http://permalink.gmane.org/gmane.comp.lib.ev/2182)

再编译就可以通过了:

Shadowsocks.1.4.0.Tomato.gif