OpenWrt Forum Archive

Topic: modify uboot on tpl-mr3220

The content of this topic has been archived on 22 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

I want to change the boot loader on tplink 3220 that uses uboot.
I am trying to change the defauls serverip from 192.168.1.27 to the server on my LAN.
Also is it possible to make the default boot from tftp instead of from memory?

I can connect via serial and use setenv but there is no saveenv command available. Even if i set the uboot partition to not be read-only how would I save the changes?

-thanks

i suggest you download the source codes on TP's GPL site, as far as i knowe your uboot doesn't support the saveenv cmd.
so you'd better compile your owen one,
1,find the proper board relate h file in /include/config/yourborad.h    (usually you can find your board name in the series printout messages like ap99 ap93 or db121 etc.)
2,find the config cmd micro it looks like #define CFG_COMMAND .... can't remember the exact name ,and add CFG_CMD_ENV
3,add #defien ENV_IS_IN_FLASH 1 ,and #undef ENV_IS_NOWHERE, #define ENV_ADDR   the addr you wanna save at, #define ENV_LEN 0x10000 sooorry can't remember either but looks like these, and you can find them in the .h file
and run make youboard_config; make
then you will get a u-boot.bin file .but be careful about the file size if it's <128kB you should append FFFFFFF upto 128kB(no more no less) using a winhex or some other tool,also edit the MAC addr at offset 0x1fc00.

caution !!!!! your wrt may bricked

(Last edited by tthrx on 28 Nov 2011, 13:29)

That is a little to risky for me I think. I tried to cat the mtd0 to a file and edit it in a hex editor but I am not able to write it back to mtd0 because it is locked. I tried unlocking it following the wiki instructions at http://wiki.openwrt.org/toh/tp-link/tl- … n.writable but it did not help me. I created a post about it at https://forum.openwrt.org/viewtopic.php?id=33170  but I am still stuck.
I don't reall want to brick this router but I do want to change some env settings and maybe even get it to tftp boot instead of booting from memory.

Just in case I try the (might) brick route this post: https://forum.openwrt.org/viewtopic.php?pid=149061 is basically what I need to do right? Just change the moodifications but the filling up to 128 is the same idea.
Also if its >128 then I am stuck?

-thanks.

(Last edited by firesam on 28 Nov 2011, 15:33)

good day
I need the rom ART.BIN router TL-MR3220, I see that you have enough knowledge.
dd-wrt installed, you can copy the block / tmp/mtd7 fimware which is the whole rom with the command (dd if = / tmp dev/mtd/7 of = / backup /. bin) and then just copy to your PC via winscp ok, thank you Brazil,

The discussion might have continued from here.