DART-6UL eMMC: Difference between revisions

From Variscite Wiki
(Created page with "{{PageHeader|DART-6UL - eMMC}} {{DocImage|category1=DART-6UL|category2=Yocto}} __toc__ {{note| NOTE:<br>Make sure you booted from sdcard with imx6ul-var-dart-sd_emmc.dtb selec...")
 
No edit summary
 
(5 intermediate revisions by the same user not shown)
Line 4: Line 4:
* Check that the device is up.
* Check that the device is up.
<pre>
<pre>
$ dmesg | grep mmcblk
$ dmesg | grep mmcblk1
</pre>
* Output example:
<pre>
mmcblk1: mmc1:0001 MMC04G 3.52 GiB
mmcblk1boot0: mmc1:0001 MMC04G partition 1 16.0 MiB
mmcblk1boot1: mmc1:0001 MMC04G partition 2 16.0 MiB
mmcblk1rpmb: mmc1:0001 MMC04G partition 3 128 KiB
mmcblk1: unknown partition table
mmcblk1boot1: unknown partition table
mmcblk1boot0: unknown partition table
</pre>
</pre>
* Output example
mmcblk0: mmc1:0001 MBG4GC 29.1 GiB<br>
mmcblk0boot0: mmc1:0001 MBG4GC partition 1 4.00 MiB<br>
mmcblk0boot1: mmc1:0001 MBG4GC partition 2 4.00 MiB<br>
mmcblk0rpmb: mmc1:0001 MBG4GC partition 3 4.00 MiB<br>
mmcblk0: unknown partition table<br>
mmcblk0boot1: unknown partition table<br>
mmcblk0boot0: unknown partition table<br>
Select the eMMC device number. Number will change if SD card is in.
Select the eMMC device number. Number will change if SD card is in.
* Create partition
* Create partition
<pre> $fdisk /dev/mmcblk1
<pre>$ fdisk /dev/mmcblk1
enter n p 1 <enter> <enter> w
</pre>
</pre>
Example of a partition
 
root@varsomimx6:~# fdisk /dev/mmcblk1
Output example:
<pre>
Device contains neither a valid DOS partition table, nor Sun, SGI, OSF or GPT disklabel
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,
Building a new DOS disklabel. Changes will remain in memory only,
Line 27: Line 29:




The number of cylinders for this disk is set to 954240.
The number of cylinders for this disk is set to 115456.
There is nothing wrong with that, but this is larger than 1024,
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
and could in certain setups cause problems with:
Line 33: Line 35:
2) booting and partitioning software from other OSs
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)
   (e.g., DOS FDISK, OS/2 FDISK)
</pre>
Create msdos Boot partition:
<pre>
n
p
1
8192
24575
t
c
</pre>
Output example:
<pre>
Command (m for help): n
Command action
  e  extended
  p  primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-115456, default 1): 8192
Last cylinder or +size or +sizeM or +sizeK (8192-115456, default 115456): 24575


Command (m for help): t
Selected partition 1
Hex code (type L to list codes): c
Changed system type of partition 1 to c (Win95 FAT32 (LBA))
</pre>
Create ext3 partition:
<pre>
n
p
2
24576
</pre>
Output example:
<pre>
Command (m for help): n
Command (m for help): n
Command action
Command action
Line 39: Line 78:
   p  primary partition (1-4)
   p  primary partition (1-4)
p
p
Partition number (1-4): 1
Partition number (1-4): 2
First cylinder (1-954240, default 1): Using default value 1
First cylinder (1-115456, default 1): 24576
Last cylinder or +size or +sizeM or +sizeK (1-954240, default 954240): Using default value 954240
Last cylinder or +size or +sizeM or +sizeK (24576-115456, default 115456): Using default value 115456
</pre>


Print the partition table:
<pre>
p
</pre>
Output example:
<pre>
Command (m for help): p
Command (m for help): p


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


         Device Boot      Start        End      Blocks  Id System
         Device Boot      Start        End      Blocks  Id System
/dev/mmcblk1p1               1     954240    30535672 83 Linux
/dev/mmcblk1p1           8192      24575     524288  c Win95 FAT32 (LBA)
 
/dev/mmcblk1p2          24576      115456    2908192 83 Linux
</pre>
Write and exit:
<pre>
w
</pre>
Output example:
<pre>
Command (m for help): w
Command (m for help): w
The partition table has been altered.
The partition table has been altered.
Calling ioctl() to re-read partition table
Calling ioctl() to re-read partition table
  mmcblk1: p1
  mmcblk1: p1 p2
 
* Format and mount
<pre>
$ mkfs.ext3 /dev/mmcblk1p1
$ reboot
</pre>
</pre>

Latest revision as of 07:25, 28 December 2015

DART-6UL - eMMC
NOTE:
Make sure you booted from sdcard with imx6ul-var-dart-sd_emmc.dtb selected
NOTE:
nand-recovery supports flashing of eMMC without the requirement of the process below. Just run android-emmc.sh on the command line.
  • Check that the device is up.
$ dmesg | grep mmcblk1
  • Output example:
mmcblk1: mmc1:0001 MMC04G 3.52 GiB 
mmcblk1boot0: mmc1:0001 MMC04G partition 1 16.0 MiB
mmcblk1boot1: mmc1:0001 MMC04G partition 2 16.0 MiB
mmcblk1rpmb: mmc1:0001 MMC04G partition 3 128 KiB
 mmcblk1: unknown partition table
 mmcblk1boot1: unknown partition table
 mmcblk1boot0: unknown partition table

Select the eMMC device number. Number will change if SD card is in.

  • Create partition
$ fdisk /dev/mmcblk1

Output example:

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 115456.
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)

Create msdos Boot partition:

n
p
1
8192
24575
t
c

Output example:

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-115456, default 1): 8192
Last cylinder or +size or +sizeM or +sizeK (8192-115456, default 115456): 24575

Command (m for help): t
Selected partition 1
Hex code (type L to list codes): c
Changed system type of partition 1 to c (Win95 FAT32 (LBA))

Create ext3 partition:

n
p
2
24576

Output example:

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 2
First cylinder (1-115456, default 1): 24576
Last cylinder or +size or +sizeM or +sizeK (24576-115456, default 115456): Using default value 115456

Print the partition table:

p

Output example:

Command (m for help): p

Disk /dev/mmcblk1: 3783 MB, 3783262208 bytes
4 heads, 16 sectors/track, 115456 cylinders
Units = cylinders of 64 * 512 = 32768 bytes

        Device Boot      Start         End      Blocks  Id System
/dev/mmcblk1p1            8192       24575      524288   c Win95 FAT32 (LBA)
/dev/mmcblk1p2           24576      115456     2908192  83 Linux

Write and exit:

w

Output example:

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