一半君的总结纸

听话只听一半君

cross compiling polipo and privoxy for tomato shibby

帮人试下编译polipo和privoxy

polipo

export PATH=/home/oglop/x-tools/mipsel-unknown-linux-uclibc/bin:$PATH

git clone https://github.com/jech/polipo.git

cd ~/Downloads
# git checkout tags/polipo-1.1.1
CC=mipsel-unknown-linux-uclibc-gcc CXX=mipsel-unknown-linux-uclibc-g++ AR=mipsel-unknown-linux-uclibc-ar RANLIB=mipsel-unknown-linux-uclibc-ranlib make all
make install TARGET=~/Downloads/polipo-install

cd ~/Downloads/polipo-install/usr/local/bin
mipsel-unknown-linux-uclibc-strip polipo
~/Downloads/upx-3.91-amd64_linux/upx polipo

upx之后小了点


                       Ultimate Packer for eXecutables
                          Copyright (C) 1996 - 2013
UPX 3.91        Markus Oberhumer, Laszlo Molnar & John Reiser   Sep 30th 2013

        File size         Ratio      Format      Name
   --------------------   ------   -----------   -----------
    250780 ->    102324   40.80%  linux/mipsel   polipo 

测试

scp ./polipo  root@router:/tmp/home/root

root@unknown:/tmp/home/root# ./polipo -h
./polipo [ -h ] [ -v ] [ -x ] [ -c filename ] [ -- ] [ var=val... ]
  -h: display this message.
  -v: display the list of configuration variables.
  -x: perform expiry on the disk cache.
  -c: specify the configuration file to use.

privoxy

export PATH=/home/oglop/x-tools/mipsel-unknown-linux-uclibc/bin:$PATH

cd ~/Downloads
curl https://www.privoxy.org/sf-download-mirror/Sources/3.0.26%20%28stable%29/privoxy-3.0.26-stable-src.tar.gz | tar xz
cd privoxy-3.0.26-stable

autoheader
autoconf
CC=mipsel-unknown-linux-uclibc-gcc CXX=mipsel-unknown-linux-uclibc-g++ AR=mipsel-unknown-linux-uclibc-ar RANLIB=mipsel-unknown-linux-uclibc-ranlib ./configure --prefix=$HOME/Downloads/privoxy-install --host=mipsel-uclibc-linux
CC=mipsel-unknown-linux-uclibc-gcc CXX=mipsel-unknown-linux-uclibc-g++ AR=mipsel-unknown-linux-uclibc-ar RANLIB=mipsel-unknown-linux-uclibc-ranlib make
make install

mipsel-unknown-linux-uclibc-strip privoxy
~/Downloads/upx-3.91-amd64_linux/upx privoxy

upx压一下

                       Ultimate Packer for eXecutables
                          Copyright (C) 1996 - 2013
UPX 3.91        Markus Oberhumer, Laszlo Molnar & John Reiser   Sep 30th 2013

        File size         Ratio      Format      Name
   --------------------   ------   -----------   -----------
    334748 ->    126108   37.67%  linux/mipsel   privoxy 

测试

scp ./privoxy  root@router:/tmp/home/root

root@unknown:/tmp/home/root# ./privoxy --help
Privoxy version 3.0.26 (https://www.privoxy.org/)
Usage: ./privoxy [--config-test] [--chroot] [--help] [--no-daemon] [--pidfile pidfile] [--pre-chroot-nslookup hostname] [--user user[.group]] [--version] [configfile]
Aborting

下载链接:

polipo-4d42ca1-20161108-tomato-k26rt-n.tar.gz
privoxy.3.0.26.20161108-tomato-k26rt-n.tar.gz

参考:
Polipo — a caching web proxy

Advertisements

发表评论

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / 更改 )

Twitter picture

You are commenting using your Twitter account. Log Out / 更改 )

Facebook photo

You are commenting using your Facebook account. Log Out / 更改 )

Google+ photo

You are commenting using your Google+ account. Log Out / 更改 )

Connecting to %s

%d 博主赞过: