Jump to content

Recommended Posts

Posted

Thanks to help in another thread to solve our eMMC problems, we are making progress getting Armbian working well on the H2+ boards we have.

 

Now we would like to be able to make a snapshot of the eMMC device and then be able to write the whole image to another board.

 

I have been able to create a single file backup using both these methods (done after booting from SD). The created files appear to be the same size.

dd if=/dev/mmcblk1 bs=16M | gzip -c > /mnt/usbflash/emmc.img.gz

or

./backup_block_device.sh

(from https://code.online-mp.pl/svn/public/backup_block_device/trunk/)

 

To write the image, we'd like to use FEL.  When we run sunxi-fel on a windows machine we do detect the board:

C:\win32>sunxi-fel.exe -l 

USB device 001:012   Allwinner H3      02c00042:44004620:79910124:3c23010e

 

When I look at the command line for the start.bat tool for writing to eMMC, I see this line, but it isn't clear where a single image file would start in memory.

win32\sunxi-fel.exe -p uboot %BOARD%\u-boot-sunxi-with-spl.bin write 0x42000000 %BOARD%\zImage write 0x43000000 %BOARD%\script.bin write 0x43300000 %BOARD%\uInitrd write 0x43100000 %BOARD%\boot.scr
 

My question is, what command line would we use to write the eMMC image in one block?  

 

Posted

Here's an update to our testing.  The problem now is that the fel-mass-storage setup seems to have a 512MB device size limitation.

 

We switched to trying to use the sunxi-fel tool from Zador:

https://github.com/zador-blood-stained/fel-mass-storage

 

After connecting the board to a Ubuntu machine, fdisk sees the eMMC as /dev/sdb

Disk /dev/sdb: 511 MB, 511221760 bytes
255 heads, 63 sectors/track, 62 cylinders, total 998480 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xe64560c2
   Device Boot      Start         End      Blocks   Id  System

The trouble is that the eMMC device is 8GB and not 512MB.

 

When trying to dd the image file via FEL it works fine until it gets close to the 512MB limit and then fails with a "no space left on device" error.
 

/home/x/Desktop# dd if=emmc.img | pv -s 8G | dd of=/dev/sdb bs=16M
dd: error writing ‘/dev/sdb’ 488MB 0:00:28 [  14MB/s] [>                        : No space left on device:22
 488MB 0:00:28 [17.4MB/s] [>                                   ]  5%            
0+132653 records in
0+132652 records out
511221760 bytes (511 MB) copied, 28.053 s, 18.2 MB/s

I notice that the heads/cylinders/sectors numbers are all set to maximum. Does this mean there isn't a way to support devices larger than 512MB? Would it be possible to switch to a much higher number of bytes/sector instead of 512KB/sector? Is there another way around the limitation?

 

 

 

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines