Automation scripts for DD-WRT

38 posts / 0 new
Last post
imran
imran's picture
Automation scripts for DD-WRT

Hi achilles ,

Got ur scripts in the download section and tested them ... they are OK... I am sure that other people over here will also try this and hence I have started this thread so that people could post their experiences ....

I will also try to solve the bug that u have mentioned in the NOTE  ....

BTW till now I have only tested it for minibulid (I saw it in the ready_dd-wrt.sh).... and hope compiling other features should not be much of a problem ...

thnx 

achilles
achilles's picture
Yes u r write ... In the

Yes u r write ... In the script ready-dd_wrt.sh it is specified that build is having features of a mini-build ...
As of now I have not tested it with other .config files but I will definitely check for other features ....
Meanwhile other members can also update us abt problems(if any) in compiling other features ....

Goddchen
Goddchen's picture
Hi,

Hi,
a minute ago i posted a comment on that download. I didn't see this forum post, sry.
I can't compile dd-wrt with the provided scripts. See my error message here
http://www.myopenrouter.com/download/discussion/10874/Doesn-t-compile/
Do you have any idea what my problem could be?
Which commands did you run to compile dd-wrt with these scripts?

Goddchen

achilles
achilles's picture
Hi goddchen,

Hi goddchen,
Are u running make clean;make frm router directory or u r directly running make_and_install.sh from DD-WRT/opt....
Which toolchain version u r using ... I would suggest u to use 4.1.0-uclibc-0.9.28
Also have u gone through the steps specified ... All commands have been specified there to compile DD-WRT with these scripts ....

Goddchen
Goddchen's picture
Hey :)

Hey :)
Yes i read the NOTE. I did make clean; make in router directory, which leads me to the same error.
Next i ran the make....sh script which results in the same error :(
I'm using a toolchain built for openwrt. Is that a problem? How may i create a toolchain otherwise?

Goddchen

achilles
achilles's picture
Goddchen said:

Goddchen said:
Hey :)
Yes i read the NOTE. I did make clean; make in router directory, which leads me to the same error.
Next i ran the make....sh script which results in the same error :(
I'm using a toolchain built for openwrt. Is that a problem? How may i create a toolchain otherwise?
Goddchen

OK .... I dnt rmmbr which toolchain was used for OpenWRT ... I would suggest u to get the toolchain that I am using ...

The steps have been shown below :

1.wget http://www.dd-wrt.com/dd-wrtv2/downloads/others/sourcecode/toolchains/to...


2.tar -jxf toolchains.x86.debian.sp1.tar.bz2

3.sudo ln -s /home/dd-wrt/toolchains/4.1.0-uclibc-0.9.28/ /opt/4.1.0 (I m assuming that toolchains has been untared in /home/dd-wrt)

ln -s /home/dd-wrt/toolchains/4.1.0-uclibc-0.9.28/ /home/dd-wrt/toolchains/4.1.0

4.export PATH=/opt/4.1.0/bin:$PATH

Please do these steps and run ready_dd-wrt.sh and then make clean;make frm router directory ....

Do inform me abt ur findings ....

 

 

Goddchen
Goddchen's picture
OK, i'll try out that

OK, i'll try out that toolchain tomorrow.
The one is used was built while building openwrt... (download openwrt src -> make menuconfig -> make) that's it.
I'll inform you about success or failure tomorrow :)

Goddchen
Goddchen's picture
Good morning :)

