Difference between revisions of "EMMC OPOS6UL"

From ArmadeusWiki
Jump to: navigation, search
(User Data partition layout)
(Tips)
 
(19 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 +
[[Category: eMMC]]
 +
 
= OPOS6UL eMMC layout =
 
= OPOS6UL eMMC layout =
  
Line 39: Line 41:
 
|}
 
|}
  
* Linux device: ''/dev/mmcblk2boot0''
+
* Linux device: ''/dev/mmcblk0boot0''
 
{| border="1" cellpadding="5" cellspacing="0" summary="Boot0 partition detail"
 
{| border="1" cellpadding="5" cellspacing="0" summary="Boot0 partition detail"
 
|- style="background:#efefef;" align="center"
 
|- style="background:#efefef;" align="center"
Line 46: Line 48:
 
|0 || 0 || 1 KB (0x400) || Free
 
|0 || 0 || 1 KB (0x400) || Free
 
|----------------
 
|----------------
|0x02 || 1 KB (0x400) || 68 KB || U-Boot SPL (apf6-u-boot.spl)
+
|0x02 || 1 KB (0x400) || 68 KB || U-Boot SPL (opos6ul-u-boot.spl)
 
|----------------
 
|----------------
|0x8a || 69 KB (0x11400) || 512 KB || U-Boot IMG (apf6-u-boot.img)
+
|0x8a || 69 KB (0x11400) || 512 KB || U-Boot IMG (opos6ul-u-boot.img)
 
|----------------
 
|----------------
 
||| || || Free
 
||| || || Free
Line 61: Line 63:
 
|----------------
 
|----------------
 
|}
 
|}
 +
 +
== Boot1 partition layout ==
 +
* Not used !
 +
 +
== RPMB partition layout ==
 +
* Not used !
  
 
== User Data partition layout ==
 
== User Data partition layout ==
Line 68: Line 76:
 
|----------------
 
|----------------
 
| style="width:50px;background:white;color:black;" align="center" | ...
 
| style="width:50px;background:white;color:black;" align="center" | ...
| style="width:100px;background:green;color:white;" align="center" | Failsafe (primary)
+
| style="width:100px;background:green;color:white;" align="center" | Failsafe/Update (primary)
| style="width:600px;background:green;color:white;" align="center" | Rootfs (logical)
+
| style="width:600px;background:green;color:white;" align="center" | Default Rootfs (primary)
| style="width:600px;background:green;color:white;" align="center" | Home/Data (logical)
+
| style="width:600px;background:green;color:white;" align="center" | Home/Data (primary)
 
|}
 
|}
  
Line 76: Line 84:
 
