.TH MMC 1 "2015-11-16" "0.1" "mmc-utils" .SH NAME mmc-utils \- Configure MMC storage devices from userspace. .SH SYNOPSIS mmc [ []] [--help] .PP mmc [] --help .SH DESCRIPTION mmc-utils is a tool for configuring MMC storage devices from userspace. .SH COMMANDS AND OPTIONS .TP .BR "help | \-\-help | -h | " "(no arguments)" Shows the abbreviated help menu in the terminal. .TP .BR "extcsd read " Print extcsd data from . .TP .BR "writeprotect get " Determine the eMMC writeprotect status of . .TP .BR "writeprotect set " Set the eMMC writeprotect status of . This sets the eMMC to be write-protected until next boot. .TP .BR "disable 512B emulation " Set the eMMC data sector size to 4KB by disabling emulation on . .TP .BR "gp create <-y|-n> " create general purpose partition for the . Dry-run only unless -y is passed. To set enhanced attribute to general partition being created set to 1 else set it to 0. To set extended attribute to general partition set to 1,2 else set it to 0. NOTE! This is a one-time programmable (unreversible) change. .TP .BR "enh_area set <-y|-n> " Enable the enhanced user area for the . Dry-run only unless -y is passed. NOTE! This is a one-time programmable (unreversible) change. .TP .BR "write_reliability set <-y|-n> " Enable write reliability per partition for the . Dry-run only unless -y is passed. NOTE! This is a one-time programmable (unreversible) change. .TP .BR "status get " Print the response to STATUS_SEND (CMD13). .TP .BR "bootpart enable " Enable the boot partition for the . Disable the boot partition for the with set to 0. To receive acknowledgment of boot from the card set to 1, else set it to 0. .TP .BR "bootbus set " Set Boot Bus Conditions. must be "single_backward|single_hs|dual" must be "x1|retain" must be "x1|x4|x8" .TP .BR "bkops enable " Enable the eMMC BKOPS feature on . NOTE! This is a one-time programmable (unreversible) change. .TP .BR "hwreset enable " Permanently enable the eMMC H/W Reset feature on . NOTE! This is a one-time programmable (unreversible) change. .TP .BR "hwreset disable " Permanently disable the eMMC H/W Reset feature on . NOTE! This is a one-time programmable (unreversible) change. .TP .BR "sanitize " Send Sanitize command to the . This will delete the unmapped memory region of the device. .TP .BR "rpmb write-key " Program authentication key which is 32 bytes length and stored in the specified file. Also you can specify '-' instead of key file path to read the key from stdin. NOTE! This is a one-time programmable (unreversible) change. .TP .BR "rpmb read-counter " Counter value for the will be read to stdout. .TP .BR "rpmb read-block
[key file]" Blocks of 256 bytes will be read from to output file or stdout if '-' is specified. If key is specified - read data will be verified. Instead of regular path you can specify '-' to read key from stdin. .TP .BR "rpmb write-block
<256 byte data file> " Block of 256 bytes will be written from data file to . Also you can specify '-' instead of key file path or data file to read the data from stdin. .TP .BR "cache enable " Enable the eMMC cache feature on . NOTE! The cache is an optional feature on devices >= eMMC4.5. .TP .BR "cache disable " Disable the eMMC cache feature on . NOTE! The cache is an optional feature on devices >= eMMC4.5. .TP .BR " --help" Show detailed help for a command or subset of commands. .SH EXAMPLES .TP Program authentication key from stdin: echo -n AAAABBBBCCCCDDDDEEEEFFFFGGGGHHHH | mmc rpmb write-key /dev/mmcblk0rpmb - .TP Write a block of 256 bytes of data to an rpmb device: $ (awk 'BEGIN {while (c++<256) printf "a"}' | echo -n AAAABBBBCCCCDDDDEEEEFFFFGGGGHHHH) | mmc rpmb write-block /dev/mmcblk0rpmb 0x02 - - .TP Read a block of 256 bytes of data from an rpmb device to stdout: $ echo -n AAAABBBBCCCCDDDDEEEEFFFFGGGGHHHH | mmc rpmb read-block /dev/mmcblk0rpmb 0x02 2 /tmp/block - .TP Read 2 blocks of 256 bytes from rpmb device to /tmp/block without verification: $ mmc rpmb read-block /dev/mmcblk0rpmb 0x02 2 /tmp/block