Compiling Applications

An area of the forum to discuss router binaries (utilities and applications that run on routers) etc.
Post Reply
willshep
Regular
Regular
Posts: 46
Joined: Tue Mar 27, 2007 1:45 pm

Compiling Applications

Post by willshep » Wed May 05, 2010 8:37 am

Hello

Is it at all possible to compile something simple for the routers - I have found much information on this and other forums about compiling a kernel but not about simply compiling an app written in c for instance.

I have zero experience with 'tool chains' but a lot of experience in c - just wondering where to start really.

Thanks

Will.
mstombs
RouterTech Team
RouterTech Team
Posts: 3753
Joined: Wed Jan 10, 2007 11:54 pm

Re: Compiling Applications

Post by mstombs » Wed May 05, 2010 9:38 am

Firstly I need to point out this is not a Linux programming forum, so please don't expect too much support!

Compiling the kernel is probably the hardest, next is compiling apps that come with autogenerated Makefiles.

The setup of your host PC is critical, you need the right version build-tools and the toolchain in the correct place, it needs to know what functions are provided by what libraries. see thechief's post here which can work in some situations.

viewtopic.php?p=21396#p21396

For a general intro to cross-compiling (OpenWRT not RouterTech) see
http://gargoyle-router.com/old-openwrt-coding.html

For a file single c app, take a look for example at pixelserv, which can be compiled and linked with a single command line on many platforms see
http://www.linksysinfo.org/forums/showt ... hp?t=62758
willshep
Regular
Regular
Posts: 46
Joined: Tue Mar 27, 2007 1:45 pm

Re: Compiling Applications

Post by willshep » Wed May 05, 2010 10:23 am

Thanks, will do.

Will.
User avatar
thechief
RouterTech Team
RouterTech Team
Posts: 12064
Joined: Wed Feb 01, 2006 10:22 pm
Location: England, the Centre of Africa
Contact:

Re: Compiling Applications

Post by thechief » Wed May 05, 2010 1:24 pm

You need a cross-compiler toolchain targetting the mipsel platform. Here is one: http://mcmcc.bat.ru/dlinkt/cross_utils/ ... el.tar.bz2
The Chief: :afro: Be sure to read the Firmware FAQ and do a Forum Search before posting!
No support via PM. Ask all questions on the open forum.
willshep
Regular
Regular
Posts: 46
Joined: Tue Mar 27, 2007 1:45 pm

Re: Compiling Applications

Post by willshep » Wed May 05, 2010 5:44 pm

Thanks thechief

Will.
Post Reply