EasyManua.ls Logo

Phytec i.MX 93 - Page 55

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
(continued from previous page)
Dry-run only unless -y or -c is passed.
Use -c if more partitioning settings are still to come.
NOTE! This is a one-time programmable (unreversible) change.
The second Reliable Write option is the conguration bit Reliable Write Request parameter (bit 31) in
command CMD23. It has been used in the kernel since v3.0 by le systems, e.g. ext4 for the journal and
user space applications such as fdisk for the partition table. In the Linux kernel source code, it is handled
via the ag REQ_META.
Conclusion: ext4 le system with mount option data=journal should be safe against power cuts. The le
system check can recover the le system after a power failure, but data that was written just before the
power cut may be lost. In any case, a consistent state of the le system can be recovered. To ensure data
consistency for the les of an application, the system functions fdatasync or fsync should be used in the
application.
7.4.4 Resizing ext4 Root Filesystem
When ashing the sdcard image to eMMC the ext4 root partition is not extended to the end of the eMMC.
parted can be used to expand the root partition. The example works for any block device such as eMMC,
SD card, or hard disk.
Get the current device size:
target:~$ parted /dev/mmcblk0 print
The output looks like this:
Model: MMC Q2J55L (sd/mmc)
Disk /dev/mmcblk0: 7617MB
Sect[ 1799.850385] mmcblk0: p1 p2
or size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
1 4194kB 72.4MB 68.2MB primary fat16 boot, lba
2 72.4MB 537MB 465MB primary ext4
Use parted to resize the root partition to the max size of the device:
target:~$ parted /dev/mmcblk0 resizepart 2 100%
Information: You may need to update /etc/fstab.
target:~$ parted /dev/mmcblk0 print
Model: MMC Q2J55L (sd/mmc)
Disk /dev/mmcblk0: 7617MB
Sector size (logical/physical): 512[ 1974.191657] mmcblk0: p1 p2
B/512B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
1 4194kB 72.4MB 68.2MB primary fat16 boot, lba
2 72.4MB 7617MB 7545MB primary ext4
Accessing Peripherals 51