Mini Flashing Guide for DIR-300
If you are flashing to DD-WRT v24 RC7. Check out this flashing guide instead.
Similar models: DIR-301
If you are using DIR-400, check out Mini Flashing Guide for DIR-400 instead.
FAQ
The FAQs for Flashing DIR-300 to DD-WRT can be found here
Note: It seems like x will not be represented as alphabet “x” after copy and pasting. Do take note of this.
Required
- Temporary RedBoot (ap61.ram): Download file
- ap61.rom, linux.bin from DD-WRT v24 RC4 or newer
- TFTP Server up and running, ready to serve the required files, e.g. PumpKIN
- Putty (telnet client) – Chosen because it helps you to Ctrl + C
Getting into RedBoot
- Connect the network cable to your ethernet port and the WAN port of DIR-300.
- Configure your System IP address (static) to be 192.168.20.80/255.255.255.0.
- Hold on to the reset behind the DIR-300.
- Power on the DIR-300 while holding on to the reset button. Hold the reset button for 30 seconds while it is booting.
- Release the reset button
- Telnet to 192.168.20.81 on port 9000
- You should be greeted by the RedBoot prompt. RedBoot>
Loading in the temp boot loader
RedBoot> load ap61.ram
Using default protocol (TFTP)
Entry point: 0x800410bc, address range: 0x80041000-0x800680d8
RedBoot> go
It is normal to be disconnected from the telnet session.
Note: Do not reboot the router.
Loading a new boot loader
Before proceeding, set your system IP to 192.168.1.2/255.255.255.0 and then telnet to the new address 192.168.1.1, port 9000.
Note: You may need to connect to the LAN port instead of the WAN port on the DIR-300
After you are connected, follow the steps below
DD-WRT> fconfig -i
Initialize non-volatile configuration – continue (y/n)? y
Run script at boot: false
Use BOOTP for network configuration: true
Default server IP address:
Console baud rate: 9600
GDB connection port: 9000
Force console for special debug messages: false
Network debug at boot time: false
Update RedBoot non-volatile configuration – continue (y/n)? y
… Erase from 0xbffe0000-0xbfff0000: .
… Program from 0x80ff0000-0x81000000 at 0xbffe0000: .
DD-WRT> fis init
About to initialize [format] FLASH image system – continue (y/n)? y
*** Initialize FLASH Image System
… Erase from 0xbffe0000-0xbfff0000: .
… Program from 0x807f0000-0x80800000 at 0xbffe0000: .
DD-WRT> ip_address -h 192.168.1.2
Default server: 192.168.1.23
DD-WRT> load -r -b %{FREEMEMLO} ap61.rom
Using default protocol (TFTP)
Raw file loaded 0x80080000-0x800a8717, assumed entry at 0x80080000
DD-WRT> fis create -l 0x30000 -e 0xbfc00000 RedBoot
An image named ‘RedBoot’ exists – continue (y/n)? y
… Erase from 0xbfc00000-0xbfc30000: …
… Program from 0x80080000-0x800a8718 at 0xbfc00000: …
… Erase from 0xbffe0000-0xbfff0000: .
… Program from 0x807f0000-0x80800000 at 0xbffe0000: .
DD-WRT> reset
Your DIR-300 will reset at this point. Telnet to it (192.168.1.1, port 9000) after it has finish resetting. (approximately 30+ seconds)
Note: You may need to connect to the LAN port instead of the WAN port on the DIR-300
Configuring the Putty Client
- Right-click on PuTTY Client’s title bar
- Select “Change Settings…”
- On the “PuTTY Reconfiguration” window, change close window on exit to Never
- Click on the Apply button
Loading in the new firmware
It is important that you don’t disconnect the power or ethernet cable for this section. Those fis create commands take quite some time to complete, so do be patient and don’t interrupt the process.
DD-WRT> ip_address -h 192.168.1.2
IP: 192.168.1.1/255.255.255.0, Gateway: 0.0.0.0
Default server: 192.168.1.2
DD-WRT> fis init
About to initialize [format] FLASH image system – continue (y/n)? y
*** Initialize FLASH Image System
… Erase from 0xbfc30000-0xbffe0000: …………………………………………………..
… Erase from 0xbffe0000-0xbfff0000: .
… Program from 0x80ff0000-0x81000000 at 0xbffe0000: .
DD-WRT> load -r -b 0x80041000 linux.bin
Using default protocol (TFTP)
Raw file loaded 0x80041000-0x803cffff, assumed entry at 0x80041000
DD-WRT> fis create linux
… Erase from 0xbfc30000-0xbffbf000: …………………………………………………
… Program from 0x80041000-0x803d0000 at 0xbfc30000: …………………………………………………
… Erase from 0xbffe0000-0xbfff0000: .
… Program from 0x80ff0000-0x81000000 at 0xbffe0000: .
DD-WRT> fconfig boot_script true
boot_script: Setting to true
Update RedBoot non-volatile configuration – continue (y/n)? y
… Erase from 0xbffe0000-0xbfff0000: .
… Program from 0×80ff0000-0×81000000 at 0xbffe0000: .
DD-WRT> fconfig boot_script_timeout 4
boot_script_timeout: Setting to 4
Update RedBoot non-volatile configuration – continue (y/n)? y
… Erase from 0xbffe0000-0xbfff0000: .
… Program from 0×80ff0000-0×81000000 at 0xbffe0000: .
DD-WRT> fconfig bootp false
bootp: Setting to false
Update RedBoot non-volatile configuration – continue (y/n)? y
… Erase from 0xbffe0000-0xbfff0000: .
… Program from 0×80ff0000-0×81000000 at 0xbffe0000: .
DD-WRT> fconfig
Run script at boot: true
Boot script:
.. fis load -l vmlinux.bin.l7
.. exec
Enter script, terminate with empty line
>> fis load -l linux
>> exec
>>
Boot script timeout (1000ms resolution): 4
Use BOOTP for network configuration: false
Default server IP address:
Console baud rate: 9600
GDB connection port: 9000
Force console for special debug messages: false
Network debug at boot time: false
Update RedBoot non-volatile configuration – continue (y/n)? y
… Erase from 0xbffe0000-0xbfff0000: .
… Program from 0x80ff0000-0x81000000 at 0xbffe0000: .
DD-WRT> fconfig bootp_my_ip 192.168.1.1
DD-WRT> fconfig bootp_my_ip_mask 255.255.255.0
DD-WRT> fconfig bootp_my_gateway_ip 0.0.0.0
DD-WRT> reset
The default username and password are “root” and “admin” (without the quotes) respectively. Enjoy your new DIR-300!
Note: Don’t worry if you can’t get an IP from your modem (through the DIR-300 on DD-WRT). It is a bug of DD-WRT. Do the following steps to resolve it:
- Disconnect the network (ethernet) cable between your modem and DIR-300
- Reboot both the modem and DIR-300 and wait until they have fully booted up
- Connect the network (ethernet) cable between the modem and DIR-300
Note: If you need to change the value of “Run script at boot:” from false to true, use the following command before running fconfig:
fconfig boot_script true