Deadwood at OpenWRT

Sam Trenholme strenholme.usenet at gmail.com
Thu Sep 9 22:26:20 EDT 2010


> just want to pass my Makefile for a OpenWRT Backfire (MIPS)
> cross-compile. Maybe someone is interested in this.
> I also put a pre-compiled Deadwood 2.9.07 on the following link, for
> those who don't want to have to compile around 3GB of OpenWRT's buildroot.

It looks really good.  This is actually the kind of target I had in
mind when designing and coding Deadwood: I wanted a tiny recursive DNS
server small enough to work on an embedded system.  Hence, no threads.
 Hence, lots of code optimized to run on a 32-bit system (The secure
PRNG was deliberately chosen to be one using 32-bit words, but, as it
turns out, also has a version using 64-bit words.  The has compression
function is designed around 32-bit words.  I use int32_t when I mean
“An integer that can fit over 16 bits”.)  Hence, a small code size and
memory footprint.

I’m very curious how well Deadwood works on an embedded OpenWRT host.

I do apologize for not using $HOSTCC correctly; I’ve never used a
cross compiler to compile Deadwood, so I neglected to set up the
makefile to always use $HOSTCC to compile the RandomPrime tool (which
is used to compile other programs).

Note that while I have written Deadwood to be endian-neutral, I have
never had the chance to test Deadwood on a big-endian system like the
MIPS ISA.  Does Deadwood work without problem on a big-endian system?
If not, let me know, and I’ll see if I can get QEMU or whatever set up
to debug the big-endian issues.

I also wonder if there is a MIPS version of the “strip” tool?  I know
x86_32 binaries are about 90 or 100k in size, but squeeze down to
being 64k binaries when stripped.  For example, Deadwood 2.9.07
compiles to be 100,589 bytes in size in Windows32, but “strip” reduces
its size to 64,512 bytes (the x86_64 binary is about 82k in size after
-Os + strip).  118k seems to be about right for an unstripped binary;
see if you can strip it to make it 70k or 80k in size (I know MIPS’
ISA does result in larger binaries than x86’s ISA; there’s a reason
the ARM ISA has the “thumb” instruction set).

Besides that, it looks really good.  Is is OK if I add your Makefile
to the Deadwood distribution once we figure out how to strip the
binary?

- Sam

Standard disclaimer: If you want to report a bug/ask for help via
private email, do not forget to bring out your credit card first.


More information about the list mailing list