Building for custom flash size


Im trying to build Lede for my old (but gold) TP-MR3020, im planning on upgrading the flash chip from 4 to 16MB
This is just for educational purposes, i know there are GL.inet units out there that already have this configuration.

Right now im struggling to find the correct file to edit in order to change the flash size, older posts direct me to .dts files, but i cant find the file for this particular board. If anyone can point me in the right direction i would be very grateful.

Most TP-Link will have tplinkparts.c built in. This checks the flash chip size at boot and generates the partitions dynamically. You can flash a release build and it will use the larger chip.

dts files are more of a Ralink / MediaTek thing.

Thanks, i found this file already, but still wondering how i can build a bigger then 4MB file with the LEDE builder as i like to create my own images.

Edit, nice i can already answer my own question:

i have to edit file target/linux/ar71xx/image/ at line 359:

define Device/tl-mr3020-v1
    $(Device/tplink-4mlzma)  // edit this to tplink-16mlzma
    DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
    BOARDNAME := TL-MR3020
    TPLINK_HWID := 0x30200001
    CONSOLE := ttyATH0,115200