If you use the Linksys WRT54GL router it is realy easy to switch between the different available firmware versions.
No special process is neccessary like on other routers!
From Stock to DD-WRT
First download and install the correct mini firmware for your router by using the WebGui. After that install a firmware of your choice like the std or vpn one.
The files can be found here:
From DD-WRT to Stock
If you want to go from a DD-WRT firmware to the original stock one this can be done also very easily by also using the WebGui of DD-WRT.
The newest one for the WRT54GL router can be found here: http://www.linksys.com/us/support-article?articleNum=148652
or directly here (24.05.2016): http://cache-www.belkin.com/support/dl/FW_WRT54GL_4.30.18.006_US_20160108.bin
From Stock to OpenWRT
If you want to switch from the original firmware to OpenWRT you can also use the WebGUI of your stock firmware.
From DD-WRT to OpenWRT
1 step) From DD-WRT to Stock
2 step) From Stock to OpenWRT