If you have some different partitions you just have to load into the bootloader and call ubi remove
before you try to tftp the new firmware image.
Between stock and robinmarko's image I would do
ubi remove linux
ubi remove jffs2
ubi remove rootfs
ubi remove rootfs_data
ubi create linux 0x6406000
But I don't know the names of the partitions for dd-wrt or the latest openwork snapshot.