tplink TL-WR1043ND access point is now ready (was Re: svn
commit: r227926 - head/sys/mips/conf)
Adrian Chadd
adrian at freebsd.org
Wed Nov 30 13:48:56 UTC 2011
+1 on the serial console.
Yes, you can revert to the original firmware. Well, I haven't yet tftp
-uploaded- what's in the flash, but what I suggest you do is this:
* modify my tplink config file to have an mdroot of 6 meg (and change
the rootfs to be /dev/md0.uzip
* when building the firmware, build "buildkernel installkernel mfsroot
fsimage netboot" - that'll blit the uzip mfsroot into the kernel,
leaving you with TP-WN1043ND.netboot
* you can then netboot the kernel:
> tftpboot 0x80050000 kernel.TP-WN1043ND.netboot
> go 0x80050100
.. then use dd and netcat to take a complete flash backup, something like:
# dd if=/dev/flash/spi0 bs=64k | nc <ip> <port>
That should leave you with an 8 megabyte image.
Finally, the trick to restoring the original firmware is to trim out
the first 128k and the last 64k of the firmware image. You can likely
use dd to do that. I haven't the time to think of the way to do it,
but something like this.
* skip the first 128k - that's uboot
* skip the last 128k - that's the config partition (ignore) and the
last 64k there is the radio calibration data
$ dd if=backup-image.bin of=firmware.bin bs=64k skip=2 count=124
.. I think that's right. That should leave you with an image you can
reflash later on:
> erase 0xbf020000 +7c0000 # I _think_ this is right, check with the openwrt wiki!
> tftpboot 0x81000000 backup-image.bin
> cp.b 0x81000000 0xbf020000 +7c0000
> bootm 0xbf020000
I -think- that's right. I'd appreciate it if someone else would
double-check my figures. But I've done that in the past so I have a
complete copy of the flash contents, including the radio calibration
data, in case I somehow screw it up.
Good luck!
Adrian
More information about the freebsd-embedded
mailing list