EasyManua.ls Logo

Phytec i.MX 93 - Page 58

Default Icon
85 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
i.MX 93 BSP Manual PD24.1.1 Documentation Rev.: imx8mp-pd22.1.2-51-ga548be7d
also destroys all information on the device, but this command is bad for wear leveling and takes much
longer!
7.4.7 eMMC Boot Partitions
An eMMC device contains four dierent 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 93 uses to load the bootloader is controlled by the boot conguration 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-dened 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.
Tip
Do not confuse eMMC partitions with partitions of a DOS, MBR, or GPT partition table.
The current PHYTEC BSP does not use the extra partitioning feature of eMMC devices. The U-Boot is
ashed at the beginning of the user partition. The U-Boot environment is placed at a xed 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 ash 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 rst partition. The user area
also still contains the bootloader which the image rst shipped during its initialization process. Below is an
example, to ash the bootloader to one of the two boot partitions and switch the boot device via userspace
commands.
7.4.8 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, rst disable the write protection:
target:~$ echo 0 > /sys/block/mmcblk0boot0/force_ro
target:~$ echo 0 > /sys/block/mmcblk0boot1/force_ro
Write the bootloader to the eMMC boot partitions:
target:~$ dd if=/tmp/imx-boot of=/dev/mmcblk0boot0
target:~$ dd if=/tmp/imx-boot of=/dev/mmcblk0boot1
The following table is for the oset of the i.MX 93 SoC:
Accessing Peripherals 54