PDA

Bekijk de volledige versie : Compile the firmware from Gpl 1.0.4.2



MoD
02-07-2006, 22:08
I see that noone was able to compile the firmware from the source. Why not to share our expierence? Here is mine.
Enviorment: Fedora Core 4

1) be sure you have ash shell. if not, install it:
ftp://rpmfind.net/linux/fedora/core/3/i386/os/Fedora/RPMS/ash-0.3.8-20.i386.rpm

2) download and prepare the kernel tree, toolchain and environment:

Download ftp://dlsvr02.asus.com/pub/ASUS/wireless/WL-500g-03/GPL_1927.zip
File is not a regular pkzip file but a .tar.gz archive. Rename it to GPL_1927.tar.gz and unpack:
# tar -C /whatever/you/want -xzf /path/to/GPL_1927.tar.gz

This will create a /whatever/you/want/broadcom/... tree

Move entire /whatever/you/want/broadcom/opt to /opt:
# cd /whatever/you/want/broadcom/ && mv opt /

Add toolchain to your path:
# export PATH=$PATH:/opt/brcm/hndtools-mipsel-uclibc/bin:/opt/brcm/hndtools-mipsel-linux/bin

3) download GPL source from ftp://dlsvr01.asus.com/pub/ASUS/wireless/WL-700g/GPL_WL700gE_1042tar.zip
extract file GPL_WL700gE_1.0.4.2.tar.gz from the archive and unpack it:

# tar xvfz GPL_WL700gE_1.0.4.2.tar.gz

go to proper directory "WL700g/nasoc/src/apps"

# cd WL700g/nasoc/src/apps

To generate the image for the first time, type:

# make rebuild

Here I got an error::mad:

make[2]: *** No rule to make target `/opt/brcm/hndtools-mipsel-linux/lib/gcc-lib/mipsel-linux/3.0/include/stddef.h', needed by `popt.o'. Stop.
make[2]: Leaving directory `/root/WL700g/nasoc/src/apps/popt'
make[1]: *** [popt] Error 2
make[1]: Leaving directory `/root/WL700g/nasoc/src/apps'
make: *** [rebuild] Error 2

Any comments?


if the result is succefull, you can make an image by typing:

# make image-WL700gE

hernidez
03-07-2006, 22:03
To overcome this problem, delete directory .deps (or its content) in /root/WL700g/nasoc/src/apps/popt directory and run ./configure again.

Maybe its a good idea to delete all .deps in whole project ... I have tried it and it seems nothing was broken.

Another issue was unreferenced errno.h, fixed by some manual includes (my system is Debian 3.1)
#include <errno.h>

This is the last point of my compilation attempt:

[ ! -f raidtools/Makefile ] || make -C raidtools
make[2]: Entering directory `/root/WL700g/nasoc/src/apps/raidtools'
mipsel-linux-gcc -o raidstart raidstart.o parser.o raidlib.o version.o raid_io.o scsi.o reconfiguration.o rrc_common.o rrc_raid0.o rrc_raid5.o rrc_single.o ../popt/libpopt.a
raid_io.o: In function `raidseek':raid_io.c: (.text+0x3d4) : undefined reference to `_llseek'
:raid_io.c: (.text+0x3e8) : undefined reference to `_llseek'
collect2: ld returned 1 exit status
make[2]: *** [raidstart] Error 1
make[2]: Leaving directory `/root/WL700g/nasoc/src/apps/raidtools'
make[1]: *** [raidtools] Error 2
make[1]: Leaving directory `/root/WL700g/nasoc/src/apps'
make: *** [rebuild] Error 2

I am not able to resolve this error.

MoD
03-07-2006, 22:10
Before I saw your post, I was trying different things. And made some progress.

Good news are that raidtools compiles succsefully!!!

1) I created the new enviorment as I described here.
2) I created 2 links:

# ln -s /root/WL700g/nasoc/src/linux/linux/include/linux /opt/brcm/hndtools-mipsel-linux/lib/gcc-lib/mipsel-linux/3.0

# ln -s /opt/brcm/hndtools-mipsel-linux/lib/gcc-lib/mipsel-linux/3.2.3/include /opt/brcm/hndtools-mipsel-linux/lib/gcc-lib/mipsel-linux/3.0


then I did:

# cd WL700g/nasoc/src/apps
# make rebuild

everything was compiling until I got an error:

make[2]: Entering directory `/root/WL700g/nasoc/src/apps/rtc.asus'
mipsel-linux-gcc -O2 -mips2 -mcpu=r4600 -Wa,--trap -m4710a0kern -pipe -mno-abica lls -G 0 -fomit-frame-pointer -fno-strict-aliasing -shared -fno-PIC -I../../linu x/linux/include/linux -I../../linux/linux/include/asm-mips -I../../linux/linux/i nclude -I/opt/brcm/hndtools-mipsel-linux/mipsel-linux/include -I../../include -I ./ -DMODULE -D__KERNEL__ -mlong-calls -DLinux -c rtcrv5c386a.c -o bcmrtc5c386.o
mipsel-linux-ld -r ./bcmrtc.o ./bcmrtc5c386.o -o asusrtc5c386.o
mipsel-linux-ld: ./bcmrtc5c386.o: uses different e_flags (0x0) fields than previous modules (0x100)
Bad value: failed to merge target specific data of file ./bcmrtc5c386.o
make[2]: *** [asusrtc5c386.o] Error 1
make[2]: Leaving directory `/root/WL700g/nasoc/src/apps/rtc.asus'
make[1]: *** [rtc.asus] Error 2
make[1]: Leaving directory `/root/WL700g/nasoc/src/apps'
make: *** [rebuild] Error 2

It sems that rtc.asus also compiles, but the problem is with linker:

mipsel-linux-ld -r ./bcmrtc.o ./bcmrtc5c386.o -o asusrtc5c386.o
mipsel-linux-ld: ./bcmrtc5c386.o: uses different e_flags (0x0) fields than previous modules (0x100)