Good morning :)
OK, this time i got a little bit further :) But then again a nasty error :(

mipsel-linux-uclibc-ld -shared -o libnetconf.so netconf_linux.o -L. -L/home/goddchen/XY-Projekt/dd-wrt_scripts/DD-WRT/src/router/iptables.linksys/libiptc/ -liptc
mipsel-linux-uclibc-ld: cannot find -liptc
make[1]: *** [libnetconf.so] Fehler 1
make[1]: Verlasse Verzeichnis '/home/goddchen/XY-Projekt/dd-wrt_scripts/DD-WRT/src/router/netconf'

This occurs when i call ../../make_and_install.sh from within DD-WRT/opt directory (like you told me to).
Any ideas?

Goddchen

achilles
achilles's picture
Goddchen said:

Goddchen said:
Good morning :)
OK, this time i got a little bit further :) But then again a nasty error :(

mipsel-linux-uclibc-ld -shared -o libnetconf.so netconf_linux.o -L. -L/home/goddchen/XY-Projekt/dd-wrt_scripts/DD-WRT/src/router/iptables.linksys/libiptc/ -liptc
mipsel-linux-uclibc-ld: cannot find -liptc
make[1]: *** [libnetconf.so] Fehler 1
make[1]: Verlasse Verzeichnis '/home/goddchen/XY-Projekt/dd-wrt_scripts/DD-WRT/src/router/netconf'

This occurs when i call ../../make_and_install.sh from within DD-WRT/opt directory (like you told me to).
Any ideas?
Goddchen

hmm ... there is a bug in the script (It has been mentioned as a note also) ... When we compile DD-WRT for the first time we need to run make clean;make from DD-WRT/router directory .....

Plz do this and let me know ... 

Goddchen
Goddchen's picture
of course i did that before

of course i did that before invoking the make_and_install.sh script.
i went to DD-WRT/src/router and did "make clean; make".
That worked just fine... The error occurs when invoking make_and_install.sh afterwards.

achilles
achilles's picture
Goddchen said:

Goddchen said:
of course i did that before invoking the make_and_install.sh script.
i went to DD-WRT/src/router and did "make clean; make".
That worked just fine... The error occurs when invoking make_and_install.sh afterwards.

If that worked fine then it means that u r able to compile DD-WRT distribution .... Now do a checking run make clean;make;make install

frm DD-WRT/router and let me know ...  As build with the script failed I am suggesting u to do make clean and make again and then run make install ....

Goddchen
Goddchen's picture
By DD-WRT/router you mean DD

By DD-WRT/router you mean DD-WRT/src/router, right? Because i don't have DD-WRT/router :(
Now running make clean in router directory works fine. Running make fails:

mipsel-linux-uclibc-gcc -Os -pipe -mips32 -mtune=mips32 -funit-at-a-time -Wall -Wunused -I/home/goddchen/XY-Projekt/dd-wrt_scripts/DD-WRT/src/linux/brcm/linux.v24_2/include -Iinclude/ -fpic -DIPTABLES_VERSION=\"1.2.7a\" -DIPT_LIB_DIR=\"/home/goddchen/XY-Projekt/toolchains/3.4.6-uclibc-0.9.28/lib/iptables\" -rdynamic -o iptables iptables-standalone.o -ldl -L. -liptables
/home/goddchen/XY-Projekt/toolchains/3.4.6-uclibc-0.9.28/bin/../lib/gcc/mipsel-linux-uclibc/3.4.6/../../../../mipsel-linux-uclibc/bin/ld: iptables: hidden symbol `__udivdi3' in /home/goddchen/XY-Projekt/toolchains/3.4.6-uclibc-0.9.28/bin/../lib/gcc/mipsel-linux-uclibc/3.4.6/libgcc.a(_udivdi3.oS) is referenced by DSO
/home/goddchen/XY-Projekt/toolchains/3.4.6-uclibc-0.9.28/bin/../lib/gcc/mipsel-linux-uclibc/3.4.6/../../../../mipsel-linux-uclibc/bin/ld: final link failed: Nonrepresentable section on output
collect2: ld returned 1 exit status
make[1]: *** [iptables] Fehler 1

I'm a little depressed right now :(

achilles
achilles's picture
Goddchen said:

Goddchen said:
By DD-WRT/router you mean DD-WRT/src/router, right? Because i don't have DD-WRT/router :(
Now running make clean in router directory works fine. Running make fails:

mipsel-linux-uclibc-gcc -Os -pipe -mips32 -mtune=mips32 -funit-at-a-time -Wall -Wunused -I/home/goddchen/XY-Projekt/dd-wrt_scripts/DD-WRT/src/linux/brcm/linux.v24_2/include -Iinclude/ -fpic -DIPTABLES_VERSION=\"1.2.7a\" -DIPT_LIB_DIR=\"/home/goddchen/XY-Projekt/toolchains/3.4.6-uclibc-0.9.28/lib/iptables\" -rdynamic -o iptables iptables-standalone.o -ldl -L. -liptables
/home/goddchen/XY-Projekt/toolchains/3.4.6-uclibc-0.9.28/bin/../lib/gcc/mipsel-linux-uclibc/3.4.6/../../../../mipsel-linux-uclibc/bin/ld: iptables: hidden symbol `__udivdi3' in /home/goddchen/XY-Projekt/toolchains/3.4.6-uclibc-0.9.28/bin/../lib/gcc/mipsel-linux-uclibc/3.4.6/libgcc.a(_udivdi3.oS) is referenced by DSO
/home/goddchen/XY-Projekt/toolchains/3.4.6-uclibc-0.9.28/bin/../lib/gcc/mipsel-linux-uclibc/3.4.6/../../../../mipsel-linux-uclibc/bin/ld: final link failed: Nonrepresentable section on output
collect2: ld returned 1 exit status
make[1]: *** [iptables] Fehler 1

I'm a little depressed right now :(

Well ,u shud not be depressed ..... compiling DD-WRT is an uphill task .. BTW I meant the same router directory  i.e DD-WRT/src/router ....

Coming to the error that u are getting make sure that u use 4.1.0 version of toolchain .... It seems that u are using 3.4.6 -uclibc-0.9.28 ... I used to get exactly the same error as u whenever I used 3.4.6 ..... so make sure that you do:

export PATH=/opt/4.1.0/bin:$PATH ....

It seems we are doing something wrong in toolchain setup .... dnt lose hope ... and keep me posted abt ur proceedings .... 

Goddchen
Goddchen's picture
Hey, toolchain 4.x did the

Hey, toolchain 4.x did the trick (nearly...) :)
Compilation and installation seems to work now (i used your make_and_install.sh script).
But now there's the next problem:

