pre-build (binary) modules ...

An area of the forum to discuss router binaries (utilities and applications that run on routers) etc.
med7at
Novice
Novice
Posts: 17
Joined: Sat Sep 19, 2009 8:14 pm

pre-build (binary) modules ...

Post by med7at » Mon Sep 13, 2010 6:05 pm

Greetings,

I hope you all are fine.

Could anyone please send me the pre-build (binary) ifenslave and bonding module for mips, linux 2.4.17?

Actually I'm trying now to prepare the enviro to build something but it is not easy and it may take some time. I'm from windows enviro and not used to deal with linux sources yet.

In Linux you can find anything and do everything but all in source code not binary!!! I got a pc with linux debian (minimal distro). I tried to get the cross compiler tool chain. There are a lot and for each one you have to read more than 100 pages to discover that you have to compile it first and may be also it is not the one you want. So, I decided first to get the native compiler but I shocked when I discovered that I have to compile even the compiler!!!

So, till everything settled please anyone being good enough to send me these binaries ifenslave and bonding module.

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

Re: pre-build (binary) modules ...

Post by mstombs » Mon Sep 13, 2010 7:53 pm

No idea about those apps - but something similar may be buildable in BusyBox?

Re compiling, I'd recommend the OpenWRT build system if you want a comprehensive build system that downloads and builds everything from source automagically. You could also try a Linksys WAG200G GPL distro which includes build scripts and toolchain and should compile easily (albeit with big binary blobs).
med7at
Novice
Novice
Posts: 17
Joined: Sat Sep 19, 2009 8:14 pm

Re: pre-build (binary) modules ...

Post by med7at » Mon Sep 13, 2010 9:12 pm

Thanks for your reply.

Regarding the modules I requested, it is the usual kernel bonding module used to aggregate two ethernet connections, usually called bonding.ko or bonding.o
This file is automatically generated when you build the kernel with bonding support as module.

ifenslave is a C file inside the linux source folder: /documentation/networking/ifenslave.c
It is used to attach the ethernet interfaces to the bonding driver as slaves.

For example, if you wanted to make a simple bond of two e100
devices (presumed to be eth0 and eth1):

modprobe bonding mode=balance-alb miimon=100
modprobe e100
ifconfig bond0 192.168.1.1 netmask 255.255.255.0 up
ifenslave bond0 eth0
ifenslave bond0 eth1

If you already have everything installed I think you can re-configure the 2.4.17 kernel adding bonding module and recompile it then you should get the bonding.ko and ifenslave.o

Regarding the building ...

Now I finally get the native gcc by the debian apt-get
I also got the uClibc buildroot and I configured it and trying to build everything right now but every time the buildroot makefile request a new debian package and I'm trying to collect them sometimes automatically and sometimes manually.

I'll try also to check what you suggested, thanks again for the help and information.

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

Re: pre-build (binary) modules ...

Post by thechief » Wed Sep 15, 2010 12:02 am

