PHYTEC
Page 27
1.
2.
The output will look like this:
Device: FSL_SDHC
Manufacturer ID: 13
OEM: 14e
Name: S0J56
Bus Speed: 52000000
Mode: MMC High Speed (52MHz)
Rd Block Len: 512
MMC version 5.1
High Capacity: Yes
Capacity: 14.8 GiB
Bus Width: 8-bit
Erase Group Size: 512 KiB
HC WP Group Size: 8 MiB
User Capacity: 14.8 GiB WRREL
Boot Capacity: 31.5 MiB ENH
RPMB Capacity: 4 MiB ENH
Reliable Write
There are two different
options:
Reliable Write
option for a whole eMMC device/partition.
Reliable Write
for single write transactions.
Reliable Write
The first
option can be enabled with the
tool:
Reliable Write
mmc
target$ mmc --help
[...]
mmc write_reliability set <-y|-n> <partition> <device>
The second
option is the configuration bit
in command
. It has been used in the kernel
Reliable Write
Reliable Write Request parameter (bit 31)
CMD23
since
by file systems, e.g.
for the journal and user space applications such as
for the partition table. In the
kernel source code, it is
v3.0
ext4
fdisk
Linux
handled via flag
.
REQ_META
file system with mount option
should be safe against power cuts. The file system check can recover the file system after a
Conclusion: ext4
data=journal
power failure, but data that was written just before the power cut may be lost. In any case, a consistent state of the file system can be recovered. To
ensure data consistency for the files of an application, the system functions
or
should be used in the application.
fdatasync
fsync
Resizing ext4 Root Filesystem
can be used to expand the root filesystem. The example works for any block device such as eMMC, SD card, or hard disk.
fdisk
Get the current device size:
target$ fdisk -l /dev/mmcblk2
The output looks like:
Disk /dev/mmcblk2: 15 GB, 15913189376 bytes, 31080448 sectors
485632 cylinders, 4 heads, 16 sectors/track
Units: sectors of 1 * 512 = 512 bytes
Device Boot StartCHS EndCHS StartLBA EndLBA Sectors Size Id Type
/dev/mmcblk2p1 * 64,0,1 762,2,28 8192 97627 89436 43.6M c Win)
/dev/mmcblk2p2 768,0,1 1023,3,32 98304 950271 851968 416M 83 Linx
Use
to delete and create a partition with a max size of the device:
fdisk
Tip
Do not confuse eMMC partitions with partitions of a DOS, MBR, or GPT partition table (see previous section).