table size 4437 bytes (4.33 Kbytes)
60.27% of uncompressed directory table size (7362 bytes)
Number of duplicate files found 1
Number of inodes 508
Number of files 284
Number of fragments 17
Number of symbolic links 182
Number of device nodes 0
Number of fifo nodes 0
Number of socket nodes 0
Number of directories 42
Number of uids 1
root (0)
Number of gids 0

mjn3's trx replacement - v0.81.1
can not open "../src/router/mipsel-uclibc/vmlinuz" for reading
Usage: trx [-o outfile] [-m maxlen] [-a align] [-b offset] file [file [file]]

Somehow there is no vmlinuz file. Even find ./ -name vmlinuz doesn't find anything. Maybe it's named differently? The directory src/router/mipsel-uclibc/ onyl contains two directories: "install" and "target".
I'm off for today. See you tomorrow :)

Goddchen

achilles
achilles's picture
OK .... that's grt .... not

OK .... that's grt .... not being able to find vmlinuz means there is something wrong in make or install process ....
Did u run the script make_and_install.sh b4 running make clean;make from router ..
I am insisting to run make clean;make ;make install from the router directory at first ... this helps in tracing out if smthing wrong happens .... using the script directly makes it vey difficult to trace out the pblm ...
I think we are almost there ...
Just tell me what u r getting when u run make clean;make;make install from the router directory ... Are these 3 steps happening properly .... lets hope 2mrw we will be able to get it compiled 4 u ....

Goddchen
Goddchen's picture
Good morning :)

Good morning :)
This is what i'm normally doing (should be ok, right?)

487 export PATH=$PATH:/home/goddchen/XY-Projekt/toolchains/4.1.0-uclibc-0.9.28/bin/
488 rm -rf DD-WRT/
489 ./checkout-dd-wrt.sh
490 ./ready_ddwrt.sh DD-WRT/
491 cd DD-WRT/src/router/
492 make clean; make
493 cd ../../opt
494 ../../make_and_install.sh

I'm currently testing the hints from your last post and will inform you...

Goddchen
Goddchen's picture
Damn, got a new error :(

Damn, got a new error :(

make[1]: /opt/3.3.6/bin/mipsel-linux-uclibc-gcc: Kommando nicht gefunden
make[1]: *** [init/do_mounts.o] Fehler 127

Kommando nicht gefunden means command not found and Fehler means error. Just to make everything clear.
why is it looking for an opt directory at the root of my filesystem? Of course there is no 3.3.6....mipsel... folder at all. Why doesn't it use the gcc in the toolchains folder like it did on all the other files before?
Any idea?

achilles
achilles's picture
Goddchen said:

Goddchen said:
Damn, got a new error :(

make[1]: /opt/3.3.6/bin/mipsel-linux-uclibc-gcc: Kommando nicht gefunden
make[1]: *** [init/do_mounts.o] Fehler 127

Kommando nicht gefunden means command not found and Fehler means error. Just to make everything clear.
why is it looking for an opt directory at the root of my filesystem? Of course there is no 3.3.6....mipsel... folder at all. Why doesn't it use the gcc in the toolchains folder like it did on all the other files before?
Any idea?

Good morning Goddchen ... I saw both of ur last posts ... It looks OK but somewhere in README files that are there in DD-WRT distribution I read that toolchain should be in /opt  that's why I keep them in /opt ....

I would suggest u to keep them in /opt for the time being ....

In the post that I sent u containing instructions for downloading tool-chains ..I mentioned how to create a soft link between ur toolchain and /opt/4.1.0 ..just look into those steps .... and let me know .. 

achilles
achilles's picture
One more thing I obsrved from

One more thing I obsrved from ur posts that u have not kept the script "make_and_install.sh" in DD-WRT/opt ...it should be there if u want to use it without any modification ....
If u keep it at some other place u need to modify it to accomodate different locations which have been given relative to DD-WRT/opt

Goddchen
Goddchen's picture
ok, i did create the symlinks

ok, i did create the symlinks. Sorry that i forgot to do so before :(
So i created /opt/4.1.0 pointing to my 4.1.0 toolchain. But still the makefile looks in /opt/3.3.6 for the cross compiler. I now just did a symlink from /opt/3.3.6 pointing to my 4.1.0 toolchain. Let's see if that helps... (compiling atm)

Goddchen
Goddchen's picture
ok it now compiled a little

ok it now compiled a little further. Next error:

make[3]: Verlasse Verzeichnis '/home/goddchen/XY-Projekt/dd-wrt_scripts/DD-WRT/src/linux/brcm/linux.v24_2/fs/squashfs'
/opt/3.3.6/bin/mipsel-linux-uclibc-gcc -D__KERNEL__ -I/home/goddchen/XY-Projekt/dd-wrt_scripts/DD-WRT/src/linux/brcm/linux.v24_2/include -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fno-builtin-strpbrk -fno-builtin-sprintf -DBCMDRIVER -DBCMVISTAROUTER -DBCM5354 -DBCMWPA2 -fomit-frame-pointer -funit-at-a-time -Wno-pointer-sign -I /home/goddchen/XY-Projekt/dd-wrt_scripts/DD-WRT/src/linux/brcm/linux.v24_2/include/asm/gcc -G 0 -mno-abicalls -fno-pic -pipe -DBCMGPIO2 -finline-limit=100000 -O2 -mabi=32 -march=mips32 -Wa,-32 -Wa,-march=mips32 -Wa,-mips32 -Wa,--trap -nostdinc -iwithprefix include -DKBUILD_BASENAME=sys -DEXPORT_SYMTAB -c sys.c
signal.c: In function 'do_sigaltstack':
signal.c:1182: error: read-only variable '__gu_val' used as 'asm' output
signal.c:1182: error: read-only variable '__gu_val' used as 'asm' output
signal.c:1182: error: read-only variable '__gu_val' used as 'asm' output
signal.c:1182: error: read-only variable '__gu_val' used as 'asm' output
signal.c:1183: error: read-only variable '__gu_val' used as 'asm' output
signal.c:1183: error: read-only variable '__gu_val' used as 'asm' output
signal.c:1183: error: read-only variable '__gu_val' used as 'asm' output
signal.c:1183: error: read-only variable '__gu_val' used as 'asm' output
signal.c:1184: error: read-only variable '__gu_val' used as 'asm' output
signal.c:1184: error: read-only variable '__gu_val' used as 'asm' output
signal.c:1184: error: read-only variable '__gu_val' used as 'asm' output
signal.c:1184: error: read-only variable '__gu_val' used as 'asm' output
make[3]: *** [signal.o] Fehler 1

achilles
achilles's picture
hmmm ... when r u getting

hmmm ... when r u getting this error running make clean;make frm DD-WRT/src/router or running the script ....

Goddchen
Goddchen's picture
exactly

exactly

achilles
achilles's picture
Goddchen said:

Goddchen said:
exactly

sorry but I did not get u ... u r getiing this error by running script ,right ?????

Goddchen
Goddchen's picture
i did:

i did:

rm -rf DD-WRT/
./checkout-dd-wrt.sh
./ready_ddwrt.sh DD-WRT/
cd DD-WRT/src/router
make clean
make

achilles
achilles's picture
OK ... let me look into it ..

OK ... let me look into it ... I have not come across such an error ... I will inform u ASAP ...

Goddchen
Goddchen's picture
do you have any instant

do you have any instant messenger contact? Before we are banned for spamming the forum... ;)
ICQ: 81608514
Skype: Goddchen
GTalk: goddchen@googlemail.com

Goddchen
Goddchen's picture
oh man, i'm getting crazy

oh man, i'm getting crazy here ;)
each time i do a fresh clean new run i get another error :(
This time a realy strange one:

make[1]: Betrete Verzeichnis '/home/goddchen/XY-Projekt/dd-wrt_scripts/DD-WRT/src/router/pptpd'
cd . && /bin/sh /home/seg/DEV/broadcom/src/router/pptpd/missing --run autoheader
/bin/sh: Can't open /home/seg/DEV/broadcom/src/router/pptpd/missing
make[1]: *** [config.h.in] Fehler 2

Of course it can't find that file, because there is no such user (seg) on my system at all. Seems like there is an absolute path in some makefile somewhere :(
But then i ask myself: why didn't i get that error before?

achilles
achilles's picture
Goddchen said:

Goddchen said:
do you have any instant messenger contact? Before we are banned for spamming the forum... ;)
ICQ: 81608514
Skype: Goddchen
GTalk: goddchen@googlemail.com

Sorry man but I have neither of them .... I will create an account in gtalk and give u the id .... In the mean time we can continue here ... Dnt think we r doing any thing that will spam the site ... We r just in the middle of learning something which well help others too .. :)

achilles
achilles's picture
Goddchen said:

Goddchen said:
oh man, i'm getting crazy here ;)
each time i do a fresh clean new run i get another error :(
This time a realy strange one:

make[1]: Betrete Verzeichnis '/home/goddchen/XY-Projekt/dd-wrt_scripts/DD-WRT/src/router/pptpd'
cd . && /bin/sh /home/seg/DEV/broadcom/src/router/pptpd/missing --run autoheader
/bin/sh: Can't open /home/seg/DEV/broadcom/src/router/pptpd/missing
make[1]: *** [config.h.in] Fehler 2

Of course it can't find that file, because there is no such user (seg) on my system at all. Seems like there is an absolute path in some makefile somewhere :(
But then i ask myself: why didn't i get that error before?

ya u r really throwing some strange errors ... :) ... dnt know why u r getting such behavior ... give me some time to look into it ... I will definitely let u know  ...

Goddchen
Goddchen's picture
you're right.

you're right.
and you can be sure, when i get this thing working at the end i'll write everything down here somewhere so that it helps others ;)
In the meantime i think i have made some progress. After some google search for that asm error message, i found that it's a problem of the 4.1.x gcc. It's some more restrictive then the 3.x version. So i'm trying now to compile the kernel with the 3.x gcc and the rest with 4.x gcc...
And the other problem with the absolute path in the makefile: it's realy an absolute path in that makefile, for now i just changed it to the abs. path that fits for me...

Pages