Perhaps if you can explain what is achieved by such bonding, we may consider enabling these things in the firmware build (if it won't add too much to the firmware size).
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.
med7at
Novice
Novice
Posts: 17
Joined: Sat Sep 19, 2009 8:14 pm

Re: pre-build (binary) modules ...

Post by med7at » Wed Sep 15, 2010 9:19 am

Regarding the bonding ... it is a way of bond or aggregate or load balance two ethernet interfaces to work together as one link with double speed. For example if you have 2 internet connections each one on one ethernet then on the bond0 interface you will have the double speed.

Another way also of load balancing is the TQL interface which is also could run as a kernel module.
I still don't know how much size these mudules would take because I still facing problems in building the kernel.

Finally I build the toolchain/cross compiler by using the buildroute and I configured the kernel 2.4.17 and build the dependencies but when I tried to compile the kernel, the compilation failed!!! I discovered that, this old kernel requires old GCC ver. 2.9 or so!!!
I guess the new GCC versions would even not compile the GCC 2.95

From where I may get binaries native GCC and toolchain/cross complier could compile kernel 2.4.17?!!!
The openwrt kernel is 2.6 and then its toolchain mostly will also not compile this old kernel.

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

Re: pre-build (binary) modules ...

Post by thechief » Wed Sep 15, 2010 9:54 am

med7at wrote:From where I may get binaries native GCC and toolchain/cross complier could compile kernel 2.4.17?!!!
Look here: http://mcmcc.bat.ru/dlinkt/cross_utils/

Compiling a firmware (kernel or filesystem) is not for the faint-hearted. Even when you succeed, the chances of the new kernel/firmware bricking your router are very high. If you don't have a serial console cable, don't even try it.

I have built the kernel module and ifenslave utility (really, just to see whether it could be done). See below. This will add about 16kb to the firmware size, and so it is not something that one would be inclined to add to the firmware. It seems to me that this a very specialised thing, that 99.9% of our users would have no need of.
You do not have the required permissions to view the files attached to this post.
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.
med7at
Novice
Novice
Posts: 17
Joined: Sat Sep 19, 2009 8:14 pm

Re: pre-build (binary) modules ...

Post by med7at » Wed Sep 15, 2010 10:35 am

Thank you for the files, you are a good man really, I'll try to insert them inside the original firmware as soon as I succeeded to compile the Firmware Modification Kit :) it seems that it also needs more debian packages! I guess the files should work as the original firmware kernel already supporting loading modules.
thechief wrote:It seems to me that this a very specialised thing, that 99.9% of our users would have no need of.
I think currently you are absolutely right but later when you add the VLAN driver and PPPOE support over ethernet interface then it will be a good addition to the RT firmware.
Also the point here is that you can enable the facility in the kernel and don't include the modules in the original firmware but let the people add them if they want. You will not loss anything.

Thanks also for the link of the cross compiler and for the valuable advice. I'll remember it.

Regards.

P.S: I sent to the manufacturer asking about the sources and they replied asking "from where you got our router?". I replied one week ago and till now no answer.
User avatar
thechief
RouterTech Team
RouterTech Team
Posts: 12067
Joined: Wed Feb 01, 2006 10:22 pm
Location: England, the Centre of Africa
Contact:

Re: pre-build (binary) modules ...

Post by thechief » Wed Sep 15, 2010 10:46 am

med7at wrote:Thank you for the files, you are a good man really
Thank you :),
med7at wrote:I'll try to insert them inside the original firmware as soon as I succeeded to compile the Firmware Modification Kit
You can upload them to the router's /var/ directory using WinSCP (assuming you are using RT firmwares). And you can test them in there.

Code: Select all

insmod-bin /var/bonding.o
./ifenslave ...
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.
med7at
Novice
Novice
Posts: 17
Joined: Sat Sep 19, 2009 8:14 pm

Re: pre-build (binary) modules ...

Post by med7at » Sat Sep 18, 2010 5:05 pm

Greetings,

Hope you all fine.

I just want to tell you that the bonding driver and ifenslave worked on my router but I'm still experiment with them to learn more. I just copied them to the RAM folder as you suggest as the Firmware Modified Kit - after I did a lot of effort to compile it - not supporting my router old flash.

While I'm testing I discovered something:
While openwrt and dd-wrt rp_pppoe plugins must dial over vlan, the aztech pppoe driver doesn't need that. it can dial the pppoe connection on any ethernet port regardless it is attached to vlan or not.
it seems that Aztech modified the original pppd driver so that it can dial the pppoe without needing any plugins.
Attached to this message the aztech pppd driver with the files I found on my router related to the pppoe connections already made.
the command is very simple:

pppd plugin pppoe eth3 user youruser password yourpass

the parameter "plugin pppoe" is just to tell the pppd to dial pppoe connection but actually no plugins file available on the router.

