This is mostly based on reverse engineer of the _RKUpgrade.dll from the SAM3xx upgrader. Change-Id: I37f4503899c7198ce463130b2ff994da9ca7dc4b
Change-Id: Iddc4b39a4611f12b9eefc3a96d7eeb7229777ebb