Build SNIProxy Debian Package for EdgeRouter

SNIProxy的最新版0.4.0,上一次提交已经很久以前了,建议直接使用github库里的代码。
官方github:https://github.com/dlundquist/sniproxy
我的fork:https://github.com/sskaje/sniproxy

前文所说,Debian Wheezy已经LTS了,所以从依赖开始。

不过,我没有去配交叉编译的环境,而是直接qemu装了两个虚拟机,一个mips(给EdgeRouter Lite),一个mipsel(给EdgeRouter X),具体方法可以参考之前的blog:Install Debian MIPS and Debian PowerPC on OSX

好处是,闭着眼睛就可以配构件环境;坏处是,慢慢慢慢慢慢慢慢慢慢慢慢慢慢慢慢慢慢慢慢慢慢慢慢到死了。

以mips为例,mipsel一模一样。

构件环境不说了。

先编译 libudns。

udns的官方包里没有debian的打包配置,所以我直接从debian官方包列表的链接里下载,下载地址在:https://packages.debian.org/source/sid/udns
三个文件都下,用到的是两个tarball。

按上述命令执行完之后,deb包会出现在上一级目录,生成的文件包括:

  • libudns0_0.4-1_mips.deb
  • libudns-dev_0.4-1_mips.deb
  • udns-utils_0.4-1_mips.deb
  • udns_0.4-1_mips.changes

其中,libudns-dev_0.4-1_mips.deb 直接安装在开发环境,libudns0_0.4-1_mips.deb 装在路由上。

然后编译sniproxy
git clone 之后,同样进目录执行

Build SNIProxy Debian Package for EdgeRouter by @sskaje: https://sskaje.me/2016/11/build-sniproxy-debian-package-edgerouter/

Incoming search terms:

Install Debian MIPS and Debian PowerPC on OSX

I tried MacPorts, but its qemu does not have qemu-system-ppc or qemu-system-mips. Even though, I have qemu installed under macports, if you see any dependency missing, try to port install qemu and then uninstall.

OSX 10.11.5
Xcode

Install QEMU

Download 2.6.0 from Qemu.org, configure and make like:

I did not see any error, Google if you see any.

Install Debian MIPS

Debian official installer only have netboot image. All you need is GOOD INTERNET CONNECTION, don’t download iso from debian cd mirror.

Prepare

Download vmlinux and initrd.

Install

Create Image

Install

Follow the instructions, almost same as debian x86/x86_64.
You may be asked to configure and mount partition, I picked one partition and choose ext4 and mount to /.

Now, you have to wait for a long long time…

Then:

Just continue.

Run

!!!REMEMBER!!!
NO -initrd
-append “root=/dev/sda1”
!!!/REMEMBER!!!

If you want to exit qemu under nographic:
press ctrl+a, then c (no ctrl), type quit, hit enter.

Install Debian PowerPC

Similar to MIPS, but debian provides cdrom installer.

vmlinux, initrd.gz

So,

Install:

Run:

You may see similar error message above saying quik loader failed to install, just ignore it.
And, for PowerPC, no -kernel and no -append is required.
You can also forward ssh to local loopback.

Install Debian MIPS and Debian PowerPC on OSX by @sskaje: https://sskaje.me/2016/05/qemu-install-debian-mips-debian-powerpc-on-osx/

Incoming search terms:

Debian Live USB Change Brightness on Thinkpad

Thinkpad X201 Tablet.
Debian 8.2.0 Live CD USB Stick.

Steps:
1 su to root

2 set brightness

Debian Live USB Change Brightness on Thinkpad by @sskaje: https://sskaje.me/2016/01/debian-live-usb-change-brightness-thinkpad/

Debian 8 Systemd Change Service Ulimit

I was trying to set ulimit -n for redis-server, but neither /etc/security/limits.conf nor ulimit work.

Here is the solution:
1 open /lib/systemd/system/redis-server.service
2 add following lines to ‘[Service]

3 reload daemon

4 restart service

Same for php5-fpm.

Other ulimit related keys:

Debian 8 Systemd Change Service Ulimit by @sskaje: https://sskaje.me/2015/06/debian-8-systemd-change-service-ulimit/

Incoming search terms: