[Split] Compiling DD-WRT

Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Generic Questions
Goto page 1, 2, 3 ... 23, 24, 25  Next
Author Message
phuzi0n
DD-WRT Guru


Joined: 10 Oct 2006
Posts: 10143

PostPosted: Wed Feb 09, 2011 12:58    Post subject: Reply with quote
I'm using Ubuntu 10.04 64bit. I have the current toolchains and tornado's toolchain which seems to be included in the current toolchains archive anyways. I've tried a bunch of scripts, manually adding links and editing files, I just can't figure out how to get it to build anything.
_________________
Read the forum announcements thoroughly! Be cautious if you're inexperienced.
Available for paid consulting. (Don't PM about complicated setups otherwise)
Looking for bricks and spare routers to expand my collection. (not interested in G spec models)
Sponsor
fggs
DD-WRT Guru


Joined: 28 Jan 2008
Posts: 1741

PostPosted: Wed Feb 09, 2011 13:07    Post subject: Reply with quote
At which point you are getting errors and what kind of errors? I remember I had a problem with trx and lzma, the last one was a PATH error so you can disconsider. The trx I fixed by deleting it and compiled again.
phuzi0n
DD-WRT Guru


Joined: 10 Oct 2006
Posts: 10143

PostPosted: Wed Feb 09, 2011 14:47    Post subject: Reply with quote
The errors depend on how I try to build it. Using the most successful method so far:

Code:
unknown@unknown:~/DD-WRT/src/router$ make -f Makefile.brcm26 clean all install

[...]

make[3]: Entering directory `/media/extra/DD-WRT/src/router/upnp/src'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/media/extra/DD-WRT/src/router/upnp/src'
mipsel-linux-uclibc-gcc -Os -pipe -mips32 -mtune=mips32 -funit-at-a-time -Os -s  -D__BCMIGD__ -Os -DNDEBUG -ffunction-sections -fdata-sections -Wl,--gc-sections -I/media/extra/DD-WRT/src/router/upnp/src/linux -I/media/extra/DD-WRT/src/router/upnp/device -I/media/extra/DD-WRT/src/router/upnp/include -I/media/extra/DD-WRT/src/router/upnp/device/InternetGatewayDevice -I/media/extra/DD-WRT/src/router/upnp/device/WFADevice -I/media/extra/DD-WRT/src/include.v24 -I/media/extra/DD-WRT/src/router/shared -I/media/extra/DD-WRT/src/wps/common/include -Wall -Wunused   -o obj/linux_osl.o -c linux_osl.c
In file included from /media/extra/toolchains/toolchain-mipsel_gcc4.1.2/bin/../lib/gcc/mipsel-linux-uclibc/4.1.2/../../../../mipsel-linux-uclibc/sys-include/linux/posix_types.h:4,
                 from /media/extra/toolchains/toolchain-mipsel_gcc4.1.2/bin/../lib/gcc/mipsel-linux-uclibc/4.1.2/../../../../mipsel-linux-uclibc/sys-include/linux/types.h:22,
                 from /media/extra/DD-WRT/src/include.v24/typedefs.h:147,
                 from /media/extra/DD-WRT/src/router/shared/netconf.h:23,
                 from /media/extra/DD-WRT/src/router/shared/nvparse.h:17,
                 from linux_osl.c:39:
/media/extra/toolchains/toolchain-mipsel_gcc4.1.2/bin/../lib/gcc/mipsel-linux-uclibc/4.1.2/../../../../mipsel-linux-uclibc/sys-include/linux/stddef.h:16: error: expected identifier before numeric constant
linux_osl.c: In function 'upnp_osl_primary_lanmac':
linux_osl.c:67: warning: pointer targets in passing argument 1 of 'get_lan_mac' differ in signedness
linux_osl.c: In function 'get_lan_mac':
linux_osl.c:811: warning: pointer targets in initialization differ in signedness
linux_osl.c:819: warning: pointer targets in passing argument 1 of 'ether_atoe' differ in signedness
make[2]: *** [obj/linux_osl.o] Error 1
make[2]: Leaving directory `/media/extra/DD-WRT/src/router/upnp/src/linux'
make[1]: *** [upnp] Error 2
make[1]: Leaving directory `/media/extra/DD-WRT/src/router/upnp'
make: *** [upnp] Error 2


Or trying to use the build script:

Code:
unknown@unknown:/media/extra/DD-WRT/opt$ ./install_mini_v24-K26.sh
: command not foundK26.sh: line 1:
: command not foundK26.sh: line 3:
: command not foundK26.sh: line 5:
: command not foundK26.sh: line 7:
: command not foundK26.sh: line 8:
: No such file or directoryline 9: cd: ../src
: command not foundK26.sh: line 10:
: No such file or directoryline 11: cd: router
: command not foundK26.sh: line 12:
cp: cannot stat `./configs/broadcom_K26/.config_mini.v24-K26': No such file or directory
: command not foundK26.sh: line 15:
: command not foundK26.sh: line 18:
: command not foundK26.sh: line 19:
make: Makefile.brcm26: No such file or directory
make: *** No rule to make target `Makefile.brcm26'.  Stop.
: command not foundK26.sh: line 21:
: command not foundK26.sh: line 22:
: No such file or directoryline 23: cd: mipsel-uclibc
: command not foundK26.sh: line 24:
cp: cannot stat `dd-wrt.v24-K26.trx': No such file or directory
: command not foundK26.sh: line 26:

_________________
Read the forum announcements thoroughly! Be cautious if you're inexperienced.
Available for paid consulting. (Don't PM about complicated setups otherwise)
Looking for bricks and spare routers to expand my collection. (not interested in G spec models)
fggs
DD-WRT Guru


Joined: 28 Jan 2008
Posts: 1741

PostPosted: Wed Feb 09, 2011 14:53    Post subject: Reply with quote
Okay, from what I see, the first method shows a problem with the toolchain, the second one shows the script has wrong paths. I forgot to ask but which build you are trying to compile? The one I was able to compile was 15230, a bit old I know, but worth a shot, just to see if you are able to compile something at all.

You might also want to try openwrt toolchain.
fggs
DD-WRT Guru


Joined: 28 Jan 2008
Posts: 1741

PostPosted: Thu Feb 10, 2011 0:33    Post subject: Reply with quote
System: Debian Squeeze (stable) amd64
Toolchain: From Tornado's
Build: 15508, .config_big_v24_K26

Here's where mine stops:

Code:
make[2]: Entering in directory `/root/DD-WRT/src/router/openssl/apps'
make[2]: warning: jobserver unavailable: using -j1. Include `+' in parent rule.
rm -f openssl
shlib_target=; if [ -n "" ]; then \
                shlib_target="linux-shared"; \
        elif [ -n "" ]; then \
          FIPSLD_CC="mipsel-linux-uclibc-gcc -I/root/DD-WRT/src/router/zlib -fPIC"; CC=../fips/fipsld; export CC FIPSLD_CC; \
        fi; \
        LIBRARIES="-L.. -lssl  -L.. -lcrypto" ; \
        [ "x" = "xlibfips" ] && LIBRARIES="$LIBRARIES -lfips"; \
        make -f ../Makefile.shared -e \
                CC="${CC}" APPNAME=openssl OBJECTS="openssl.o verify.o asn1pars.o req.o dgst.o dh.o dhparam.o enc.o passwd.o gendh.o errstr.o ca.o pkcs7.o crl2p7.o crl.o rsa.o rsautl.o dsa.o dsaparam.o ec.o ecparam.o x509.o genrsa.o gendsa.o s_server.o s_client.o speed.o s_time.o apps.o s_cb.o s_socket.o app_rand.o version.o sess_id.o ciphers.o nseq.o pkcs12.o pkcs8.o spkac.o smime.o rand.o engine.o ocsp.o prime.o cms.o" \
                LIBDEPS=" $LIBRARIES " \
                link_app.${shlib_target}
make[3]: Entering in directory `/root/DD-WRT/src/router/openssl/apps'
make[3]: warning: jobserver unavailable: using -j1. Include `+' in parent rule.
( :; LIBDEPS="${LIBDEPS:--L.. -lssl  -L.. -lcrypto }"; LDCMD="${LDCMD:-mipsel-linux-uclibc-gcc -I/root/DD-WRT/src/router/zlib -fPIC}"; LDFLAGS="${LDFLAGS:--DOPENSSL_THREADS -D_REENTRANT -DDSO_ -Os -pipe -mips32 -mtune=mips32 -funit-at-a-time}"; LIBPATH=`for x in $LIBDEPS; do if echo $x | grep '^ *-L' > /dev/null 2>&1; then echo $x | sed -e 's/^ *-L//'; fi; done | uniq`; LIBPATH=`echo $LIBPATH | sed -e 's/ /:/g'`; ${LDCMD} ${LDFLAGS} -o ${APPNAME:=openssl} openssl.o verify.o asn1pars.o req.o dgst.o dh.o dhparam.o enc.o passwd.o gendh.o errstr.o ca.o pkcs7.o crl2p7.o crl.o rsa.o rsautl.o dsa.o dsaparam.o ec.o ecparam.o x509.o genrsa.o gendsa.o s_server.o s_client.o speed.o s_time.o apps.o s_cb.o s_socket.o app_rand.o version.o sess_id.o ciphers.o nseq.o pkcs12.o pkcs8.o spkac.o smime.o rand.o engine.o ocsp.o prime.o cms.o ${LIBDEPS} )
../libcrypto.a(eng_all.o): In function `ENGINE_load_builtin_engines':
eng_all.c:(.text+0x38): undefined reference to `ENGINE_load_4758cca'
eng_all.c:(.text+0x48): undefined reference to `ENGINE_load_aep'
eng_all.c:(.text+0x58): undefined reference to `ENGINE_load_atalla'
eng_all.c:(.text+0x68): undefined reference to `ENGINE_load_cswift'
eng_all.c:(.text+0x78): undefined reference to `ENGINE_load_chil'
eng_all.c:(.text+0x88): undefined reference to `ENGINE_load_nuron'
eng_all.c:(.text+0x98): undefined reference to `ENGINE_load_sureware'
eng_all.c:(.text+0xac): undefined reference to `ENGINE_load_ubsec'
collect2: ld returned 1 exit status
make[3]: ** [link_app.] Error 1
make[3]: Leaving directory `/root/DD-WRT/src/router/openssl/apps'
make[2]: ** [openssl] Error 2
make[2]: Leaving directory `/root/DD-WRT/src/router/openssl/apps'
make[1]: ** [build_apps] Error 1
make[1]: Leaving directory `/root/DD-WRT/src/router/openssl'
make: ** [openssl] Error 2
root@wrtbuilder:~/DD-WRT/src/router#
fggs
DD-WRT Guru


Joined: 28 Jan 2008
Posts: 1741

PostPosted: Thu Feb 10, 2011 12:50    Post subject: Reply with quote
Okay, scretch my last post, I solved using "make openssl-configure" inside router dir.

Now I'm stuck here:

Code:
root@wrtbuilder:~/DD-WRT/src/router/rflow# make CC=mipsel-linux-uclibc-gcc
mipsel-linux-uclibc-gcc -DIPCAD_VERSION=\"3.6.2\" -DCONFIG_FILE=\"/tmp/etc/ipcad.conf\" -DHAVE_CONFIG_H -D_REENTRANT -D_THREAD_SAFE -DIFST_linux  -I  -DHAVE_CONFIG_H -W -Wall -ffunction-sections -fdata-sections -Wl,--gc-sections  -o main.o -c main.c
main.c:12: error: expected declaration specifiers or '...' before 'setpriority'
main.c:12: error: expected declaration specifiers or '...' before 'which'
main.c:12: error: expected declaration specifiers or '...' before 'who'
main.c:12: error: expected declaration specifiers or '...' before 'prio'
main.c:12: warning: data definition has no type or storage class
main.c:12: warning: type defaults to 'int' in declaration of '_syscall3'
main.c: In function 'terminate_threads':
main.c:352: warning: empty body in an if-statement
main.c:356: warning: empty body in an if-statement
main.c:360: warning: empty body in an if-statement
make: ** [main.o] Error 1
frater
DD-WRT Guru


Joined: 07 Jun 2006
Posts: 2777

PostPosted: Thu Feb 10, 2011 13:21    Post subject: Reply with quote
I had a development environment 6 years ago, but the HD crashed. I can remember it was a pain in the ass to get it running. I think it's partly deliberate...

Would any of you like to do all the work and share it afterwards as a vmware machine?

Just asking Laughing

_________________
Asus RT16N + OTRW
Kingston 4GB USB-disk 128 MB swap + 1.4GB ext3 on /opt + 2 GB ext3 on /mnt
Copperjet 1616 modem in ZipB-config
Asterisk, pixelserv & Pound running on router
Another Asus RT16N as WDS-bridge

DD-WRT v24-sp2 vpn (c) 2010 NewMedia-NET GmbH
Release: 12/16/10 (SVN revision: 15758M)
fggs
DD-WRT Guru


Joined: 28 Jan 2008
Posts: 1741

PostPosted: Thu Feb 10, 2011 13:27    Post subject: Reply with quote
Well, I'm using virtualbox myself, but I'm not a coder so it's hard to figure what is wrong. I'll be happy to share my findings if that's what you want Very Happy
frater
DD-WRT Guru


Joined: 07 Jun 2006
Posts: 2777

PostPosted: Thu Feb 10, 2011 14:33    Post subject: Reply with quote
I don't mind a challenge and I'm sure I will learn something of it (probably how to NOT do things that way)..... But besides the reward (a working development platform) the process to get there is as usefull as a jigsaw puzzle.

Maybe hosting a vmware machine afterwards using bittorrent????

I don't understand why, after so many years, it can't be a proper environment....

All those recipes I've seen look terrible...

_________________
Asus RT16N + OTRW
Kingston 4GB USB-disk 128 MB swap + 1.4GB ext3 on /opt + 2 GB ext3 on /mnt
Copperjet 1616 modem in ZipB-config
Asterisk, pixelserv & Pound running on router
Another Asus RT16N as WDS-bridge

DD-WRT v24-sp2 vpn (c) 2010 NewMedia-NET GmbH
Release: 12/16/10 (SVN revision: 15758M)
fggs
DD-WRT Guru


Joined: 28 Jan 2008
Posts: 1741

PostPosted: Thu Feb 10, 2011 14:40    Post subject: Reply with quote
I use this script from modervador to fetch files:

Code:
#!/bin/sh
#
THECMD="co -r 13302"
echo "Checking out and/or updating."
cd ~/
svn $THECMD svn://svn.dd-wrt.com/DD-WRT -N
cd DD-WRT/
svn $THECMD svn://svn.dd-wrt.com/DD-WRT/image
svn $THECMD svn://svn.dd-wrt.com/DD-WRT/opt
svn $THECMD svn://svn.dd-wrt.com/DD-WRT/src -N
svn $THECMD svn://svn.dd-wrt.com/DD-WRT/tools
cd src/
svn $THECMD svn://svn.dd-wrt.com/DD-WRT/src/include.bcm
svn $THECMD svn://svn.dd-wrt.com/DD-WRT/src/include.v23
svn $THECMD svn://svn.dd-wrt.com/DD-WRT/src/include.v24
svn $THECMD svn://svn.dd-wrt.com/DD-WRT/src/led
svn $THECMD svn://svn.dd-wrt.com/DD-WRT/src/linux -N
svn $THECMD svn://svn.dd-wrt.com/DD-WRT/src/router
svn $THECMD svn://svn.dd-wrt.com/DD-WRT/src/ses
svn $THECMD svn://svn.dd-wrt.com/DD-WRT/src/shared
svn $THECMD svn://svn.dd-wrt.com/DD-WRT/src/squashfs-tools
svn $THECMD svn://svn.dd-wrt.com/DD-WRT/src/switch
svn $THECMD svn://svn.dd-wrt.com/DD-WRT/src/tools
svn $THECMD svn://svn.dd-wrt.com/DD-WRT/src/wl
cd linux/
svn $THECMD svn://svn.dd-wrt.com/DD-WRT/src/linux/brcm -N
cd brcm/
svn $THECMD svn://svn.dd-wrt.com/DD-WRT/src/linux/brcm/linux.v24_2
echo Done.


Change linux.V24_2 to linux-2.6.23 if you want K26 only.
frater
DD-WRT Guru


Joined: 07 Jun 2006
Posts: 2777

PostPosted: Thu Feb 10, 2011 14:51    Post subject: Reply with quote
fggs wrote:
I use this script from modervador to fetch files:

Do you mean that's it?
What kind of problems is phuzi0n having then?
I can remember it being a painful and useless process of trial and error (again... the process itself being useless).

_________________
Asus RT16N + OTRW
Kingston 4GB USB-disk 128 MB swap + 1.4GB ext3 on /opt + 2 GB ext3 on /mnt
Copperjet 1616 modem in ZipB-config
Asterisk, pixelserv & Pound running on router
Another Asus RT16N as WDS-bridge

DD-WRT v24-sp2 vpn (c) 2010 NewMedia-NET GmbH
Release: 12/16/10 (SVN revision: 15758M)
frater
DD-WRT Guru


Joined: 07 Jun 2006
Posts: 2777

PostPosted: Thu Feb 10, 2011 14:56    Post subject: Reply with quote
fggs wrote:
Well, I'm using virtualbox myself...

I tried virtualbox as a replacement for vmware on my Windows 7 HTPC, but dismissed it in the end because it couldn't be run as a service. There were some tricks, but they were very fragile...

I download Vmware 2.0 server again and migrated all my systems....

_________________
Asus RT16N + OTRW
Kingston 4GB USB-disk 128 MB swap + 1.4GB ext3 on /opt + 2 GB ext3 on /mnt
Copperjet 1616 modem in ZipB-config
Asterisk, pixelserv & Pound running on router
Another Asus RT16N as WDS-bridge

DD-WRT v24-sp2 vpn (c) 2010 NewMedia-NET GmbH
Release: 12/16/10 (SVN revision: 15758M)


Last edited by frater on Thu Feb 10, 2011 18:04; edited 1 time in total
fggs
DD-WRT Guru


Joined: 28 Jan 2008
Posts: 1741

PostPosted: Thu Feb 10, 2011 15:07    Post subject: Reply with quote
Well, once you have the files together with tornado's toolchain, you have to export PATH but you already knew that.

Here's the list of packages you will also have to install to create the build environment: gcc g++ binutils patch bzip2 flex bison make gettext unzip zlib1g-dev libc6 libncurses5-dev libstdc++5 automake automake1.7 automake1.9 openssl

It was supposed to work with: make (-f Makefile.brcm26) all, but Makefiles are a bit messy.. that's the problem when you have a single firmware for multiple platforms..

In regards of virtualbox, I don't use it as a service, but it has been improved a lot recently.
phuzi0n
DD-WRT Guru


Joined: 10 Oct 2006
Posts: 10143

PostPosted: Thu Feb 10, 2011 15:17    Post subject: Reply with quote
fggs wrote:
Okay, from what I see, the first method shows a problem with the toolchain, the second one shows the script has wrong paths. I forgot to ask but which build you are trying to compile? The one I was able to compile was 15230, a bit old I know, but worth a shot, just to see if you are able to compile something at all.

You might also want to try openwrt toolchain.

The /install_mini_v24-K26.sh script is from the svn and all the paths are correct, for some reason it gives all those garbage errors though. Copying the contents of the script to a new file works fine though so I don't get wtf is the problem...

I've been trying to compile the HEAD revision (currently ~16170ish for future readers) in both k2.4 mini and k2.6 mini versions. I checked the error trying to build k2.4 mini and it's getting stuck on upnp too. I guess I've got to hunt for a working toolchain.

_________________
Read the forum announcements thoroughly! Be cautious if you're inexperienced.
Available for paid consulting. (Don't PM about complicated setups otherwise)
Looking for bricks and spare routers to expand my collection. (not interested in G spec models)


Last edited by phuzi0n on Thu Feb 10, 2011 16:51; edited 1 time in total
fggs
DD-WRT Guru


Joined: 28 Jan 2008
Posts: 1741

PostPosted: Thu Feb 10, 2011 15:36    Post subject: Reply with quote
Do you have any tips to bypass rflow error or you never got it?

Are you exporting only bin dir from toolchain or others as well?

I might try OpenSUSE later...
Goto page 1, 2, 3 ... 23, 24, 25  Next Display posts from previous:    Page 1 of 25
Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Generic Questions All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum