So, as I'm sure everyone probably realises; the uBoot is pretty useless if you don't have a serial cable to hand or don't want to open your box up in the first place.
As a result of bricking my box with a bad OpenWRT image and not having a Serial TTL cable to hand, I've downloaded the uBoot source code from TP-Link and modified it to perform a TFTP RAM-boot and TFTP Flash depending on whether you press the QSS or QSS + Reset buttons.
If you have a serial link anyway, this uBoot is also useful since it increases the boot interrupt window from 1 second to 4 seconds... Now, unfortunately, I haven't been able to test this myself yet since I already borked my router with a bad OpenWRT image and I'm still waiting for my TTL converter to arrive.
Anyhow, if someone with direct flash access (or at least serial) could please try this, I'd very much appreciate it; in order to use it you will need to firstly have a version of OpenWRT running that allows you to write mtd0 (if you make your own builds, locate mach-tl-wr1043nd.c and delete the .mask_flags line from the u-boot section.
Next, make a copy of your mtd0 and use dd to overwrite it with the new uBoot code, for example: dd if=uboot-realflash.bin of=mymtd0.bin conv=notrunc
Please ensure you don't miss out the conv=notrunc otherwise the area storing your MAC will be erased; if in doubt, make sure the filesize doesn't change after the dd operation.
uboot-realflash.bin is the "real" uboot and will actually provide the TFTP ramboot and flash modes when you hold the applicable buttons. uboot-testonly.bin will simply report over serial what button(s) were held in and won't actually change anything and effectively behaves identically to the stock uboot (except for the extended wait period)
I will first point out that for all I know, the GPIO address is wrong and it doesn't work at all - what I *DO* know however is that this code doesn't actually execute if you interrupt the boot process via serial (so if you use the tpl command during the 4 second window, my code will never run) meaning that if the new code is bad in some way, you should still be safe since you can interrupt it with tpl and reflash or manually issue the boot command.
Now for the usage info - the device expects the TFTP server to be on 192.168.0.5 and its own IP will be 192.168.0.2 - if you are performing TFTP ramboot you are expected to name the file uImage_boot (case sensitive) and if you are flashing you are expected to name the file uImage_flash - I made it this way to avoid damage if you only want to boot something.
Once you have TFTP setup, hold in the QSS button while powering the device up to go to TFTP RAMBoot mode (do be aware that there is a 4 second timeout beforehand so be patient with it) - if you have serial it should say on screen that it's detected the TFTP Boot button, additionally, the QSS and USB LED lights should come on.
If you want to perform a TFTP flash, you need to hold in both the QSS and Reset buttons together and again, be patient, there's a 4 sec timeout beforehand. as the above, it will tell you on serial that it has detected TFTP Flash button combo and will also light up the QSS LED (ONLY the QSS LED comes on for Flash mode)
The source code is included; just get the original uBoot from TP-Link's GPL section and drag and drop everything in the src folder over to it.
Final Health Warning: Whilst the binaries appear sane to me and I'm relatively confident they can and will function, I have no way of knowing that right now, so therefore, there is always the possibility that flashing this will result in a totally non-functioning bootloader.
DOWNLOAD: http://wikisend.com/download/525032/uBo … 3ND-mod.7z
(Last edited by Olipro on 27 Feb 2011, 20:14)