OpenWrt Forum Archive

Topic: How to compile firmware for Mr3020 with 8MB ram

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

Hello all

I have modified mr3020 with 8 M ram and I want build spesific firmware for my router. can I compile firmware for mr3020 8MB with same way if we compile firmware for mr3020 4 Mb ram ?

If not, what should I do ?

Thank you very much for reply my thread

sincerely

riyadi

8MB RAM or 8MB Flash?

8MB RAM is insufficient for everything.

I'm sorry,

I mean 8MB for IC flash. how we compile for these spec ?

So, you have increased the size of the flash memory in your device from 4 to 8 MB, right?

You need to investigate from Openwrt sources, where the flash structure for your device is defined and then patch that source file to define 8 instead of 4 MB. And you need to also consider the flash layout structure, so that you do not e.g. overwrite the bootloader, wifi calibration data etc. (in config, art partitions).  The layout definitions are platform- & device-specific, so there is no general advice.

EDIT:
My first guess is that you need to use "tplink-8mlzma" instead of "tplink-4mlzma" here:
https://dev.openwrt.org/browser/trunk/t … efile#L496

See also https://wiki.openwrt.org/toh/tp-link/tl … ash_layout
It looks like the config & art are at the end of the 4 MB. You probably need to copy them to the end of the 8 MB, or something similar. You need to check the Tp-link firmware layout definitions in 4 MB vs. 8 MB. Might be this code here:
https://dev.openwrt.org/browser/trunk/t … tplinkfw.c

(Last edited by hnyman on 23 May 2017, 06:46)

hnyman wrote:

EDIT:
My first guess is that you need to use "tplink-8mlzma" instead of "tplink-4mlzma" here:
https://dev.openwrt.org/browser/trunk/t … efile#L496

Exactly. And here https://dev.openwrt.org/browser/trunk/t … tplinkfw.c

hnyman wrote:

It looks like the config & art are at the end of the 4 MB. You probably need to copy them to the end of the 8 MB, or something similar.

Exactly, ART partition located at last 64kb of SPI ROM chip, no matter which size of ROM u have.

Can confirm cuz i've made the same with mine 3020 for 16MB w25q128 smile

(Last edited by stas2z on 18 Nov 2015, 13:07)

Thank you very much for the information, it's very usefull

The discussion might have continued from here.