Increase Openwrt Overlay filesystem in custom board

How to increase the Overlay filesystem without external storage for MediaTek 7628 Processeor.
Available Flash : 32 MB
Available Memory : 64 MB

If 32mb of flash memory is not enough, you have 2 options:
External storage such as a usb stick or Sd card, or an ssd/hd (assuming you have the appropriate physical ports)
Or
Replace your 32mb flash chip with something larger. This requires desoldering and resoldering an ic (usually surface mount, relatively fine pitch parts) and programming the chip with the appropriate boot loader and then your openwrt image. You’ll also probably need to build a custom image in order for openwrt to recognize the additional space.

Below is the disk details of my MediaTek processor with openwrt Image which i have compiled from latest source.

Filesystem Size Used Available Use% Mounted on
/dev/root 3.3M 3.3M 0 100% /rom
tmpfs 28.6M 228.0K 28.4M 1% /tmp
tmpfs 28.6M 56.0K 28.6M 0% /tmp/root
tmpfs 512.0K 0 512.0K 0% /dev
/dev/mtdblock6 2.6M 228.0K 2.3M 9% /overlay
overlayfs:/overlay 2.6M 228.0K 2.3M 9% /

Here i'm getting only 2.6 MB for Overlay, whereas tmpfs has 28.6 MB.

And one more observation, if i download and install pre-compiled images(Older versions) i'm getting more overlay filesystem size(Almost 10 mb).

Below is the disk details with pre-compiled openwrt image(openwrt-15.05.1-ramips-mt7628-mt7628-squashfs-sysupgrade.bin).
Filesystem Size Used Available Use% Mounted on
rootfs 14.1M 44.0K 14.1M 0% /
/dev/root 2.0M 2.0M 0 100% /rom
tmpfs 14.1M 48.0K 14.1M 0% /tmp
tmpfs 14.1M 44.0K 14.1M 0% /tmp/root
overlayfs:/tmp/root 14.1M 44.0K 14.1M 0% /
tmpfs 512.0K 0 512.0K 0% /dev

So i want to know, is there any way to configure overlay filesystem size while compiling the image.

You might want to start by trying something that is current and supported. That version of OpenWrt has been unsupported for a long time and has vulnerabilities that are actively exploited on the internet.

tmpfs is a folder stored in RAM, it is for temporary files. Everything in tmpfs is lost when the device is powered off because it is RAM. You cannot use this to store overlay.

/dev/mtdblock6 2.6M 228.0K 2.3M 9% /overlay
overlayfs:/overlay 2.6M 228.0K 2.3M 9% /

this image is using mtd partition 6 on flash chip, the size of this partition is 2.6MB.

this image is using /tmp/root for overlay, this is tmpfs and RAM. Nothing is saved, when you power off the device it is reset to default settings.

what are the mtdparts of the flash chip? see this for the commands to read existing mtdparts

The main way to solve your problem is to make mtdblock6 bigger or choose a different mtdpart for your overlay.

This requires changing the source code where the mtdparts are defined. Is your device using dts to define hardware settings?

In my opinion your are using a board config in the make menu settings that have a different flash layout than the one installed in your board.