OpenWrt Forum Archive

Topic: Building "pacparser" for ar71xx

The content of this topic has been archived on 11 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi guys,

I am using OpenWrt snapshot r31782 (self-compiled on a Debian Squeeze system) on a TP-Link WR703N. Everything is running smooth and I'm happy with it.

What I now would like to do is integrate pactester (see http://code.google.com/p/pacparser/). So I created a directory "feeds/packages/net/pactester" and threw a Makefile in, which I took from one of the other packages and which I modified (download URL, md5sum, Package name and so on) to match pactester.

Unfortunately, when it builds, it's a i386 binary, not a mips one. :-(( I think that's because I'm building on i386 architecture.

Does anybody have an idea on how the Makefile must look alike to do cleanly cross-compile pactester for mips? In short, the following things would have to be done:
- Source URL is http://pacparser.googlecode.com/files/p … 3.0.tar.gz
- after unpack, chdir to pacparser-1.3.0/src/
- issue "make pactester"

Any help appreciated.

Thanks!
Sven

I found out that I need to modify the Makefile to use a different CC and LD. But now I run into a second problem:
- During the build process of pacparser, there is a binary "jscpucfg" buillt. This gets compiled as mips binary. Good.
- I few lines later in the Makefile, the just built "jscpucfg" binary is called. This means calling a mips binary on the building i386 host, which of course does not work.

Anybody any hints? Is there a "mips-emulator" in the build environment for these cases?

Many thanks,
Sven

The discussion might have continued from here.