This is an updated tutorial version from the one I made last year. It will enable you to migrate from DSM 5.2 to DSM 6.1.7 directly without the need to upgrade to DSM 6.0.2 first. If for some reason you want to upgrade to DSM 6.0.2 first or simply you do not want to upgrade to DSM 6.1.7 but only to DSM 6.0.2 then use the link above.
To upgrade from DSM 6.0.2 to DSM 6.1.7 read here.
As most of you know by now Jun was able to find a way to install DSM 6 on non Synology boxes. Here