WRT1900AC corrupt bootloader recovery
New instructions and u-boot binaries are available in my McDebian wiki
My beloved WRT1900AC got its bootloader corrupt after a bluescreen during firmware update. Reviving it took me 2 weeks and countless hours of reading various bits and pieces of info on the web but it wouldn't have been possible without the help of Stefan Roel from the authors of u-boot (http://www.denx.de). To keep things short and concise, this is how anyone in the same situation as me can revive it.
Get yourself a PC running a flavor of Linux (I personally used the 64-bit Ubuntu 14.04 with 32-bit libraries installed).
A USB-TTL adapter (get one from Amazon, Ebay, etc…). I used an old Nokia DKU-5 cable stripped off at the phone end.
Download kwboot from here: http://www.protechs-online.com/downloads/McWRT/Images/UBootRecoveryImages/kwboot/kwboot.tar and save it to your home directory (to keep command lines short). First of all get root acces in the Terminal. Type
sudo -iand press Enter, then install kwboot by going to the location you saved it to (Home directory in my case)
cd /home/test/Unzip the archive
tar –xvf kwboot.tarActual compilation of kwboot:
Download the 2 files needed for unbricking the router from here: http://www.protechs-online.com/downloads/McWRT/Images/UBootRecoveryImages/ . As you noticed, one file is for booting from UART, the other will be transferred to the router and written to its NAND. Save them in the kwboot directory (/home/test/kwboot/ in my case)
Now let’s set the executable bit on kwboot file
chmod 777 kwboot
Connect the USB-TTL adapter to the bricked router and the PC. DO NOT POWER ON THE ROUTER YET! Wait a few seconds then issue the following command:
dmesg | grep USBand make note of the number after /dev/ttyUSB (it usually is 0) set the following bits to the adapter:
chmod 666 /dev/ttyUSB0
Now let’s get down to the interesting part: getting the router to boot from the UART image. In the Terminal window issue the following command:
./kwboot –t /dev/ttyUSB0 –b u-boot-uart.kwb –a
./kwboot -B 115200 -t /dev/ttyUSB0 -b u-boot-uart.kwb -a
and power on the router. Note of the arguments used in the command above: -a = use Armada XP timings -t = open a terminal in the same window after transfer completes -b = file that is to be booted from After the transfer finishes, you should be at the Marvell>> prompt. If you are not, power off the router, disconnect the USB-TTL adapter from the PC and get get back to step 3.
If you are at the Marvell>> prompt, set up TFTP server on the PC (I used Ubuntu’s tftpd package) and put the u-boot-nand.kwb file in its tftpboot folder.
Set your PC IP address to 192.168.1.2 then issue the following commands in the terminal window at the Marvell>> prompt (one at a time):
setenv ipaddr 192.168.1.1;
setenv serverip 192.168.1.2;
tftp 2000000 u-boot-nand.kwb;
nand erase 0 e0000;
nand write 2000000 0 e0000
If the above commands complete successfully we are ready to reboot the router. At the Marvell>> prompt issue the following command:
In the same terminal window you should see the router booting up and stopping at the Marvell>> prompt
Download the firmware image for WRT1900AC (either the stock image or McWRT) and save it to the tftpboot directory.
At the Marvell>> prompt issue the following commands
get <firmware image name>
VERY IMPORTANT! After transfer completes successfully, do NOT issue
run flash_alt_imagecommands, they will brick the router again and send you to step 3. Instead, the following command is to be used:
run_linksysnandboot(if it fails, issue
Leave the router to boot fully up then open its http management page to make sure it is running correctly.
Power off the router and remove the USB-TTL adapter from the router.
Power on the router.
Happy surfing on the internet with your recovered WRT1900AC!