From Variscite Wiki
Supported on SOM version 2.x, SOM-SOLO/SOM-DUAL DART-MX6.
nand-recovery supports flashing of eMMC without the requirement of the process below. Just run on the command line.
  • Check that the device is up.
$ dmesg | grep mmcblk
  • Output example

mmcblk0: mmc1:0001 MBG4GC 29.1 GiB
mmcblk0boot0: mmc1:0001 MBG4GC partition 1 4.00 MiB
mmcblk0boot1: mmc1:0001 MBG4GC partition 2 4.00 MiB
mmcblk0rpmb: mmc1:0001 MBG4GC partition 3 4.00 MiB
mmcblk0: unknown partition table
mmcblk0boot1: unknown partition table
mmcblk0boot0: unknown partition table
Select the eMMC device number. Number will change if SD card is in.

  • Create partition
 $fdisk /dev/mmcblk1
enter n p 1 <enter> <enter> w

Example of a partition root@varsomimx6:~# fdisk /dev/mmcblk1 Device contains neither a valid DOS partition table, nor Sun, SGI, OSF or GPT disklabel Building a new DOS disklabel. Changes will remain in memory only, until you decide to write them. After that the previous content won't be recoverable.

The number of cylinders for this disk is set to 954240. There is nothing wrong with that, but this is larger than 1024, and could in certain setups cause problems with: 1) software that runs at boot time (e.g., old versions of LILO) 2) booting and partitioning software from other OSs

  (e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): n Command action

  e   extended
  p   primary partition (1-4)

p Partition number (1-4): 1 First cylinder (1-954240, default 1): Using default value 1 Last cylinder or +size or +sizeM or +sizeK (1-954240, default 954240): Using default value 954240

Command (m for help): p

Disk /dev/mmcblk1: 31.2 GB, 31268536320 bytes 4 heads, 16 sectors/track, 954240 cylinders Units = cylinders of 64 * 512 = 32768 bytes

       Device Boot      Start         End      Blocks  Id System

/dev/mmcblk1p1 1 954240 30535672 83 Linux

Command (m for help): w The partition table has been altered. Calling ioctl() to re-read partition table

mmcblk1: p1
  • Format and mount
$ mkfs.ext4 /dev/mmcblk1p1 
$ reboot