Router

交叉编译ipset-dns给RT-N66U使用

有人推上联系我让我编译一个ipset-dns给RT-N66U使用,去作者主页看了一下,dnsmasq已经内置ipset功能了,而且最新的tomato的dnsmasq也已经可以直接使用ipset。2015-01-08_21-21-32

某人后来说他用的是Asuswrt-Merlin固件,dnsmasq不完整。我就尝试着自己编译一个ipset-dns。

tomato 中编译安装shadowsocks-libev

废话不多说了,下载源码: 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'

<p>
  修改 \shadowsocks-libev-master\libev 下的 ev.c :(其实跟<a href="http://www.wikai.info/2012_12_1365.html" target="_blank">RT-N66U+tomato编译安装gevent及pyOpenSSL</a> 中gevent的修改是一样的)
</p>

<div id="scid:9D7513F9-C04C-4721-824A-2B34F0212519:d7602a13-cb17-4684-b5dd-d8c3cb4024f0" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px">
  <pre style=" width: 640px; height: 130px;background-color:White;white-space:-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; white-space: pre-wrap; word-wrap: break-word;overflow: auto;"><div>

<!–

Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/

–>

找到 #define ECB_MEMORY_FENCE asm volatile (sync : : : memory) 改为 #define ECB_MEMORY_FENCE asm volatile (.set mips2; sync; .set mips0 ::: “memory”) 有两处,都改吧。

  <p>
    <!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --></div> 

    <p>
      
    </p>

    <p>
      然后用以下参数编译:
    </p>

    <div id="scid:9D7513F9-C04C-4721-824A-2B34F0212519:badb61cd-333e-4859-a56c-c4313a1ce56f" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px">
      <pre style=" width: 640px; height: 100px;background-color:White;white-space:-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; white-space: pre-wrap; word-wrap: break-word;overflow: auto;"><div>

<!–