compiling dd-wrt from source code

13 posts / 0 new
Last post
Tucky
Tucky's picture
compiling dd-wrt from source code

Hi

 I have download the dd-wrt source code and the toolchain. When I compile the code I get the following error.

which: no mipsel-linux-uclibc-gcc in (/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin:/opt/brcm/hndtools-mipsel-linux/bin:/opt/brcm/hndtools-mipsel-uclibc/bin)

rules/iptables.mk:39: warning: overriding commands for target `iptables-clean'

rules/iptables.mk:2: warning: ignoring old commands for target `iptables-clean'

rules/all.mk:109: rules/mmc-ixp4xx.mk: No such file or directory

rules/all.mk:174: rules/strace.mk: No such file or directory

[ ! -d rules/strace.mk ] || make -C rules/strace.mk

[ ! -d rules/mmc-ixp4xx.mk ] || make -C rules/mmc-ixp4xx.mk

rm -rf /root/dd-wrt/src/router/mipsel-uclibc/target

rm -rf /root/dd-wrt/src/router/mipsel-uclibc/install

rm -f /root/dd-wrt/src/router/mipsel-uclibc/linux.trx /root/dd-wrt/src/router/mipsel-uclibc/vmlinuz /root/dd-wrt/src/router/mipsel-uclibc/target.squashfs

make -C nvram

make[1]: Entering directory `/root/dd-wrt/src/router/nvram'

mipsel-linux-uclibc-gcc -Os -pipe -mips32 -mtune=mips32 -funit-at-a-time -I. -I/root/dd-wrt/src/include.v23 -Wall -s -Os -pipe -mips32 -mtune=mips32 -funit-at-a-time -fpic -c -o nvram_linux.o nvram_linux.c

make[1]: mipsel-linux-uclibc-gcc: Command not found

make[1]: *** [nvram_linux.o] Error 127

make[1]: Leaving directory `/root/dd-wrt/src/router/nvram'

make: *** [nvram] Error 2

 

How can I fix this error?

shiy
shiy's picture
mipsel-linux-uclibc-gcc

mipsel-linux-uclibc-gcc your os NO this tool

install a new one!

Tucky
Tucky's picture
shiy said: mipsel-linux

shiy said: mipsel-linux-uclibc-gcc your os NO this tool install a new one!

Install a new OS? I am currently using Fedora 6. What version of fedora should I be using?

sigs
sigs's picture
No, you Tucky... (s)he means

No, you Tucky... (s)he means you should apt-get install mipsel-linux-uclibc-gcc, even --reinstall; or yum or emerge or whatever your flavour is.

(ok, so I study Chinese so I could figure that one out, but with some good will, I'm sure you would've been up to it)

-- sigs

Tucky
Tucky's picture
When I type mipsel-linux

When I type mipsel-linux-uclibc-gcc at the terminal. The response is :- mipsel-linux-uclibc-gcc: no input files

That tells me mipsel-linux-uclibc-gcc is installed?

achilles
achilles's picture
Have you exported the

Have you exported the location where u have installed the toolchain to PATH variable .....

Tucky
Tucky's picture
I have done the following

I have done the following steps:

1. Download the toolchain "hnd-tools-3.2.3.tgz"
2. Put "hnd-tools-3.2.3.tgz" into "/opt/brcm"
3. Run the following commands to extract the toolchain:

cd /opt/brcm
tar zxvf hnd-tools-3.2.3.tgz
ln -s hndtools-mipsel-uclibc-3.2.3 hndtools-mipseluclib

4. Edit your user ~/.bash_profile to include the toolchain paths:

PATH=/opt/brcm/hndtools-mipsel-linux-3.2.3/bin:/opt/brcm/hndtools-mipsel-uclibc-3.2.3/bin:$PATH:$HOME/bin

What other steps am I missing?

achilles
achilles's picture
hmm ... this is not the

hmm ... this is not the proper tool chain.
For Compiling DD-WRT u need the following toolchain and need to the below mentioned steps to set up the tool chain.

1> wget http://www.dd-wrt.com/dd-wrtv2/downloads/others/sourcecode/toolchains/to...
2> tar -jxf toolchains.x86.debian.sp1.tar.bz2
I m assuming that toolchain has been untarred in /home/dd-wrt

3> sudo ln -s /home/dd-wrt/toolchains/4.1.0-uclibc-0.9.28/ /opt/4.1.0
4> sudo ln -s /home/dd-wrt/toolchains/3.4.6-uclibc-0.9.28/ /opt/3.3.4
5> sudo ln -s /home/dd-wrt/toolchains/3.4.6-uclibc-0.9.28/ /opt/3.3.6
6> sudo ln -s /home/dd-wrt/toolchains/3.4.6-uclibc-0.9.28/ /opt/3.4.4
7> sudo ln -s /home/dd-wrt/toolchains/3.4.6-uclibc-0.9.28/ /opt/3.4.6

then export PATH by

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

Do these steps and u shud be able to solve tool chain related issues ...
Keep me posted ...

Tucky
Tucky's picture
Hi,

Hi,

debian?? I am using fedora 6. Will that matters?

The router is WGR614v8, I download the toolchain from http://kb.netgear.com/app/answers/detail/a_id/2649

Under the section
WGR614v8/WGR614L
For North America Firmware Versions Toolchain, 1.0.17, 1.1.1, 1.1.2, 1.1.11, 1.1.20, 1.1.24

