.

[newbie] re-compiling GPL on Linux

<<

mark77

Newbie
Newbie

Posts: 11

Joined: Sun May 31, 2009 1:38 pm

Post Tue Jul 21, 2009 1:59 am

[newbie] re-compiling GPL on Linux

i wanted to re-compile some GPL code of a router's Firmware in order to run some executables Linux.
The codes have been published by the producer himselfs!

what 'm mostly interested in is the executable "rgbin":
can you have a look and tell me whether the sourcecode is actually complete ?
besides, some external files, which are linked with included in the "rgbin" makefile, seem to be empty...?


the "rgbin"-related codes can be found this archive: ftp://ftp.dlink.co.uk/GPL/DI-524_E1_GPL.tgz
at these paths:

di524\userland\target\usr\sbin\rgbin
di524\progs.priv\rgbin\Makefile
di524\progs.priv\rgbin\rgbin

thanks a lot for your help!
Regards.
<<

mark77

Newbie
Newbie

Posts: 11

Joined: Sun May 31, 2009 1:38 pm

Post Thu Jul 23, 2009 8:43 am

Re: [newbie] re-compiling GPL on Linux

anybody can help ?
<<

mark77

Newbie
Newbie

Posts: 11

Joined: Sun May 31, 2009 1:38 pm

Post Tue Aug 04, 2009 2:39 am

Re: [newbie] re-compiling GPL on Linux

sorry...i need your help,
'cause i guess the codes don't have just to be compiled (makefile9,
but also re-compiled onto x86 (since the firmware's codes weere designed for MIPS processors)...

anyone can help ?
thanks
<<

Ketchup

User avatar

Hero Member
Hero Member

Posts: 1021

Joined: Fri Jul 04, 2008 7:44 pm

Location: Philadelphia, PA

Post Tue Aug 04, 2009 1:48 pm

Re: [newbie] re-compiling GPL on Linux

Mark77, I think that anytime you have to rewrite something for a different processor architecture, it's quite an undertaking.  I think that you are in for a bit of work on this one.  You or someone else would have to go through all of the code.
~~~~~~~~~~~~~~
Ketchup
<<

mark77

Newbie
Newbie

Posts: 11

Joined: Sun May 31, 2009 1:38 pm

Post Tue Aug 04, 2009 2:41 pm

Re: [newbie] re-compiling GPL on Linux

actually i'd need just the executable called "rgbin"...
could it be done ?
i wouldn't know how to make it  ???

another source link:
ftp://ftp.dlink.se/Products/di-products ... source.tgz
<<

mark77

Newbie
Newbie

Posts: 11

Joined: Sun May 31, 2009 1:38 pm

Post Mon Aug 10, 2009 1:18 pm

Re: [newbie] re-compiling GPL on Linux

ok, the source codes seem to be nested, so they have to be compiled entirely

after some struggle, i tried a compiling on Ubuntu (there's a tolchain provided for different archtecture...)
but when i run some tools, i get errors and no good output

for instance, if you give this commnand:
  Code:
rgdb -D config.bin

(rgdb is an alias of rgbin, as far as i can see)
you get this message
bash: ./rgdb: cannot execute binary file


...what's wrong with it?
Last edited by mark77 on Mon Aug 10, 2009 1:23 pm, edited 1 time in total.
<<

Ketchup

User avatar

Hero Member
Hero Member

Posts: 1021

Joined: Fri Jul 04, 2008 7:44 pm

Location: Philadelphia, PA

Post Mon Aug 10, 2009 2:20 pm

Re: [newbie] re-compiling GPL on Linux

I am not sure which toolchain you are using, but it's likely generating a binary file that is meant to run on a different architecture. 
~~~~~~~~~~~~~~
Ketchup
<<

mark77

Newbie
Newbie

Posts: 11

Joined: Sun May 31, 2009 1:38 pm

Post Mon Aug 10, 2009 4:31 pm

Re: [newbie] re-compiling GPL on Linux

hi!

actually, if you take a look at those files in the GPL
ftp://ftp.dlink.co.uk/GPL/DI-524_E1_GPL.tgz
they seem to me like these they show no source, on the contrary they look like the binary image (maybe) of the original firmware tool, which was cmpiled onto MIPS:

.\di524\userland\target\usr\sbin\rgbin
.\di524\progs.priv\rgbin\rgbin
.\di524\progs.priv\rgbin\Makefile

.\di524\userland\target\usr\sbin\rgdb
.\di524\tools\alpha\rgdb\rgdb
.\di524\tools\alpha\rgdb\Makefile

am i wrong?
Last edited by mark77 on Mon Aug 10, 2009 4:33 pm, edited 1 time in total.
<<

Ketchup

User avatar

Hero Member
Hero Member

Posts: 1021

Joined: Fri Jul 04, 2008 7:44 pm

Location: Philadelphia, PA

Post Mon Aug 10, 2009 6:18 pm

Re: [newbie] re-compiling GPL on Linux

It looks like a binary file to me.  Does D-Link have a developer forum or another resource you can ask?  Much of this code is going to be specific to their equipment. 
~~~~~~~~~~~~~~
Ketchup
<<

mark77

Newbie
Newbie

Posts: 11

Joined: Sun May 31, 2009 1:38 pm

Post Wed Aug 12, 2009 6:55 am

Re: [newbie] re-compiling GPL on Linux

yes, i already asked more than one D-Link support...but they answer telling they released the GPL but don't give support about that.

if you have some time left, may you try what i did and tell me if you have different results?

i used Ubuntu..i don't know if it depends on it...?

otherwise, i can only guess an alternative:
running the compiled  on a MIPS architecture's emulation, like this ?
http://www.qemu.org/
http://sourceforge.net/projects/aqemu/
...but i never did that, i wouldn't know how to deal with it
Last edited by mark77 on Wed Aug 12, 2009 6:57 am, edited 1 time in total.

Return to Programming

Who is online

Users browsing this forum: No registered users and 0 guests

.
Powered by phpBB® Forum Software © phpBB Group.
Designed by ST Software