This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Can't burn image eMMc
#10
(10-02-2018, 10:16 PM)franckm Wrote: UMS from SD card
eMMC’s U-Boot is broken to booting or not built-in the UMS function (e.g. 3rd party custom image).


If your eMMC is not found while you plug to a PC. then you can recover it by preparing a OS into SD card. Which should contain also the image to write to the eMMC, or just copy the SD card to the eMMC directly. Better similar size to eMMC.
The former option will do to copy the file directly to the eMMC. Supposed that is a zip file
Code:
sudo zcat /path/to/TinkerOS.zip >/dev/mmcblkX    ## see explanation below for the partition naming
Assuming the latter option. You need to write the image to SD card, boot the SD card by setting the jumper to MASKROM.
Once you have the system running, then you need to go to a console like lxterminal and prepare to copy the system back to eMMC. Unless you've logged in by a SSH connection.
Operations
  •  check the size of SD card against the eMMC
    Code:
    $ sudo fdisk -l
  •  note the highest number of sectors used on the SD card, it must be less than eMMC. Otherwice chose the smallest.
  • Found the smaller size e.g.
    Code:
    Disk /dev/sdc: 14,4 GiB, 15489564672 bytes, 30253056 sectors      ## use 30253056 / 2 = 15126528
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disklabel type: dos
    copy the system over the eMMC
    Code:
    $ sudo dd if=/dev/mmcblkX of=/dev/mmcblkY bs=1K count=(sizeof_SD/2) conv=notrunc,noerror,sync


Last command explanation :
  • X = kernel device number referred to the SD card
  • Y = kernel device number referred to the eMMC
  • sizeof_SD = size of SD card in sectors or which is the smallest device. This avoid to overflow the eMMC. Once the system is recovered it should take a further partition adjustment.
  • There could be some 10 minutes waiting to complete.
Once is done, you might put the jumper in PARK position and try to plug the TB S on a PC. If it'll appear as UMS, then you have recovered the function. Then you'll need linux OS to check the partitions for consistency, whether you want to keep that installation.

There's even a shortcut, but the eMMC won't have any reliable partition table. It'll take to copy the u-boot back to eMMC.

So these are the steps, preferred to use linux OS:
  • unpack the OS in a image.
  • check where the first partition starts
    Code:
    $ sudo fdisk -l unpacked.img
    That should be the limit to stop copying.
  • If less than 4 Mb, then recalculate how many blocks to put on the count= statement
  • take the first 4 Mbytes from the image
    Code:
    dd if=unpacked.img of=my_u-boot.img bs=512 seek=64 count=8128
  • write the unpacked.img to SD card. Mount the SD card and write the my_u-boot.img to the /home/$user directory. (The $user may vary according which OS you want to use)
  • boot the SD card with MASKROM enabled
  • copy the my_u-boot.img to eMMC.
  • similar to the previous method referred to the partition numbering.
    Code:
    $ sudo dd if=my_u-boot.img of=/dev/mmcblkY bs=512 seek=64
Done, you should have your installation came back as previously installed, according to the partition table that was set before the damage. It may take few seconds to complete. But is preferred to check for consistency. Anyway the UMS functionality is back to use and will allow to write to eMMC.
Light blue words might be a link. Have you try to click on them? Big Grin
Reply


Messages In This Thread
Can't burn image eMMc - by raghyz - 06-27-2018, 11:48 AM
RE: Can't burn image eMMc - by Robertspark - 06-27-2018, 07:12 PM
RE: Can't burn image eMMc - by raghyz - 06-28-2018, 03:08 PM
RE: Can't burn image eMMc - by Craz_tyle - 07-02-2018, 07:44 AM
RE: Can't burn image eMMc - by jamess - 08-13-2018, 06:57 AM
RE: Can't burn image eMMc - by Robertspark - 06-28-2018, 04:43 PM
RE: Can't burn image eMMc - by raghyz - 07-01-2018, 07:11 AM
RE: Can't burn image eMMc - by franckm - 10-02-2018, 10:16 PM
RE: Can't burn image eMMc - by jamess - 10-03-2018, 01:25 AM
RE: Can't burn image eMMc - by franckm - 10-03-2018, 07:50 PM
RE: Can't burn image eMMc - by Im4Tinker - 10-04-2018, 05:54 AM
RE: Can't burn image eMMc - by franckm - 10-04-2018, 06:42 AM
RE: Can't burn image eMMc - by Im4Tinker - 10-03-2018, 03:17 AM
RE: Can't burn image eMMc - by xbox1234 - 06-08-2020, 11:27 AM
RE: Can't burn image eMMc - by xxj61V0ra2 - 10-07-2018, 02:12 AM
RE: Can't burn image eMMc - by Im4Tinker - 10-07-2018, 08:02 AM
RE: Can't burn image eMMc - by Tinker Board - 10-08-2018, 01:50 AM
RE: Can't burn image eMMc - by ttroutman - 10-08-2018, 02:55 PM
RE: Can't burn image eMMc - by Im4Tinker - 10-08-2018, 04:36 PM
RE: Can't burn image eMMc - by DVE - 10-22-2018, 07:53 AM
RE: Can't burn image eMMc - by Tinker Board - 10-22-2018, 09:14 AM
RE: Can't burn image eMMc - by Im4Tinker - 10-22-2018, 11:16 AM
RE: Can't burn image eMMc - by Tinker Board - 10-22-2018, 11:26 AM
RE: Can't burn image eMMc - by DVE - 10-22-2018, 09:17 AM
RE: Can't burn image eMMc - by DVE - 10-22-2018, 01:21 PM
RE: Can't burn image eMMc - by Im4Tinker - 10-22-2018, 08:13 PM
RE: Can't burn image eMMc - by Tinker Board - 10-23-2018, 02:06 AM
RE: Can't burn image eMMc - by Im4Tinker - 10-23-2018, 07:18 PM
RE: Can't burn image eMMc - by Tinker Board - 10-24-2018, 02:33 AM
RE: Can't burn image eMMc - by Im4Tinker - 10-24-2018, 12:14 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)