PDA

View Full Version : HOW TO COMPILE TO TARGET OLEG



trampjuice
04-01-2010, 17:03
HOW-TO learn how to setup a target oleg compile enviroment Compile your own or others sourcecode for the WL500(G/p) with OLEG? In need of compiling some tools for your router? Well I am doing this how-to because its a bit hit and miss to figure it out.

1. Ubuntu I have suceeded with Ubuntu 9.10 'Karmic Koala' - running under a virtual machine and running on a PC partition so I can just boot into it. I recommend creating a seperate partition on your PC hardisk and installing it there because it is faster to compile and use. You should be able to use debian or other linux releases, its just that ubuntu was easy to setup.

2. First Install developer tools
You want to SuperUserDO the following
sudo apt-get install gcc cvs subversion flex bison make pkg-config rsync gettext libglib2.0-dev autoconf libtool automake1.9 sudo patch bzip2 gzip wget sed

to make sure you have the tools needed for compling and linking, running scripts and obtaining files from the internet. "apt-get is the command-line tool for handling packages, and may be considered the user's "back-end" to other tools using the APT library."
http://linux.die.net/man/8/apt-get

3. SVN checkout the Optware Area

cd /opt
svn co http://svn.nslu2-linux.org/svnroot/optware/trunk optware
cd optware

4. Make oleg-target : creates the oleg directory and make ipkg-utils
dirs

Here I change a line in the opt/optware/Makefile from 'OPTWARE_TARGET?=?xxx? to 'OPTWARE_TARGET=oleg'
then
make toolchain
make oleg-target
cd oleg
make directories ipkg-utils
make ipkg-utils

5. Test if you like * WARNING - THIS WILL TAKE A LONG TIME TO COMPLETE*
cd /opt/optware/oleg
make Packetname
(eg; make esniper)

this will make a existing binary oleg package from the source.

Example of downloading and compiling source
*again Warning - this will take a long time*

For this example I am going to take the sourceforge package 'esniper' a ebay sniper util and compile it for the WL500 router.

We have now setup the target oleg compile enviroment - Get the sourcecode from http://sourceforge.net/projects/esniper/files/esniper/2.21.0/esniper-2-21-0.tgz/download

1. unzip it into a subdirectory in oleg
2. locate the esniper.mk file and change it to the current version
3. >Make esniper.ipkg
4. move the ipkg file to the router
5. > ipkg install eniper-2-21-0.ipk

references:
Doing this sucessfully :D:cool:based on
QMax posts,
FastJacks howto in German : http://wl500g.info/showthread.php?t=13817&highlight=sudo+apt-get&page=3

pripps
24-01-2010, 18:58
Thanks for this How-To. Unfortunatly I had several errors when trying to follow it. I also using Ubuntu 9.10 'Karmic Koala' native environnement.
First complain was missing 'builds' directory then it could not find buildroot-svn-17310.tar.gz file. I created the directory 'builds'. It seems worked. File buildroot-svn-17310.tar.gz was in download subdirectory.
Tryed to compile mc got this "HTTP request sent, awaiting response... 401 Access Denied Still Working
Authorization failed."

Tryed with esniper. File esniper.mk does not exist after unzipping. Tryed follow INSTALL recommendations with ./configure etc. Configure: error: curl-config not found.
cURL is available from http://curl.haxx.se/

Can you check your How-To if there are no some missing steps?

I want to compile some soft for my Asus for which I have only sourcecode. How should I proceed?

Thanks!

schufti
04-05-2010, 06:58
Hi!

The howto is ok but the makefile is outdated, so some packages can't be found:

linux-libc-headers-oleg.tar.bz2
linux-libc-headers-DD-WRT-v23.tar.bz2
buildroot-svn-17310.tar.gz
binutils-2.17.50.0.8.tar.bz2
uClibc-0.9.28.tar.bz2
uClibc++-0.2.2+r18737.tbz2

find them here: http://nslu2-linux.dyoung-mirror.net/sources/ and put them in the /opt/optware/downloads directory and you should be up and running....

schufti

kokoro
13-08-2010, 22:09
Is this method compatible with native compilation ?

--

Cause, first, ipkg packages list misses:
- apt-get
- libglib2.0-dev
- automake1.9
automake is installed but
>automake --version
Use of uninitialized value in split at /opt/lib/perl5/5.8.8/mipsel-linux/DynaLoader.pm line 80.
automake (GNU automake) 1.10

Second, i have an error with svn co (http://wl500g.info/showthread.php?t=24487)

If you can take a look, please.

gatorback
25-08-2011, 06:47
I am forced to compile Asterisk (running on an ASUS RT-N16) because Google made a change to the Gtalk service. Details regarding this change can be found by clicking on this URL. (http://forums.digium.com/viewtopic.php?f=1&t=79599&p=162217&hilit=Gtalk&sid=def7ed53266ac06d25be4a1211c0812e#p162217)

A comparison of ASUS Routers (http://www.dd-wrt.com/wiki/index.php/Supported_Devices#Asus) shows that the

* RT-N16 uses the BCM 4716 CPU
* WL500G uses the BCM 4710 CPU

If I follow a WL500G procedure to compile Asterisk, are the two similar enough such that I should expect the executable to work on the RT-N16? Maybe tweeks are needed in the makefile?

If you comment, please weigh in if you have experience compiling for the RT-N16. Thank you.