Skip to content
Art Nikpal edited this page Jan 4, 2019 · 4 revisions

How To SAVE / DUMP / STORE / RESTORE / COPY / CLEAR miZy images

basic miZy image size is 16MB or 8MB its same for SD MMC of SPI

  • MMC / SD image have addition 8192 bytes header, full image size is 16785408 bytes
  • SPI image started from 0 offset and have normal 16MB = 16777216 bytes

some arithmetic

  • 16785408 / 8192 = 2049 for MMC / SD
  • 16777216 / 8192 = 2048 for SPI

DUMP from SD

dd if=/dev/mmcblk0 bs=8192 count=2049 of=/tmp/my_sd_image.img

2049+0 records in
2049+0 records out
16785408 bytes (16.0MB) copied, 0.111218 seconds, 143.9MB/s

or remote dump ( there zeru is device hostname )

ssh root@zeru dd if=/dev/mmcblk0 bs=8192 count=2049 > /tmp/my_remote_sd_image.img

DUMP from SPI

/dev/mtdblock6 - full spi flash as block device

dd if=/dev/mtdblock6 bs=8192 of=/tmp/my_spi_image.img

2048+0 records in
2048+0 records out
16777216 bytes (16.0MB) copied, 7.185012 seconds, 2.2MB/s

or remote dump ( there zeru is device hostname )

ssh root@zeru dd if=/dev/mtdblock6 bs=8192 > /tmp/my_remote_spi_image.img

how to get device name fo SD or MMC card

mmc_info - simple miZy tool - display name / devname / type for every active storage cards

/dev/mmcblk0 0 SD   SD2GB            platform:sunxi-mmc
-            1 -    -                platform:sunxi-mmc
-            2 -    -                platform:sunxi-mmc

... TO BE CONTINUED ...