Do still get the debian code?

Thank you

Tucky
Tucky's picture
I have downloaded the tar

I have downloaded the tar file and tar -jxf toolchains.x86.debian.sp1.tar.bz2

when I compile the program I got the following error. What am I missing?

[root@localhost router]# make
rules/iptables.mk:39: warning: overriding commands for target `iptables-clean'
rules/iptables.mk:2: warning: ignoring old commands for target `iptables-clean'
rules/all.mk:109: rules/mmc-ixp4xx.mk: No such file or directory
rules/all.mk:174: rules/strace.mk: No such file or directory
[ ! -d rules/strace.mk ] || make -C rules/strace.mk
[ ! -d rules/mmc-ixp4xx.mk ] || make -C rules/mmc-ixp4xx.mk
rm -rf /root/dd-wrt/src/router/mipsel-uclibc/target
rm -rf /root/dd-wrt/src/router/mipsel-uclibc/install
rm -f /root/dd-wrt/src/router/mipsel-uclibc/linux.trx /root/dd-wrt/src/router/mipsel-uclibc/vmlinuz /root/dd-wrt/src/router/mipsel-uclibc/target.squashfs
make -C nvram
make[1]: Entering directory `/root/dd-wrt/src/router/nvram'
mipsel-linux-uclibc-gcc -Os -pipe -mips32 -mtune=mips32 -funit-at-a-time -I. -I/root/dd-wrt/src/include.v23 -Wall -s -Os -pipe -mips32 -mtune=mips32 -funit-at-a-time -fpic -c -o nvram_linux.o nvram_linux.c
nvram_linux.c:27:22: typedefs.h: No such file or directory
nvram_linux.c:28:22: bcmnvram.h: No such file or directory
nvram_linux.c: In function `nvram_init':
nvram_linux.c:47: error: `NVRAM_SPACE' undeclared (first use in this function)
nvram_linux.c:47: error: (Each undeclared identifier is reported only once
nvram_linux.c:47: error: for each function it appears in.)
nvram_linux.c: In function `nvram_commit':
nvram_linux.c:261: error: `NVRAM_MAGIC' undeclared (first use in this function)
nvram_linux.c: In function `nvram2file':
nvram_linux.c:336: warning: implicit declaration of function `nvram_safe_get'
nvram_linux.c:336: warning: passing arg 1 of `strdup' makes pointer from integer without a cast
nvram_linux.c:328: warning: unused variable `c'
nvram_linux.c:328: warning: unused variable `tmp'
In file included from nvram_linux.c:370:
nvram_generics.h: In function `nvram_prefix_get':
nvram_generics.h:114: warning: return makes pointer from integer without a cast
nvram_generics.h: In function `nvram_nget':
nvram_generics.h:140: warning: return makes pointer from integer without a cast
nvram_generics.h: In function `nvram_nset':
nvram_generics.h:149: warning: return makes pointer from integer without a cast
nvram_generics.h: At top level:
nvram_generics.h:153: error: conflicting types for 'nvram_safe_get'
nvram_linux.c:336: error: previous implicit declaration of 'nvram_safe_get' was here
make[1]: *** [nvram_linux.o] Error 1
make[1]: Leaving directory `/root/dd-wrt/src/router/nvram'
make: *** [nvram] Error 2

oxygenx
oxygenx's picture
dont use fendora for cross

dont use fendora for cross arch developing. the support is horrible. go gentoo emerge crossdev; crossdev -t mipsel-linux-uclibc
and you are ready to go.

deathwing64
deathwing64's picture
achilles said: hmm ... this

achilles said: hmm ... this is not the proper tool chain. For Compiling DD-WRT u need the following toolchain and need to the below mentioned steps to set up the tool chain. 1> wget http://www.dd-wrt.com/dd-wrtv2/downloads/others/sourcecode/toolchains/toolcha... 2> tar -jxf toolchains.x86.debian.sp1.tar.bz2 I m assuming that toolchain has been untarred in /home/dd-wrt 3> sudo ln -s /home/dd-wrt/toolchains/4.1.0-uclibc-0.9.28/ /opt/4.1.0 4> sudo ln -s /home/dd-wrt/toolchains/3.4.6-uclibc-0.9.28/ /opt/3.3.4 5> sudo ln -s /home/dd-wrt/toolchains/3.4.6-uclibc-0.9.28/ /opt/3.3.6 6> sudo ln -s /home/dd-wrt/toolchains/3.4.6-uclibc-0.9.28/ /opt/3.4.4 7> sudo ln -s /home/dd-wrt/toolchains/3.4.6-uclibc-0.9.28/ /opt/3.4.6 then export PATH by export PATH=/opt/4.1.0/bin:$PATH Do these steps and u shud be able to solve tool chain related issues ... Keep me posted ...

Hi Achilles, the link http://www.dd-wrt.com/dd-wrtv2/downloads/others/sourcecode/toolchains/to... does not work, dd-wrt updated their toolchain to current-toolchain.tar.bz2 and they run on 64bit architecture, would u mind you giving me the link or instructions to build the old toolchain. Thank so much!!!

dpreddy89
dpreddy89's picture
Hi friends, im also getting

Hi friends, im also getting same error. can any body solved this error. plz let me know.

thanks in advance.