OpenWrt Forum Archive

Topic: mr3020 and 16MB flash?

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

Hi,

I have a MR3020 with 4MB flash that I want to upgrade to a 16MB. I also have a dominoPi with the SPI/JTAG cape that I would like to use as a programmer for my 16MB flash chip. I will use flashrom to program the SPI.

I have a question though, as all the procedures here are quite old. I have already upgraded the u-boot with pepe2k's modded one. I made a dump of all partitions: u-boot (mtd0) -128kb (which I suppose is the u-boot + data partition). The art partition and the firmware one.

What would be the proper way to create a 16MB flash image from here on?

Should I create an empty 16MB file and cat u-boot, firmware and art in it and then flash. Should I first compile an image for MR3020 that is 16MB in size and then cat u-boot, firmware and art in the empty file?


I'm a bit lost here, ao any help would be appreciated. I can alao try using the parallel connected flash chips with the CS jumper, but I don't feel that much comfortable doing that through u-boot and would prefer the SPI flashing through the programmer

(Last edited by ilf on 19 Jul 2016, 11:20)

What would be the proper way to create a 16MB flash image from here on

What are partitions and their address on your 4Mbit flash? (e.g. mtd0 0x00000000, 0x00009000, mtd1....)

ilf wrote:

[...] What would be the proper way to create a 16MB flash image from here on? [...]

1. Prepare 16 MB empty bin file, filled with 0xFF.
2. Put:
- dump of the U-Boot image (128 KB) at offset 0x0
- OpenWrt/LEDE firmware (sysupgrade or factory, it doesn't matter) at offset 0x20000
- dump of ART (64 KB) in last sector (for 16 MB FLASH it will be at offset 0xFF0000)
3. Solder new FLASH chip on PCB.
4. Drink beer.

dev:    size   erasesize  name
mtd0: 00020000 00010000 "u-boot"
mtd1: 0014f194 00010000 "kernel"
mtd2: 00280e6c 00010000 "rootfs"
mtd3: 00090000 00010000 "rootfs_data"
mtd4: 00010000 00010000 "art"
mtd5: 003d0000 00010000 "firmware"


this is my current /proc/mtd

Also, thanks Pepe2K, both for the u-boot and the info. I'll try later today and will post status info.

Edit: can i just add the standart 4MB image, or should I compile a 16mb firmware, that I don't get

(Last edited by ilf on 19 Jul 2016, 15:04)

The discussion might have continued from here.