Compiling DD-WRT sources

From DD-WRT Wiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 07:56, 18 April 2006 (edit)
Honki (Talk | contribs)

← Previous diff
Current revision (16:06, 13 August 2019) (edit) (undo)
Santurysim (Talk | contribs)
m (New Instructions - Fixed link)
 
(33 intermediate revisions not shown.)
Line 1: Line 1:
-First install some LINUX-System like KNOPPIX and open the root-Shell (or login as "root" in standard shell with "su" and "type in your root Password"), then do this Lines (for Example 0416-2006-snapshot.tar.bz2 sources!)+{{Languages|Compiling DD-WRT sources}}
 +== New Instructions ==
-cd /+More streamlined, up-to-date instructions with automated scripts can be found here [[Development#Building DD-WRT from Source]].
-mkdir home/dd-wrt+== Old Instructions <deprecated> ==
- +
-mkdir home/dd-wrt/snapshot+
- +
-cd home/dd-wrt/snapshot+
- +
-wget http://www.dd-wrt.com/dd-wrtv2/downloads/sourcecode/0416-2006-snapshot.tar.bz2+
- +
-tar -xjvf 0416-2006-snapshot.tar.bz2+
- +
-cd home/dd-wrt+
- +
-mkdir home/dd-wrt/toolchains+
- +
-cd home/dd-wrt/toolchains+
 +Install a LINUX-System like KNOPPIX and open a root shell (or become "root" by issuing "su" and type your root password), then issue the following commands (the example uses the "0528-2006-svn2242.snapshot.tar.bz2" source distribution)
 +<pre>
 +cd /
 +mkdir /home/dd-wrt
 +cd /home/dd-wrt
wget http://www.dd-wrt.com/dd-wrtv2/downloads/sourcecode/toolchains.x86.debian.sp1.tar.bz2 wget http://www.dd-wrt.com/dd-wrtv2/downloads/sourcecode/toolchains.x86.debian.sp1.tar.bz2
- 
tar -xjvf toolchains.x86.debian.sp1.tar.bz2 tar -xjvf toolchains.x86.debian.sp1.tar.bz2
- 
mv /home/dd-wrt/toolchains/3.4.6-uclibc-0.9.28 /home/dd-wrt/toolchains/3.4.6 mv /home/dd-wrt/toolchains/3.4.6-uclibc-0.9.28 /home/dd-wrt/toolchains/3.4.6
- 
mv /home/dd-wrt/toolchains/4.1.0-uclibc-0.9.28 /home/dd-wrt/toolchains/4.1.0 mv /home/dd-wrt/toolchains/4.1.0-uclibc-0.9.28 /home/dd-wrt/toolchains/4.1.0
 +cd /home/dd-wrt
 +mkdir /home/dd-wrt/snapshot
 +cd /home/dd-wrt/snapshot
 +wget http://www.dd-wrt.com/dd-wrtv2/downloads/sourcecode/0528-2006-svn2242.snapshot.tar.bz2
 +tar -xjvf 0528-2006-svn2242.snapshot.tar.bz2
 +cd /home/dd-wrt/snapshot/DD-WRT/opt
 +rm libgcc_s.so
 +ln -s libgcc/libgcc_s.so.1 libgcc_s.so
 +cd /home/dd-wrt/snapshot/DD-WRT/src/linux
 +ln -s brcm/linux.v23
 +ln -s brcm/linux.v24
 +ln -s brcm/linux.v23 linux
 +cd /home/dd-wrt
 +mkdir /home/dd-wrt/image
 +ln -s /home/dd-wrt/image /GruppenLW
 +cd /home/dd-wrt/snapshot/DD-WRT/opt
 +</pre>then start compiling with<pre>./install.sh</pre>your images should be in <pre>/home/dd-wrt/image</pre>
-cd home/dd-wrt/snapshot/DD-WRT/src/router/iptables/extensions+32bit operating system<pre>
 +Howto compile dd-wrt on a 32bit operating system.
-chmod 755 .layer7-test+Problem:
 +Compilation stops, because mksquashfs-lzma is a 64bit file. Can't execute file....
-chmod 755 .dccp-test+Solution:
 +BrainSlayer added the source code for mksquashfs-lzma to the current svn. So it only needs to be
 +compiled on your 32bit OS. Please install toolchain 3.4.6 on your system.
-cd home/dd-wrt/snapshot/DD-WRT/opt+step 1:
 +mkdir /home/dd-wrt/tools
 +cd /home/dd-wrt/tools
-rm libgcc_s.so+step 2:
 +svn co svn://svn.dd-wrt.com/DD-WRT/src/squashfs-tools
-ln -s libgcc/libgcc_s.so.1 libgcc_s.so +or
-cd home/dd-wrt+take a look at ./DD-WRT/src/squashfs-tools (included in new snapshots)
-mkdir home/dd-wrt/image+step 3:
 +source code of mksquashfs-lzma should be in /home/dd-wrt/tools/squashfs-tools
-ln -s /home/dd-wrt/image /GruppenLW+step 4:
 +cd /home/dd-wrt/tools/squashfs-tools
 + 
 +step 5:
 +create a shell script -> vi install.sh
 + 
 +[code]
 +#!/bin/sh
 + 
 +export PATH=/home/dd-wrt/toolchains/3.4.6/bin:$PATH
 +make
 +[/code]
-cd home/dd-wrt/snapshot/DD-WRT/opt+save -> ESC ; wq!
 +step 6:
 +start compiling "./install.sh
-then start compiling with+step 7:
 +copy mksquashfs-lzma to the right directory
-./install.sh+cp mksquashfs-lzma /home/dd-wrt/snapshot/DD-WRT/src/linux/linux.v23/scripts/squashfs/
 +</pre>
-your images should be in home/dd-wrt/image+[[Category:Developer resources]]

Current revision


[edit] New Instructions

More streamlined, up-to-date instructions with automated scripts can be found here Development#Building DD-WRT from Source.

[edit] Old Instructions <deprecated>

Install a LINUX-System like KNOPPIX and open a root shell (or become "root" by issuing "su" and type your root password), then issue the following commands (the example uses the "0528-2006-svn2242.snapshot.tar.bz2" source distribution)

cd /
mkdir /home/dd-wrt
cd /home/dd-wrt
wget http://www.dd-wrt.com/dd-wrtv2/downloads/sourcecode/toolchains.x86.debian.sp1.tar.bz2
tar -xjvf toolchains.x86.debian.sp1.tar.bz2
mv /home/dd-wrt/toolchains/3.4.6-uclibc-0.9.28 /home/dd-wrt/toolchains/3.4.6
mv /home/dd-wrt/toolchains/4.1.0-uclibc-0.9.28 /home/dd-wrt/toolchains/4.1.0
cd /home/dd-wrt
mkdir /home/dd-wrt/snapshot
cd /home/dd-wrt/snapshot
wget http://www.dd-wrt.com/dd-wrtv2/downloads/sourcecode/0528-2006-svn2242.snapshot.tar.bz2
tar -xjvf 0528-2006-svn2242.snapshot.tar.bz2
cd /home/dd-wrt/snapshot/DD-WRT/opt
rm libgcc_s.so
ln -s libgcc/libgcc_s.so.1 libgcc_s.so 
cd /home/dd-wrt/snapshot/DD-WRT/src/linux
ln -s brcm/linux.v23
ln -s brcm/linux.v24
ln -s brcm/linux.v23 linux
cd /home/dd-wrt
mkdir /home/dd-wrt/image
ln -s /home/dd-wrt/image /GruppenLW
cd /home/dd-wrt/snapshot/DD-WRT/opt
then start compiling with
./install.sh
your images should be in
/home/dd-wrt/image
32bit operating system
Howto compile dd-wrt on a 32bit operating system.

Problem:
Compilation stops, because mksquashfs-lzma is a 64bit file. Can't execute file....

Solution:
BrainSlayer added the source code for mksquashfs-lzma to the current svn. So it only needs to be 
compiled on your 32bit OS. Please install toolchain 3.4.6 on your system.

step 1:
mkdir /home/dd-wrt/tools
cd /home/dd-wrt/tools

step 2:
svn co svn://svn.dd-wrt.com/DD-WRT/src/squashfs-tools

or

take a look at ./DD-WRT/src/squashfs-tools (included in new snapshots)

step 3:
source code of mksquashfs-lzma should be in /home/dd-wrt/tools/squashfs-tools

step 4:
cd /home/dd-wrt/tools/squashfs-tools

step 5:
create a shell script -> vi install.sh

[code]
#!/bin/sh

export PATH=/home/dd-wrt/toolchains/3.4.6/bin:$PATH
make
[/code]

save -> ESC ; wq!

step 6:
start compiling "./install.sh

step 7:
copy mksquashfs-lzma to the right directory

cp mksquashfs-lzma /home/dd-wrt/snapshot/DD-WRT/src/linux/linux.v23/scripts/squashfs/