![Phytec L-1017e.A3 i.MX 8M Plus Manual Download Page 50](http://html1.mh-extra.com/html/phytec/l-1017e-a3-i-mx-8m-plus/l-1017e-a3-i-mx-8m-plus_manual_1554092050.webp)
L-1017e.A3 i.MX 8M Plus BSP Manual
eMMC Boot Partitions
An eMMC device contains four different hardware partitions:
user
,
boot1
,
boot2,
and
rpmb
.
The
user
partition is called the
User Data Area
in the JEDEC standard and is the main storage partition. The
partitions
boot1
and
boot2
can be used to host the bootloader and are more reliable. Which partition the i.MX 8M
Plus uses to load the bootloader is controlled by the boot configuration of the eMMC device. The partition
rpmb
is a
small partition and can only be accessed via
a trusted mechanism
.
Furthermore, the
user
partition can be divided into four user-defined
General Purpose Area Partitions
. An
explanation of this feature exceeds the scope of this document. For further information, see the
JEDEC Standard
Chapter
7.2 Partition Management
.
The current PHYTEC BSP does not use the extra partitioning feature of eMMC devices. The
u-boot
is flashed at the
beginning of the
user
partition. The
u-boot
environment is placed at a fixed location after the
u-boot
. An MBR
partition table is used to create two partitions, a FAT32 boot, and
ext4
rootfs
partition. They are located right after
the
u-boot
and the
u-boot
environment. The FAT32 boot partition contains the kernel and device tree.
With eMMC flash storage it is possible to use the dedicated boot partitions for redundantly storing the bootloader.
The U-Boot environment still resides in the user area before the first partition. The user area also still contains the
bootloader which the image first shipped during its initialization process. Below is an example, to flash the
bootloader to one of the two boot partitions and switch the boot device via userspace commands.
Via
userspace
Commands
On the host, run:
host$ scp imx-boot root
@192
.168.
3.11
:/tmp/
The partitions
boot1
and
boot2
are read-only by default. To write to them from user space, you have to disable
force_ro
in the
sysfs.
To manually write the bootloader to the eMMC boot partitions, first disable the write protection:
target$ echo
0
> /sys/block/mmcblk2boot0/force_ro
target$ echo
0
> /sys/block/mmcblk2boot1/force_ro
Write the bootloader to the eMMC boot partitions:
target$ dd
if
=/tmp/imx-boot of=/dev/mmcblk2boot0
target$ dd
if
=/tmp/imx-boot of=/dev/mmcblk2boot1
The following table is for the offset of the i.MX 8M Plus SoC:
Tip
Do not confuse eMMC partitions with partitions of a DOS, MBR, or GPT partition table.