I'm proposing new slightly modified build system for openwrt. As all we know routers does not hold much on boad memory and most full featured packages does not fit on flash images.
For example. If you wish to have full featured cups server which is about 100M in size you have to think your way.
Most of the solutions described here http://wiki.openwrt.org/doc/howto/extroot but they all have limitations. I'd like to push new look to the situation.
What do we have here as a perfect build? I suggest it would be a binary file which, after flushing to the router has all your settings (including provided by your ISP) local services, like samba, dhcp already configured. So you flushing a router with 1 single file and you ready to go.
Even your friend or mom can flush a single file if it does not require a additional setup. So 1 file is the best. And flushing or hard reseting (or restoring from a hack) a router will provide a working router as well, since all settings allready fliled up on a flash binary file. That is good.
Actually I configured my build scripts to provide the solution I described above for me first router. DIR-300 has no external IO like USB and it make it single flash file is easy enough. My build scripts includes main branch with example configs, after cloning a git tree you can fill up your settings and push git repo back to your backup server. So you will never lose any settings or your prefered services again.
You can see my work here:
https://github.com/axet/openwrt-dir300-b1
But that was only first step in that direction. My second step is to flash extremely large size image to my 8 MB router.
What the best way of doing so? I think all possible ways and end up with following.
First of all, you need create basic image, with your favorite configs. Same as above. You flash a router with mimimum set of services, necessary to fire up your ipv4, ipv6 may be samba server. And you are ready to go. Next step is to add external device to router. All large packages should come easy enough to the router if you already have them prebuilded.
And here I suggest to use additional folder /opt mounted by block-mount automatically on boot. If this folder or external device is absent, router should keep working and give you no error. If that folder automatically mounter then router should fireup all /opt/etc/init.d scripts, enable swap, run ldconfig to fixup dynamic library paths and all services should read it's settings from /opt/etc.
The new look in my solution is to have new set of rules for openwrt build scripts (some of this rules already implemented in my git repo).
1) add new package prefix, indicating it is a LARGE package and shuld be installed into prefix directory. I called this variable PKG_PREFIX. This prefix read by build system and while building, scripts are providing nessesery prefixes to configure and make command to allow you prepare packages ready to run from PKG_PREFIX path (ex: PKG_PREFIX=/opt)
2) it also required to modify some build script of the package manually (by patching). Since not all parameters from ./configure or configure.ac can be configured trough script parameters, such as --cups-prefix=/opt
3) it required to modify opkg script to allow you to install specially prepared packages (builded with /opt prefix) to the /opt dirrecotory and keept all information about installed package on the /opt folder in case if /opt folder is not mounted (usb removed or damaged) we shall not show /opt installed packages
4) change boot scripts to make them mount and read /opt dirrectory and run startup scripts from a /opt/etc/rc.* folders
This is where I'm working on CUPS services installed to /opt dirrectory (branch cups).