{| border="1" cellpadding="5" cellspacing="0" summary="OPOS6UL eMMC User data partitions details"
 
{| border="1" cellpadding="5" cellspacing="0" summary="OPOS6UL eMMC User data partitions details"
 
|- style="background:#efefef;" align="center"
 
|- style="background:#efefef;" align="center"
!Name || U-Boot device  || Linux device || Offset (bytes) || Offset (blocks) || Size || Comment
+
!Name || U-Boot device  || Linux device || Offset (bytes) || Offset (sectors/blocs) || Size || Comment
 
|----------------
 
|----------------
|MBR || NA || NA || 0 || 0 || 512 bytes (1 block) || Master Boot Record. (Don't touch it :-) )
+
|MBR || NA || NA || 0 || 0 || 512 bytes (1 block) || Master Boot Record + some spare space ( -> Don't touch it :-) )
 
|----------------
 
|----------------
|Failsafe || mmc 0:1 || /dev/mmcblk0p1 || 2k (0x800)|| 4 || 64MBytes || system to restore your board in case of problem
+
|Failsafe || mmc 0:1 || /dev/mmcblk0p1 || 1M || 2048 (0x800) || 128MBytes (262144 sectors) || system/rootfs to restore your board in case of problem or setup a safe update mechanism (ext4 formatted)
 
|----------------
 
|----------------
|Rootfs || mmc 0:5 || /dev/mmcblk0p5 ||  || 135168 (0x21000) || 2GBytes || the rootfs is on this partition (ext4 formatted)
+
|Rootfs || mmc 0:2 || /dev/mmcblk0p2 ||  || 264192 (0x40800) || 2GBytes (4194304 sectors) || the default booted rootfs is on this partition (ext4 formatted)
 
|----------------
 
|----------------
|Home/Data || mmc 0:6 || /dev/mmcblk0p6 ||  || 4331520 (0x421800) || Rest of space (~1,6GBytes) || HOME is on this partition (ext4 formatted)
+
|Home/Data || mmc 0:3 || /dev/mmcblk0p3 ||  || 4458496 (0x440800) || Rest of space: ~1,5GBytes (3176448 sectors) || HOME can be stored on this partition (ext4 formatted)
 
|----------------
 
|----------------
 
|}
 
|}
Line 90: Line 98:
 
* By default, when flashed from U-Boot, rootfs and boot are only occupying the size of the .ext4 images used during flashing. If you want to increase the rootfs/boot size to all available free space then, after Linux has booted, use the following commands:
 
* By default, when flashed from U-Boot, rootfs and boot are only occupying the size of the .ext4 images used during flashing. If you want to increase the rootfs/boot size to all available free space then, after Linux has booted, use the following commands:
 
<pre class="apf">
 
<pre class="apf">
# resize2fs /dev/mmcblk0p5       # for Rootfs
+
# resize2fs /dev/mmcblk0p2       # for Rootfs
 
</pre>
 
</pre>
  
* Or with apf-config command
+
* Or with ''apf-config'' command:
 
<pre class="apf">
 
<pre class="apf">
 
# apf-config
 
# apf-config
 
</pre>
 
</pre>
* in menu:
+
* In menu:
 
<pre class="config">
 
<pre class="config">
 
|    1 Expand Filesystem(s)        OS can then use all eMMC/SD space        |
 
|    1 Expand Filesystem(s)        OS can then use all eMMC/SD space        |
 
</pre>
 
</pre>
 
  
 
Rootfs/Boot will then be extended to all the "Rootfs"/"Boot" eMMC partitions space.
 
Rootfs/Boot will then be extended to all the "Rootfs"/"Boot" eMMC partitions space.
 +
 +
==Tips==
 +
* Commands to partition ''User Data'' from fdisk on Host PC with [[U-Boot UMS on APF & OPOS|U-Boot UMS]]. '''Check /dev/sdc is your OPOS6UL device otherwise you may destroy your PC partition table !!!''':
 +
<pre class=host>
 +
$ sudo fdisk /dev/sdc
 +
n
 +
p
 +
1
 +
2048
 +
+128M
 +
n
 +
p
 +
2
 +
264192
 +
+2G
 +
n
 +
p
 +
3
 +
4458496
 +
7634943
 +
w
 +
 +
$ sudo mkfs.ext4 -O ^64bit,^metadata_csum,uninit_bg /dev/sdc1
 +
$ sudo mkfs.ext4 -O ^64bit,^metadata_csum,uninit_bg /dev/sdc2
 +
$ sudo mkfs.ext4 -O ^64bit,^metadata_csum,uninit_bg /dev/sdc3
 +
 +
</pre>
  
 
==Links==
 
==Links==
 
* [http://fr.slideshare.net/linaroorg/intro-to-emmc http://fr.slideshare.net/linaroorg/intro-to-emmc]
 
* [http://fr.slideshare.net/linaroorg/intro-to-emmc http://fr.slideshare.net/linaroorg/intro-to-emmc]
 
* https://fr.wikipedia.org/wiki/Master_boot_record ou http://poloastucien.free.fr/mbr_fat_secteurs_boot_h.html
 
* https://fr.wikipedia.org/wiki/Master_boot_record ou http://poloastucien.free.fr/mbr_fat_secteurs_boot_h.html

Latest revision as of 09:04, 25 March 2019


OPOS6UL eMMC layout

By default, the 4GB eMMC on OPOS6UL module has 4 physical/hardware partitions:

Boot0 Boot1 RPMB User Data


Name U-Boot name Size Comment
boot0 mmc dev 0 1 4MBytes U-Boot is installed on this partition
boot1 mmc dev 0 2 4MBytes Not used
rpmb mmc dev 0 3 512KBytes Not used
User Data mmc dev 0 0 remaining space (~3,7GBytes) Kernel, device tree and rootfs

Boot0 partition layout

. SPL IMG ... ENV1 ... ENV2 ...
  • Linux device: /dev/mmcblk0boot0
Offset (blocks) Offset (bytes) Size (bytes) Comment
0 0 1 KB (0x400) Free
0x02 1 KB (0x400) 68 KB U-Boot SPL (opos6ul-u-boot.spl)
0x8a 69 KB (0x11400) 512 KB U-Boot IMG (opos6ul-u-boot.img)
Free
0x800 (2048) 1024 KB (0x100000) 10 KB (0x2800) U-Boot environment
Free
0xc00 (3072) 1536 KB (0x180000) 10 KB (0x2800) Redundant U-Boot environment
Free

Boot1 partition layout

  • Not used !

RPMB partition layout

  • Not used !

User Data partition layout

There are 3 partitions on the "User Data" physical partition:

... Failsafe/Update (primary) Default Rootfs (primary) Home/Data (primary)


Name U-Boot device Linux device Offset (bytes) Offset (sectors/blocs) Size Comment
MBR NA NA 0 0 512 bytes (1 block) Master Boot Record + some spare space ( -> Don't touch it :-) )
Failsafe mmc 0:1 /dev/mmcblk0p1 1M 2048 (0x800) 128MBytes (262144 sectors) system/rootfs to restore your board in case of problem or setup a safe update mechanism (ext4 formatted)
Rootfs mmc 0:2 /dev/mmcblk0p2 264192 (0x40800) 2GBytes (4194304 sectors) the default booted rootfs is on this partition (ext4 formatted)
Home/Data mmc 0:3 /dev/mmcblk0p3 4458496 (0x440800) Rest of space: ~1,5GBytes (3176448 sectors) HOME can be stored on this partition (ext4 formatted)
  • By default, when flashed from U-Boot, rootfs and boot are only occupying the size of the .ext4 images used during flashing. If you want to increase the rootfs/boot size to all available free space then, after Linux has booted, use the following commands:
# resize2fs /dev/mmcblk0p2        # for Rootfs
  • Or with apf-config command:
# apf-config
  • In menu:
|     1 Expand Filesystem(s)         OS can then use all eMMC/SD space         |

Rootfs/Boot will then be extended to all the "Rootfs"/"Boot" eMMC partitions space.

Tips

  • Commands to partition User Data from fdisk on Host PC with U-Boot UMS. Check /dev/sdc is your OPOS6UL device otherwise you may destroy your PC partition table !!!:
$ sudo fdisk /dev/sdc
n
p
1
2048
+128M
n
p
2
264192
+2G
n
p
3
4458496
7634943
w

$ sudo mkfs.ext4 -O ^64bit,^metadata_csum,uninit_bg /dev/sdc1
$ sudo mkfs.ext4 -O ^64bit,^metadata_csum,uninit_bg /dev/sdc2
$ sudo mkfs.ext4 -O ^64bit,^metadata_csum,uninit_bg /dev/sdc3

Links