You can compile your own “lean” version of OpenWRT to leave you with more flash rom space.

With a little tweaking you can get it down to the bare essentials anywhere between 3 - 4Mb leaving plenty of room to play with.