Subject: Newbie : Cross-compiling module for wrt54g

From: Christophe Jelger <[email-masked]>
Date: Thu, 03 Mar 2005 15:56:09 +0100

Hi everybody,

Well I am a complete newbie to using MIPS devices and I would like to 
cross-compile an extra linux module for the Linksys wrt54g wireless 
router. The module is not a standard linux module, it is an underlay 
routing protocol (LUNAR) for wireless ad hoc networks.

I checked on the web, but I'm not sure on how I should proceed as many 
information I found seem outdated.

If somebody could help me to get on tracks, I'd of course appreciate. 
The issues I have are : tools to use, kernel-header files versions 
(wrt54g uses 2.4.20, means do I have to compile on a 2.4.20 machine ?), 
debugging on wrt54g (can I use standard log-file ?).

Looking forward to some help.

regards
Christophe

---

From: JP <[email-masked]>
Date: Thu, 03 Mar 2005 16:29:04 +0000

Christophe

> debugging on wrt54g (can I use standard log-file ?).

You'll need the header files that linksys used which may or may not be
different to the 2.4.10 vanilla kernel headers

for the wrt54g you can get the right code for your FW rev here.
http://www.linksys.com/support/gpl.asp

Here's a page about tools
http://www.linux-mips.org/wiki/index.php/Toolchains

You might need an older toolchain to build 2.4 kernels.
Anyone have any success on build 2.4.x with gcc 3.x?

Don't take my word for it though I've been using a recentish gcc-3.4.1
built using uclibc's buildroot to build 
It was pretty easy to get working and install.

For our 2.4 kernels I used a montavista toolchain for the last few
years. mvista.com requires you register.

Happy hacking

-- 
JP <[email-masked]>

---

From: Waldemar Brodkorb <[email-masked]>
Date: Fri, 4 Mar 2005 00:25:41 +0100

Hi,
Christophe Jelger wrote,

> Looking forward to some help.

You could try www.openwrt.org. There is even an experimental
version, which uses a kernel 2.4.29.

bye
    Waldemar

---

From: Christophe Jelger <[email-masked]>
Date: Fri, 04 Mar 2005 17:48:47 +0100

Thanks to people who replied ... I will spend some time trying to build 
the module and see what happens !

JP, I don't know if you meant compiling a standard (or a mips ?) 2.4 
kernel with gcc 3.4.1, but I know it works with gcc 3.3.5 for the 
standard kernel.

Regards
Christophe

JP wrote:
> (...)

---

From: Ralf Baechle <[email-masked]>
Date: Fri, 4 Mar 2005 17:12:53 +0000

> kernel with gcc 3.4.1, but I know it works with gcc 3.3.5 for the 

Compiling 2.4 with gcc 3.4 will fail for certain configurations.  Even
where it successfully builds there is always the danger that a more
modern that is aggressive optimizer will do unexpected things to code -
and OS code is very fragile in that aspect.  Thus I recommend to use only
2.95.3 ... 3.3 for Linux 2.4.

For 2.6 anything between 2.95.3 ... 4.0 has been tested - but 4.0 is still
a bit on the daring side while 3.4 has been tested well on many platforms.

Of course you may always be lucky - or have too much time on your hands ;-)

  Ralf