Galland / rkflashtool_rk3066

rkflashtool with RK3066 and RK3188 support. To backup the system and flash images from Linux
29 stars 24 forks source link

How to backup system partition #1

Closed martyzz1 closed 10 years ago

martyzz1 commented 10 years ago

Hi,

Apologies for raising and issue like this, but I've been trying for a few weeks to backup my rk3188 and I just can't seem to get it working...

CMDLINE: initrd=0x62000000,0x00800000 init=/sbin/init root=/dev/mtdblock2 mtdparts=rk29xxnand:0x00008000@0x00002000(boot),0x00008000@0x0000A000(kernel),-@0x00012000(system)

From my parm.bin I get the above. What does the "-" mean in the system partition? It's this partition that I would like to back up, so I can create a working backup of my device... I've got picuntu running on my rk3188.

Can you help?

Galland commented 10 years ago

Sure, the "-" means something like "up to the end of the device" How to read the whole system partition? One example, let's say you have a 4 GB device, then:

Since system starts at 0x12000 = 73728 "sectors" (each sector is 512 bytes) The 4 GB device (taking it as 2**32 bytes) divided by 512 bytes/sector, results in 8.388.608 sectors total. Subtracting the initial sector of the system partition gives: 8.388.608 - 73.728 = 8314880 sectors of partition size

So I'd say you should do a read like this:

sudo ./rkflashtool r 0x12000 8314880 > backup_system.img

martyzz1 commented 10 years ago

Thank you :) I really appreciate your help

On 20 November 2013 12:38, Galland notifications@github.com wrote:

Sure, the "-" means something like "up to the end of the device" How to read the whole system partition? One example, let's say you have a 4 GB device, then:

Since system starts at 0x12000 = 73728 "sectors" (each sector is 512 bytes) The 4 GB device, taking it as 2**32 bytes becomes, which divided by 512 bytes/sector, results in 8.388.608 sectors total. Subtracting the initial sector of the system partition gives: 8.388.608 - 73.728 = 8314880

So I'd say you should do a read like this:

sudo ./rkflashtool r 0x12000 8314880 > backup_system.img

— Reply to this email directly or view it on GitHubhttps://github.com/Galland/rkflashtool_rk3066/issues/1#issuecomment-28885845 .

[image: photo] Martin* Moss* COO / CTO [image: Twitter] http://www.twitter.com/Martyzz1 m: +447734702905 w: www.sharehoods.com w: www.migreat.com http://www.sharehoods.com/