So, you can add this modified pppd to the RT and then it supports the pppoe over any ethernet port :) just like that.

Try it on the router RAM folder and let me know.

Regards.
You do not have the required permissions to view the files attached to this post.
mstombs
RouterTech Team
RouterTech Team
Posts: 3753
Joined: Wed Jan 10, 2007 11:54 pm

Re: pre-build (binary) modules ...

Post by mstombs » Sat Sep 18, 2010 6:27 pm

A binary pppd without source is not much use - it probably also needs pppoa and pppoe libraries. The pppd 2.4.4 we have (ex Acorp?) also doesn't use plugins - that saves a lot of code space, but does use shared libraries. There are Russian instructions for manually setting pppoe via lan ports - but for routing to work properly you should separate lan and wan traffic using vlans shouldn't you?
med7at
Novice
Novice
Posts: 17
Joined: Sat Sep 19, 2009 8:14 pm

Re: pre-build (binary) modules ...

Post by med7at » Sat Sep 18, 2010 8:32 pm

I'm not sure about shared libraries but for routing it should not effect anything.

On my router I cancelled the Vlan and combined the pppoe port to the switch, so the switch now has 4 ports collected together and I tested the firewall to check for example if there is any open ports but I didn't find anything wrong. Also the nating and routing seems working well without any problem.

I checked the dd-wrt firmware on a D-Link dir300, their kernel is completely open for everything. Qdisc, TEQL0, Bonding, Equalizer nexthop multipath etc... and all are modules. Even the iptable connmark is also a module. I ecourage you to add the modified pppd driver or build your own and also to open everything and make all be a modules. Your firmware now is good but adding these things will make it fun for different experiments such as multipthing, routing, polices, etc...
User avatar
thechief
RouterTech Team
RouterTech Team
Posts: 12067
Joined: Wed Feb 01, 2006 10:22 pm
Location: England, the Centre of Africa
Contact:

Re: pre-build (binary) modules ...

Post by thechief » Sat Sep 18, 2010 8:42 pm

med7at wrote:I'm not sure about shared libraries.
Look in the /lib/ directory, and you will see the ppp shared libraries. As mstombs said, a binary without source is of no use. Get the GPL source code from Aztech, and we might be able to do something with it.
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.
med7at
Novice
Novice
Posts: 17
Joined: Sat Sep 19, 2009 8:14 pm

Re: pre-build (binary) modules ...

Post by med7at » Sat Sep 18, 2010 9:05 pm

Yes, I found some may be related libraries, libpppoe.so, libpppoatm.so, libatm.so, libatm.so.1, libatm.so.1.0.0 and one module aztech_ppp

I wish source code will be available soon.
User avatar
thechief
RouterTech Team
RouterTech Team
Posts: 12067
Joined: Wed Feb 01, 2006 10:22 pm
Location: England, the Centre of Africa
Contact:

Re: pre-build (binary) modules ...

Post by thechief » Sat Sep 18, 2010 10:01 pm

med7at wrote:I wish source code will be available soon.
I wouldn't hold my breath ...
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.
med7at
Novice
Novice
Posts: 17
Joined: Sat Sep 19, 2009 8:14 pm

Re: pre-build (binary) modules ...

Post by med7at » Wed Sep 22, 2010 11:40 am

Greetings Chief,

I'm compiling the kernel 2.4.17 by using the cross compiler you suggested for me. there are a lot of gcc files but the only worked for me was the one start by mips_fp_le-

The compilation process proceed fine till it begin to build the kernel image and it seems that the make file arch/mips/Makefile is parsing the kernel loadaddress wrongly!!!
0x80100000 0x88002000

I selected malta board and this address is what it written inside the arch/mips/Makefile.

So, is the malta board a right choice?
can I just change the address inside the make file to 0x90020090 0x900af000 which is the load address of my original router kernel?

Regard.
Post Reply