Building From Source

From DD-WRT Wiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 19:23, 5 August 2006 (edit)
Jcollake (Talk | contribs)
m (Instructions)
← Previous diff
Current revision (18:59, 1 July 2007) (edit) (undo)
Wildblue (Talk | contribs)
m (Wiederhergestellt zur letzten Änderung von AlReece45)
 
(15 intermediate revisions not shown.)
Line 1: Line 1:
-Building DD-WRT from source is not that difficult, but don't expect the build system to be as well maintained as OpenWrt. Brainslayer has not the time to do everything. Until the day comes that DD-WRT will build without any extra steps, I've written some scripts that will set up a build environment for DD-WRT. Newer builds of DD-WRT may break compatibility with these scripts. If this happens and I don't update them, ''please'' take the time to update them '''if''' you are sure your changes are appropriate.+#REDIRECT [[Development#Building_DD-WRT_From_Source]]
- +
-=Requirements=+
-To build DD-WRT, you need a Linux machine. It should work on any reasonably modern machine with basic development tools installed. You'll need GNU Make, ncurses, and several other packages. I'd recommend using the OpenWrt pre-requisites as a guideline for what you need to get it building.+
- +
-=Instructions=+
-The first step is to download and extract the proper source from the [http://www.dd-wrt.com/dd-wrtv2/downloads/index.php?path=sourcecode/ download page] or check it out of the subversion repository at svn://svn.dd-wrt.com/DD-WRT. I recommend checking out of the repository since it will be the freshest build. Then you'll want to download the appropriate toolchain. This is a set of cross-compile development tools and libraries. Unpack the toolchain wherever you desire, the scripts below will set up symlinks appropriately.+
- +
-I've created a couple scripts to set up the build environment for you. These scripts only pertain to building for BCM934xx based boards, x86 (MicroTek) and other platforms may need other changes.+
- +
-After running these scripts, to build DD-WRT you simply need to:+
- +
- 1. Add your toolchains bin folder to your path environment variable. i.e. ''PATH=$PATH:/home/db90h/toolchains/4.1.0-uclibc''+
- 2. In DD-WRT/opt run ./install.sh, or ./install_WHATEVER.sh to build only a particular variant (i.e../install_micro.sh).+
- +
-These instructions are valid as of DD-WRT v23 SP2 beta 08/03/06.+
- +
-<pre>+
-#!/bin/sh+
-#+
-# title: ready_ddwrt.sh+
-# version: 1.0+
-# author: Jeremy Collake <jeremy@bitsum.com> aka db90h+
-#+
-# This silly script will prepare a build environment+
-# for DD-WRT. You must also run ready_ddwrt_root.sh.+
-#+
-MINPARAMS=2+
-if [ $# -lt "$MINPARAMS" ]+
- then+
- echo usage:+
- echo ready_ddwrt.sh [ddwrt_base_path] [toolchain_base_path]+
- echo+
- echo i.e.:+
- echo ready_ddwrt.sh /home/db90h/DD-WRT /home/db90h/3.4.6-ucliblc-0.9.28+
- echo+
- exit 1+
-fi +
- +
-ME=`whoami`+
-DDROOT=$1+
-TCHAIN=$2+
- +
-echo I am $ME+
-echo DD-WRT is at $DDROOT+
-echo mipsl-uclibc-x toolchain is at $TCHAIN+
- +
-echo ................................................................+
-echo creating some symlinks+
-echo ................................................................+
-rm $DDROOT/src/linux/brcm/linux.v23/include/asm+
-ln -s $DDROOT/src/linux/brcm/linux.v23/include/asm-mips $DDROOT/src/linux/brcm/linux.v23/include/asm+
-echo done+
- +
-echo ................................................................+
-echo adjusting some attributes+
-echo ................................................................+
-chmod +x $DDROOT/src/router/iptables/extensions/.dccp-test +
-chmod +x $DDROOT/src/router/iptables/extensions/.layer7-test+
-echo done+
- +
-echo ................................................................+
-echo re-building some tools+
-echo ................................................................+
-cd $DDROOT+
-# make bb_mkdep+
-cd src/router/busybox/scripts +
-rm bb_mkdep+
-make bb_mkdep +
-# make jsformat+
-cd ../../../.. +
-cd src/router/tools +
-rm jsformat+
-make jsformat +
-cd ../../..+
-cd src/squashfs-tools/+
-rm mksquashfs-lzma+
-make +
-cp mksquashfs-lzma ../linux/brcm/linux.v23/scripts/squashfs+
-cd ../..+
-echo done+
-</pre>+
- +
-This second script needs to be run as root ...+
- +
-<pre>+
-#!/bin/sh+
-#+
-# title: ready_ddwrt_root.sh+
-# version: 1.0+
-# author: Jeremy Collake <jeremy@bitsum.com> aka db90h+
-#+
-# This silly script will prepare a build environment+
-# for DD-WRT. You must also run ready_ddwrt.sh.+
-#+
-MINPARAMS=2+
-if [ $# -lt "$MINPARAMS" ]+
- then+
- echo +
- echo This script needs root access.+
- echo+
- echo usage:+
- echo ready_ddwrt_root.sh [ddwrt_base_path] [toolchain_base_path]+
- echo+
- echo i.e.:+
- echo ready_ddwrt_root.sh /home/db90h/DD-WRT /home/db90h/3.4.6-ucliblc-0.9.28+
- echo+
- exit 1+
-fi +
- +
-ME=`whoami`+
-DDROOT=$1+
-TCHAIN=$2+
- +
-echo I am $ME+
-echo DD-WRT is at $DDROOT+
-echo mipsl-uclibc-x toolchain is at $TCHAIN+
- +
-echo ................................................................+
-echo creating some symlinks+
-echo ................................................................+
-# duh, this will already be here+
-mkdir -p /opt+
-rm /opt/3.3.6+
-ln -s $TCHAIN /opt/3.3.6+
-rm /GruppenLW+
-ln -s $DDROOT/image /GruppenLW+
- +
-echo All done!+
-</pre>+
- +
-This page is only marginally useful; you do a lot of work and end up with a stock firmware. You may also want to see [[modifying DD-WRT]] ''(todo: fix this link)''.+
- +
---[[User:Jcollake|Jcollake]] 21:05, 5 Aug 2006 (CEST)+
- +
-[[Category:English documentation]]+

Current revision

  1. REDIRECT Development#Building_DD-WRT_From_Source