It seems that asusrtc5c386.o is created by make, but bcmrtc.o is binary only and there is a problem with e_flags:(

Any ideas how to resolve this?

MoD
03-07-2006, 22:50
there is a directory /root/WL700g/nasoc/src/apps/mipsel-uclibc

I'm thinking if it is also some linking directory?!:rolleyes:

MoD
03-07-2006, 22:56
instead of using mipsel-linux 3.2.3 we have to use mipsel-linux 3.0 ?

look here: http://wl500g.info/showthread.php?t=744

I think we should try to use hndtools-mipsel-linux-3.0 from http://files.wl500g.info/asus/wl500g/gpl/GPL_1.8.1.9.tar.gz

The reason why I made these links:



# ln -s /root/WL700g/nasoc/src/linux/linux/include/linux /opt/brcm/hndtools-mipsel-linux/lib/gcc-lib/mipsel-linux/3.0

# ln -s /opt/brcm/hndtools-mipsel-linux/lib/gcc-lib/mipsel-linux/3.2.3/include /opt/brcm/hndtools-mipsel-linux/lib/gcc-lib/mipsel-linux/3.0

was that while making rebuild somewhere I got an error saying that it can't find something in .../3.0... folder.

My conclusion is that Asus is not using toolchain and kernel from GPL_1927.zip

MoD
04-07-2006, 22:36
It seems that I succeeded with copiling the firmware. I still have some minor problems with permition:

cd /root/WL700g/nasoc/src/apps/pivot_root/mipsel/target && /root/WL700g/nasoc/src/apps/misc/pivotprep.sh && mkcramfs . /root/WL700g/nasoc/src/apps/pivot_root/mipsel/target.cramfs
mkcramfs: stat failed: .: Permission denied
make[3]: *** [install] Error 16
make[3]: Leaving directory `/root/WL700g/nasoc/src/apps/pivot_root'
make[2]: *** [pivot_root-install] Error 2
make[2]: Leaving directory `/root/WL700g/nasoc/src/apps'
make[1]: *** [image-WL700gE] Error 2
make[1]: Leaving directory `/root/WL700g/nasoc/src/apps'
make: *** [rebuild] Error 2

but it seems promissing:) Could anyone check this problem with cramfs?

MoD
06-07-2006, 18:59
I'm making progress.

That is good:)

A lot of views in this thread but noone is willing to help me.

That is sad:rolleyes:

MoD
06-07-2006, 19:40
I did it! I did it!!!:) I was able to compile the firmware from GPL source.

I'm not an expert in making modification in firmware, but I compiled and flashed the firmware to my router. It seems to be working. I'm going to make a tutorial.

Who wants to test it?

Antiloop
06-07-2006, 21:02
I did it! I did it!!!:) I was able to compile the firmware from GPL source.

I'm not an expert in making modification in firmware, but I compiled and flashed the firmware to my router. It seems to be working. I'm going to make a tutorial.

Who wants to test it?
I've seen it, thank you :)

I was busy with testing it last week.. but time flew away.. so have to find it again then I will test it :)

MoD
06-07-2006, 21:18
Can anyone give me a hint how to add telnetd or ssh to the firmware? I could make a modification.

I need just a small hint...

IMM22
07-07-2006, 07:57
Can anyone give me a hint how to add telnetd or ssh to the firmware? I could make a modification.

I need just a small hint...

Sorry for not helping you... I'm even install Suse 10.1 in my laptop to see if I can make anything, but it seem that is a thing for "power users" I'm just a normal user :(

oleo
07-07-2006, 08:47
cd busybox
make menuconfig
select telnetd applet
recompile

MoD
07-07-2006, 11:49
How can I launch the telnet daemon on startup or via web interface?

oleo
07-07-2006, 11:55
/usr/sbin/telnetd

ralam
07-07-2006, 12:03
Isn't it possible to use something like VMWare Player (http://www.vmware.com/products/player/) from VMWare with a linux image? Just for the people who'd like to compile play around with the firmware, but don't have a linux machine. It's free to use...

There is for example a Fedora Core 5 standard install package. And I believe you can still install extra stuff into those images (it creates a second file with a virtual filesystem in it, to store those things in)




Remco

MoD
07-07-2006, 12:45
/usr/sbin/telnetd

but how can I launch it from web interface? is there a startup script for lauch it on booting?

Gizmo1007
07-04-2008, 10:35
everything was compiling until I got an error:



make[2]: Entering directory `/root/WL700g/nasoc/src/apps/rtc.asus'
mipsel-linux-gcc -O2 -mips2 -mcpu=r4600 -Wa,--trap -m4710a0kern -pipe -mno-abica lls -G 0 -fomit-frame-pointer -fno-strict-aliasing -shared -fno-PIC -I../../linu x/linux/include/linux -I../../linux/linux/include/asm-mips -I../../linux/linux/i nclude -I/opt/brcm/hndtools-mipsel-linux/mipsel-linux/include -I../../include -I ./ -DMODULE -D__KERNEL__ -mlong-calls -DLinux -c rtcrv5c386a.c -o bcmrtc5c386.o
mipsel-linux-ld -r ./bcmrtc.o ./bcmrtc5c386.o -o asusrtc5c386.o
mipsel-linux-ld: ./bcmrtc5c386.o: uses different e_flags (0x0) fields than previous modules (0x100)
Bad value: failed to merge target specific data of file ./bcmrtc5c386.o
make[2]: *** [asusrtc5c386.o] Error 1
make[2]: Leaving directory `/root/WL700g/nasoc/src/apps/rtc.asus'
make[1]: *** [rtc.asus] Error 2
make[1]: Leaving directory `/root/WL700g/nasoc/src/apps'
make: *** [rebuild] Error 2


mipsel-linux-ld -r ./bcmrtc.o ./bcmrtc5c386.o -o asusrtc5c386.o
mipsel-linux-ld: ./bcmrtc5c386.o: uses different e_flags (0x0) fields than previous modules (0x100)



This is the same error MoD saw in 2006, however I cannot find a posted solution.
I have tried to link to version 3.0 of the toolchain and a number of links to different tool chains within system. I am running Fiesty Ubuntu.
Any help would really be appreciated.

Anyone know where the Nvram can be edited, I want to change some default values in the firmware I am building.