Posts: 26 to 50 of 102

I have done 16M Flash and 64M RAM hardware modification for TP-LINK TL-MR3420 and compiled a version openwrt for it. Everything works good as of now..

Original Hardware:ar7241+ar9287 / 4M flash /32M RAM /USB2.0. What we need to do is replcing its flash/memory chip and flash openwrt to unleash its potential.

Part one: find a proper chip:1. You need to check the flash chip data sheet, it shall be 64k size per sector since this is defined in uboot. Working Serial Flash chip:8M: MX25L640516M: MX25L12805, S25FL128PIF

Memroy:66 Pin,16bit DDR400 64M chip, you may desolder one from your old memory bar such as Hynix HY5DU121622DTP-D43 got find a suitable chip.

Part two: Compile uboot to support 8M/16M serial flash chip:1. Download source code from tp-link gpl site: http://www.tp-link.com/support/todownload.asp?url=%2FGPL%2Fmr3420%5F3220v1%2Etar%2Egz2. Extract the package, goto mr3420_3220v1/ap99/boot/u-boot/include/configs/ap99.h to modify the source code as following, be ware that #define FLASH_SIZE 16 is the definition for your flash size, change it to 8 if you use a 8M chip.

4. Since the u-boot.bin shall be 128k in length. Use WinHEX or other hexadecimal editor to create a empty project, in my instance I user Winhex, use replace function to fill all bytes with FF and paste the u-boot.bin(Ctrl+A select all, Ctrl+B to write from 0x000000) to the template from the begining so that you got a 128k u-boot with FF appended.

5. Check the back of you router box, write down your MAC and PIN, write the mac and pin to your uboot.bin:MAC 6 bytes from 0x1FC00 PIN 8 bytes from 0x1FE00

Now the u-boot is ready and save it for furture usage.

Part Three: Compile your openwrt firmware:

1. Checkout trunk and update feeds as other common tutorials2. Modify Openwrt code to support and partition your flash:

3. menuconfig and make your image as common tutorials. save the image openwrt-ar71xx-generic-tl-mr3420-v1-squashfs-factory.bin for future usage.4. back up your 64k art (wirelss driver data, without it your wireless does not work.) this is important! you can also use the backup one from other tp-link ar7241 chipset routers.

Part Four: Make up a flash programmer file:1. Use Winhex to create a empty 16M template, use replace to replace all 00 to FF.2. Open the u-boot.bin previously you created, copy all (Ctrl+A) and Write(Ctrl+b) the 128k bytes from begining to the template.3. Open the openwrt firmware openwrt-ar71xx-generic-tl-mr3420-v1-squashfs-factory.bin write all data(about 15.75M) as step 2 from 0x000000020000 to the file.4. Open the art file, write the 64k file to the lastest 64k from 0x000000ff0000 to your template.5. save all to a new file such as New.bin for future usage.

Part five: Solder the chip1. Flash the whole file to your flash chip by flash programmer ( you shall have this hardware to as help from others)2. Solder the flash and memory chip, 64M RAM can be detected after changing the chip, no need to modify the uboot code to support 64M RAM3. Solder the TTL pin for TTL debugging.

It seems a fair bit backwards with an errror output that lacks the full path when complaining about something related to that...very much linux..its even trunktated in the log file. Not very clever. How can I enable that I get full path in terminal and log in Ubuntu?

It seems a fair bit backwards with an errror output that lacks the full path when complaining about something related to that...very much linux..its even trunktated in the log file. Not very clever. How can I enable that I get full path in terminal and log in Ubuntu?

I also had problem to compile u-boot by following pupie's instructions. The output are shown below:

It seems a fair bit backwards with an errror output that lacks the full path when complaining about something related to that...very much linux..its even trunktated in the log file. Not very clever. How can I enable that I get full path in terminal and log in Ubuntu?

I also had problem to compile u-boot by following pupie's instructions. The output are shown below:

I'm not sure. Honestly, I'm really crappy at anything Linux related, perhaps only persistent enough.. It seems like you either don't have the user rights or missing a script. I did run my uboot compiling as root, just in case.

Personally I managed to dig out the uboot.bin from another folder, not indicated at all by the error printout... I have just soldered on the flash and are up and running with 16MB/64MB. However, I do not have any wifi interface at all, indicating that I got the ART on the wrong spot. Question is, do I have to reflash it again or can I "move" the ART partition from busybox?

I actually tried exactly that before compiling as root. I will try again. It seems like my uboot.bin hasn't picked up the partitioning properly as I get really weird offsets (sorry for the garbage, havn't soldered on the resistor yet):

During the flash process, the image is loaded to 0x81000000 and then transferred to 0x9f020000. Since the flash ROM is 4M long, it's length is 0x400000. What does 0x81 and 0x9f in these addresses mean?

You lost the art.bin part of your fimware, thats why you got message "IIS NOT CALIBRATED", the wifi part will not start.

Do back up the art.bin file before you upgrade the chip.

I did read the chip in a reader and extracted the full image and ART from there. It is in the new image but on the wrong spot. According to OP it should be on 0x3f0000 and 0x010000 forward on a 4MB chip, but it was actually located on 0x3f1000 and forward. I did put it on 0xff0000 and forward as OP did on the 16MB chip, but it didnt fly. I'm going to dig around for an extracted ART, possibly request from forum members and do a comparison between them, could be useful.

I'm not quite sure if it works, but maybe it works to just do an "mtd write art.bin art". It just depends if the ART-partition is write protected.Or, since you have already a serial link, enter uboot and flash via tftp (similar to this: http://wiki.openwrt.org/toh/tp-link/tl-mr3420#flash.via.tftp). You probably have to replace all 0x9f020000 with 9fff0000 and 0x3c0000 with 10000.If you don't have a tftp server running already, you could also upload the art.bin via serial link, it should just take a few seconds: http://wiki.openwrt.org/toh/tp-link/tl- … 232.method

During the flash process, the image is loaded to 0x81000000 and then transferred to 0x9f020000. Since the flash ROM is 4M long, it's length is 0x400000. What does 0x81 and 0x9f in these addresses mean?

You lost the art.bin part of your fimware, thats why you got message "IIS NOT CALIBRATED", the wifi part will not start.

Do back up the art.bin file before you upgrade the chip.

I did read the chip in a reader and extracted the full image and ART from there. It is in the new image but on the wrong spot. According to OP it should be on 0x3f0000 and 0x010000 forward on a 4MB chip, but it was actually located on 0x3f1000 and forward. I did put it on 0xff0000 and forward as OP did on the 16MB chip, but it didnt fly. I'm going to dig around for an extracted ART, possibly request from forum members and do a comparison between them, could be useful.

This indicates that the u-boot and ART is in the right place (according to OP), BUT the genererated firmware is messed up. The kernel is on 0x000000020000-0x000000100000, when the OP has it on 0x000000020000-0x000000160000. (indicating the "missing" 6MB)

I also did plug in a downloaded 4MB image from trunk and dropped it inside the 16MB image I compiled to verify the offset for ART. This resulted in this:

It seems like the partitioning is a bit different, starting from "kernel". This verifies that along the line I need to move the offset according to that ART was located at 0x3f1000 and forward on my board, not 0x3f0000 and forward as OP had it. A bit strange as I use the same package as him to generate u-boot.bin. Anyway, I will reflash it today with some changes and see what gives.

This looks healthier even though my "kernel" partition is on 0x000000020000-0x000000100000, while OP's is on 0x000000020000-0x000000160000.

Whats going on? My "kernel" partition is smaller, how can this be?

I have also backed up the ART from both the squash and the jffs2 installed images. They both are identical to the ART I have on the initial image I pulled from the 4MB chip. So the ART is present, but quite possibly on the wrong offset, taken the difference on the offset initially, located at 0x3f1000 and forward on my board, and 0x3f0000 and forward for OP. I could really use someones input with a backup of their ART partition.

How do you manage to put uboot.bin + firmware + art.bin stuff in one file ?, let's check part four of OP tutorial, i think you miss something.

Sry for my english.

Strange that you get it copied there and I am not. I have tried both with user and root, same result. However, the u-boot.bin is available in the directory it is supposed to be copied from.

As for the editing the image, its all done in winhex. Very simple and straightforward. Only threshold is to deal with the offsets and hex values contra decimal. I'm at the moment at my local soldering guy so I will know the result in a ew moments. One of few good things about Indonesia is that labor costs nothing, I get soldering done with airguns and good tools for $1/hour. No use of risking itself then..

Ok, with the proper offset of ART I'm up and running. Wifi is up now. Still have that strange differences between squash and jffs2 though. As said before, my "kernel" is all over the place. I think it perhaps got something to do with my compiling. From here on it's more related to the "firmware" partition, u-boot and ART is healthy, so no more de/resoldering. I'm happy with 16MB/64MB on this thing, did this mostly as a practice object before attacking the MR11U and 703N. It seems a bit hard to find the GPL code for that though. If anyone has seen that around please notify me.

...... I'm happy with 16MB/64MB on this thing, did this mostly as a practice object before attacking the MR11U and 703N. It seems a bit hard to find the GPL code for that though. If anyone has seen that around please notify me.

The GPL code file is too big and my internet is going slow, can you describe what is the content of that file. I don't need the toolchain part i just need the uboot source., can you upload it some where ?.

The GPL code file is too big and my internet is going slow, can you describe what is the content of that file. I don't need the toolchain part i just need the uboot source., can you upload it some where ?.

Indeed, they are very large. Under the top directory GPL/branch_hornet_linux/, there are the following subdirectories:

I received a moded 703n (8M/64M). This guy simply used original 4M uboot and it works fine with my 8M rootfs. What is the difference between 4M and 8M uboot?

Edit (02/15/2012):I figured this out. A 4M uboot cannot write anything longer than 4M. However, the Openwrt can detect flash memory size on its own. Thus, to flash a rootfs larger than 4M, one need to first install a 4M rootfs and then use ssh or luci to install a new rootfs, which can be larger than 4M. A two step process but not too bad.