The DD-WRT v23 SP1 Final building guide

Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Generic Questions
Author Message




Joined: 01 Jan 1970
Posts:

PostPosted: Fri Aug 04, 2006 20:18    Post subject: The DD-WRT v23 SP1 Final building guide Reply with quote
The DD-WRT v23 SP1 Final building guide

This guide describes step by step how to build DD-WRT v23 SP1 final firmware from source on Ubuntu 6.06 and 6.06.1 LTS (32bit, x86).

This was tested running Ubuntu in VMware. To start download and install the VMware player and also get a ready to use Ubuntu VMware image (direct torrent link). The user name and password for the image is "ubuntu". With these two programs you can directly start building DD-WRT on Windows without installing any Linux on your PC. To get files of your virtual machine e.g. use Apache, SAMBA, SCP or whatever.

If you find any errors, mistakes or have suggestions do not hesitate to discuss here. Feel free to add this document to the DD-WRT Wiki.

It’s recommended that you create a normal user account („dd-wrt“ username recommended). Do NOT use „root“ to build DD-WRT. Add the „dd-wrt“ user to /etc/sudoers or use System / Administration / Users and Groups / Properties from „dd-wrt“ user / Register User privileges / check „Executing system administration tasks“

Lets start :)


1. Install the following Ubuntu packages and its dependencies (use apt-get or System / Administration / Synaptic Package Manager)
Code:
sudo apt-get install gcc g++ binutils patch bzip2 flex bison make autoconf gettext texinfo unzip sharutils subversion libncurses5-dev zlib1g-dev openssh-server apache2 samba uml-utilities


2. Download the sources (toolchain (69M) and the SP1 final (84M))
Code:
cd /home/dd-wrt
wget ftp://ftp.dd-wrt.com/sourcecode/toolchains.x86.debian.sp1.tar.bz2
wget ftp://ftp.dd-wrt.com/sourcecode/dd-wrt.v23.SP1-Final.src.tar.bz2


3. Unpack the toolchain
Code:
tar -jxf toolchains.x86.debian.sp1.tar.bz2


3.1 Install the toolchain
Code:
cd /home/dd-wrt/toolchains
ln -sf 3.4.6-uclibc-0.9.28 3.4.6
ln -sf 4.1.0-uclibc-0.9.28 4.1.0


3.2 Add the toolchains bin folder to your PATH environment variable
Code:
export PATH=/home/dd-wrt/toolchains/4.1.0/bin:$PATH


4. Create some folders and symbolic links needed by the build process
Code:
cd /home/dd-wrt
mkdir -p /home/dd-wrt/image
sudo mkdir -p /home/dev/workspace /home/backup/mikrotik
sudo ln -sf /home/dd-wrt/image /GruppenLW
sudo ln -sf /home/dd-wrt /home/dev/workspace
sudo ln -sf /home/dd-wrt/toolchains /home/backup/mikrotik/toolchain


5. Unpack the v23 SP1 final tarball
Code:
tar -jxf dd-wrt.v23.SP1-Final.src.tar.bz2


5.1 Fix some permissions
Code:
cd /home/dd-wrt/DD-WRT
chmod +x src/router/iptables/extensions/.dccp-test
chmod +x src/router/iptables/extensions/.layer7-test
chmod +wxxx src/router/samba


5.2 Fix the path in the zlib Makefile (line 42)
Code:
vi src/router/zlib/Makefile
   -prefix =/usr/local
   +prefix =/home/dd-wrt/DD-WRT


5.3 Some more fixes
Code:
cd /home/dd-wrt/DD-WRT/opt
rm libgcc_s.so
ln -sf libgcc/libgcc_s.so.1 libgcc_s.so
cd /home/dd-wrt/DD-WRT/src/linux
ln -sf linux.v23 linux


5.4 Set the toolchain bin folder to your PATH environment. (skip this point if your username is „dd-wrt“, line 3 and line 27)
Code:
cd /home/dd-wrt/DD-WRT/opt
vi install.sh
   -export PATH=/home/dd-wrt/toolchains/3.4.6/bin:$MYPATH
   +export PATH=/home/dd-wrt/toolchains/3.4.6/bin:$MYPATH
   -export PATH=/home/dd-wrt/toolchains/4.1.0/bin:$MYPATH
   +export PATH=/home/dd-wrt/toolchains/4.1.0/bin:$MYPATH


5.5 To be able to build SP1 final on a 32bit operating system you need a 32bit version of the mksquashfs-lzma file. You can follow the relevant parts at Compiling DD-WRT Sources. I recommend you download my precompiled mksquashfs-lzma file (attached to this post) and move it into the right folder:
Code:
cd /home/dd-wrt
wget -O mksquashfs-lzma.tar.gz "http://www.dd-wrt.com/phpBB2/download.php?id=312"
tar -xzf mksquashfs-lzma.tar.gz
chmod +x mksquashfs-lzma
mv -f mksquashfs-lzma /home/dd-wrt/DD-WRT/src/linux/linux.v23/scripts/squashfs


6. Finally start the build process. If install.sh breaks just rerun it. If it runs the second time it finishes the build process and creates valid images
Code:
cd /home/dd-wrt/DD-WRT/opt
./install.sh


6.1 After several coups of tea or coffee (or after about 1.5 hours) later you should have images in /home/dd-wrt/image

7. Information for this guide was taken from
- Compiling DD-WRT Sources
- Building From Source
- http://www.cardoe.demon.co.uk/
- Firmware Modification Kit
- µTorrent

I hope this is helpful and make things more clear. Have fun! :)

To compile only a single file for DD-WRT see the compile own programs thread.



mksquashfs-lzma.tar.gz
 Description:
mksquashfs-lzma (32bit)

Download
 Filename:  mksquashfs-lzma.tar.gz
 Filesize:  83.79 KB
 Downloaded:  3193 Time(s)



Last edited by on Tue Aug 29, 2006 12:46; edited 19 times in total
Sponsor
whatsthedeal
DD-WRT Novice


Joined: 07 Jun 2006
Posts: 32

PostPosted: Fri Aug 04, 2006 23:33    Post subject: Reply with quote
thank you for the guide. i think this should go on the wiki.




Joined: 01 Jan 1970
Posts:

PostPosted: Sun Aug 27, 2006 7:40    Post subject: Reply with quote
Added torrent link for a Ubuntu 6.06 VMware image which can be used with the free available VMware player.




Joined: 01 Jan 1970
Posts:

PostPosted: Mon Sep 04, 2006 10:04    Post subject: Reply with quote
There will be no more updates on this guide.
Display posts from previous:    Page 1 of 1
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