Home arrow Tutorials and Guides arrow Full DD-WRT Guide
Full DD-WRT Flash Guide PDF Print E-mail
Sunday, 10 February 2008

DD-WRT Full Compiled Guide

This is a compilation of the tutorials pertaining to version 0.7.2 r3.  Instead of having to view each page idividually, you can now view it all on one page for ease of viewing/printing purposes. 

 

This guide is for flashing DD-WRT v24 RC6 or earlier firmware only.

Click here for the updated DD-WRT v24 Final guide.

Visit the forums to discuss this guide.

 


There are basically 4 main parts of the flashing process.
 

1.  Enable SSH on the Fonera.
This will require use of an additional router, so make sure you have one.  This router is used to point to the Kolofonium DNS server and pass it down to the Fonera.

 

2.  Enable Redboot
Once SSH is enabled, you can now connect to the Fonera and issue the commands to enable Redboot. I recommending using PuTTY (free) for SSH purposes.
Commands Used:

  • cd /tmp
  • wget http://fonera.info/camicia/openwrt-ar531x-2.4-vmlinux-CAMICIA.lzma
  • mtd -e vmlinux.bin.l7 write openwrt-ar531x-2.4-vmlinux-CAMICIA.lzma vmlinux.bin.l7
  • reboot
  • cd /tmp
  • wget http://fonera.info/camicia/out.hex
  • mtd -e "RedBoot config" write out.hex "RedBoot config"
  • reboot

 

3.  Access Redboot
To access Redboot, you will have to use a wired connection.  Once connected properly, you will be able to access the Redboot prompt.

 

4.  Flash Firmware
You will now have to transfer and flash the firmware files to the Fonera.  I recommend using tftpd32 to setup the tftp server.  You will then issue a series of commands to erase the existing firmware and upload your new files.

  • ip_address -l 192.168.1.254/24 -h [remote server address]  
  • fis init
  • load -r -v -b 0x80041000 root.fs
  • fis create -b 0x80041000 -f 0xA8030000 -l 0x002C0000 -e 0x00000000 rootfs
  • load -r -v -b 0x80041000 vmlinux.bin.l7
  • fis create -r 0x80041000 -e 0x80041000 -l 0x000E0000 vmlinux.bin.l7
  • fis create -f 0xA83D0000 -l 0x00010000 -n nvram


 

 

PART 1: Enable SSH

 

In able to do this hack, you will need a router in addtion to the Fonera. Here is what your network should look like after everything is done:

fonera firmware flash network config

Your Fonera should plug into your additional router.  Your PC will also be connected to this additional router.  The configuration above is the network will look like after the steps below are taken.  NOTE: The addreses given above are for the following interfaces:

  • Router - LAN
  • Your PC - LAN
  • Fonera - WAN 

 

1.


Enter your router's configuration page and edit the following settings:

  • LAN IP Address:  213.134.45.129
  • Subnet Mask: 255.255.255.0
  • Primary and Secondary DNS Servers: 88.198.165.155

Router Configuration

 

2.


Power on the Fonera and connect it to the router.  Connect to the Fonera wirelessly using the "MyPlace" access point and your serial # as the WPA key.  Direct your browser to "192.168.10.1" and you will see the page below.


fonera main config page

 

3.


Go to "Advanced" and then to "Internet Connection".  Here, you will have to change a few things:

  • Mode: Static IP
  • IP Address: 213.134.45.200
  • Network Mask: 255.255.255.0
  • Gateway: 213.134.45.129
  • DNS Server: 213.134.45.129

fonera configuration settings
 

 

4.


Click "Submit" and then hold down the reset button on the Fonera for 30 seconds. This will force the Fonera to force an auto update check.  Once it sees the Kolofonium server, it will downgrade itself to version 0.7.1 r1.  Wait 3-5 minutes after reseting before checking on success.  To see if everything went fine, connect wirelessly and browse to "192.168.1.1".  This is what you should see:

downgrade fonera version 0.7.1 r1 firmware flash

 

 

5.


If the above didn't work, try it again.  Make sure to hold the reset button down for at least 30 seconds.  If everything went well, download this script (Right Click, Save As) which will send a command to the Fonera and tell it to enable SSH.  Open the file in your web browser, like Firefox, and click on the "Submit" button.  

 html attack script fonera

Code:

<html>
<head>
</head>
<body>
<center>
<form method="post" action="http://192.168.10.1/cgi-bin/webif/connection.sh " enctype="multipart/form-data">
<input name="username" value="$(/etc/init.d/dropbear)" size="68" >
<input type="submit" name="submit" value="Submit" onClick="{this.form.wifimode.value='";' + this.form.wifimode.value +';"'}" />
</form>
</body>
</html> 

6.


After you hit "Submit", you should be redirected to the Fonera. 

 fonera hacks

Connect wirelessly to the Fonera and try to SSH into "192.168.10.1" 

 

7. (Important) 


After enabling SSH, immediately connect to the Fonera via SSH. 

enable ssh on fonera

The "ssh_fonera_enable.html" script only enables SSH for one instance.  That means, if you reboot or turn the Fonera off, you will lose SSH access all together and you will have to run the "ssh_fonera_enable.html" script again.  

To enable SSH permanently, you will need to enter the command:

mv /etc/init.d/dropbear /etc/init.d/S50dropbear

SSH is now enabled permanently.

 

 

PART 2: Enable Redboot 

 

8.


Connect to the Fonera wirelessly, then use an SSH client to connect to 192.168.10.1.  For SSH access, I recommending using PuTTY (free). 

If everything was successful, you will be prompted with a login screen.  The default username is "root" and the password is "admin".  Once connected, you will see:

ssh access fonera successful

 

9.


Issue the following commands:

  • cd /tmp
  • wget http://fonera.info/camicia/openwrt-ar531x-2.4-vmlinux-CAMICIA.lzma
  • mtd -e vmlinux.bin.l7 write openwrt-ar531x-2.4-vmlinux-CAMICIA.lzma vmlinux.bin.l7
  • reboot

 fonera redboot commands




10.


Once the Fonera is finished rebooting, connect back to it.  Start another SSH session and issue the following commands:

  • cd /tmp
  • wget http://fonera.info/camicia/out.hex
  • mtd -e "RedBoot config" write out.hex "RedBoot config"
  • reboot

IMPORTANT: Your Fonera will no longer boot past Redboot after this point.  You will not be able to connet wirelessly from this point.  You will need to use a wired connection from this point on.

Redboot is now enabled.  You will only be able to access Redboot until you flash the firmware. 

 


PART 3: Access Redboot

 

 

Make sure the Fonera is powered off.  You also need to make sure you have a wired connection to the Fonera and an IP address in the 192.168.1.x range.  You can use a router to  connect the Fonera to your network, or you can connect straight from your computer to the Fonera with an ethernet cable.  If you connect straight to the Fonera, make sure you manually configure your IP address to be in the 192.168.1.x range (e.g. 192.168.1.161).

fonera network config

 

 

11.


Once that is done, open a command prompt and type in "ping -t 192.168.1.254"  Do not press enter yet!

ping test window

 

12.


Open putty and enter in "192.168.1.254" for the IP address and "9000" as the port number.

 putty configuration

 

13.


Start the ping process in Step 1.  Once it has started, you will recieve the "Request Timed Out" messages.  Power on the Fonera and wait untill you get a "Reply from. . ." message.  

ping test reply

 

14.


As soon as you get a "Reply from. . ." message, connect to the Fonera using Putty in Step 2.  Click "Open" in the Putty window as soon as you recieve a reply.  There is only a ~5-10 second window to connect to Redboot, so you must be quick.  This is the window you will get when you first connect.

That's it! You're in Redboot.  Disregard the "/home/alfa/..." messages.  Those seem to be debug messages from the Fonera.  They were created because I was pinging the Fonera after I was connected.  Now you're ready to flash.

 

 

PART 4: Flash Firmware 

 

Prep 

 

For this demonstration, I am using DD-WRT, which can be downloaded here.
Once you're there, go to: release candidates > DD-WRT v24 RC6.2 > Atheros WiSoc > Fonera.
Download "root.fs" and "vmlinux.bin.l7" and save them to a folder like C:\tftp

flash firmware fonera files

You will also need a tftp program to host the flash images for the Fonera.  I recommend using tftpd32 which can be downloaded here (free).
Once you have tftpd32 installed, make sure the "Current Directory" points to the folder you saved the flash files in the step above.  Also take note of the "Server interface" IP address as well.

tftp fonera firmware flash directory

 Redboot will only look in the root folder of the tftp directory, so put the files in the root directory.  E.g.  put the files in C:\tftp not C:\tftp\flashfiles

 

  Installation

 

15.


Access Redboot.

 

16.

Specify the local IP and tftp server IP address.  Use the following command:

ip_address -l 192.168.1.254/24 -h [remote server address]  

Use the IP address of the tftp server you setup earlier.  For example, the tftp server IP address in this instance is "192.168.1.161".  Therefore, the command would be

ip_address -l 192.168.1.254/24 -h 192.168.1.161

 flash fonera firmware part 1

Ignore the "/home/alfa..." messages if you get them.  They are harmless and the flash will work nonetheless.

 

17. 


Run the command:

 

fis init 

 firmware flash fonera commands

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

18.


Run the command:
 load -r -v -b 0x80041000 root.fs
 firmware fonera flash screen



19.

Run the command:
fis create -b 0x80041000 -f 0xA8030000 -l 0x002C0000 -e 0x00000000 rootfs

fonera hack firmware screen

This process can take 10-20 minutes.  In this case, it took just about 15 minutes.  After you enter the command, there will be no output on the screen until the Fonera is done.  Leave it alone until it is finished! Do not power it off or disconnect your session!

 

20.
Run the command:
 
load -r -v -b 0x80041000 vmlinux.bin.l7
fonera firmware flash hack



21.

Run the command:
 
fis create -r 0x80041000 -e 0x80041000 -l 0x000E0000 vmlinux.bin.l7

fonera hack firmware commands

This process may take some time like in Step 5.



22.


Finally, run the command:

 

 
fis create -f 0xA83D0000 -l 0x00010000 -n nvram 

fonera hack firmware flash

 

23. 

You're done! Use the "reset"command to reset the router, or just power it off/on.  Once it restarts, you should be able to see a "dd-wrt" access point.  Connect to it and enjoy your new router.

dd-wrt wireless discovery

dd-wrt configuration page on fonera

 

Visit the forums to discuss this guide.

 

 

 

 

 

 
< Prev   Next >