blob: 7584dde0ce7c4f1876e31ec9f0cdc5efc92a8606 [file] [log] [blame]
Marcus Folkessonf319eb72015-11-18 11:39:49 +01001.TH man 1 "16 November 2015" "0.1" "mmc-utils man page"
2.SH
3NAME
4mmc-utils \- Configure MMC storage devices from userspace.
5.SH
6SYNOPSIS
7mmc [<command> [<args>]] [--help]
8.PP
9mmc [<command>] --help
10.SH
11DESCRIPTION
12mmc-utils is a tool for configuring MMC storage devices from userspace.
13.SH
14COMMANDS AND OPTIONS
15.TP
16.BR "help | \-\-help | -h | " "(no arguments)"
17Shows the abbreviated help menu in the terminal.
18.TP
19.BR "extcsd read <device>"
20Print extcsd data from <device>.
21.TP
22.BR "writeprotect get <device>"
23Determine the eMMC writeprotect status of <device>.
24.TP
25.BR "writeprotect set <device>"
26Set the eMMC writeprotect status of <device>.
27This sets the eMMC to be write-protected until next boot.
28.TP
29.BR "disable 512B emulation <device>"
30Set the eMMC data sector size to 4KB by disabling emulation on
31<device>.
32.TP
33.BR "gp create <-y|-n> <length KiB> <partition> <enh_attr> <ext_attr> <device>"
34create general purpose partition for the <device>.
35Dry-run only unless -y is passed.
36To set enhanced attribute to general partition being created set <enh_attr> to 1 else set it to 0.
37To set extended attribute to general partition set <ext_attr> to 1,2 else set it to 0.
38NOTE! This is a one-time programmable (unreversible) change.
39.TP
40.BR "enh_area set <-y|-n> <start KiB> <length KiB> <device>"
41Enable the enhanced user area for the <device>.
42Dry-run only unless -y is passed.
43NOTE! This is a one-time programmable (unreversible) change.
44.TP
45.BR "write_reliability set <-y|-n> <partition> <device>"
46Enable write reliability per partition for the <device>.
47Dry-run only unless -y is passed.
48NOTE! This is a one-time programmable (unreversible) change.
49.TP
50.BR "status get <device>"
51Print the response to STATUS_SEND (CMD13).
52.TP
53.BR "bootpart enable <boot_partition> <send_ack> <device>"
54Enable the boot partition for the <device>.
55To receive acknowledgment of boot from the card set <send_ack>
56to 1, else set it to 0.
57.TP
58.BR "bootbus set <boot_mode> <reset_boot_bus_conditions> <boot_bus_width> <device>"
59Set Boot Bus Conditions.
60<boot_mode> must be "single_backward|single_hs|dual"
61<reset_boot_bus_conditions> must be "x1|retain"
62<boot_bus_width> must be "x1|x4|x8"
63.TP
64.BR "bkops enable <device>"
65Enable the eMMC BKOPS feature on <device>.
66NOTE! This is a one-time programmable (unreversible) change.
67.TP
68.BR "hwreset enable <device>"
69Permanently enable the eMMC H/W Reset feature on <device>.
70NOTE! This is a one-time programmable (unreversible) change.
71.TP
72.BR "hwreset disable <device>"
73Permanently disable the eMMC H/W Reset feature on <device>.
74NOTE! This is a one-time programmable (unreversible) change.
75.TP
76.BR "sanitize <device>"
77Send Sanitize command to the <device>.
78This will delete the unmapped memory region of the device.
79.TP
80.BR "rpmb write-key <rpmb device> <key file>"
81Program authentication key which is 32 bytes length and stored
82in the specified file. Also you can specify '-' instead of
83key file path to read the key from stdin.
84NOTE! This is a one-time programmable (unreversible) change.
85.TP
86.BR "rpmb read-counter <rpmb device>"
87Counter value for the <rpmb device> will be read to stdout.
88.TP
89.BR "rpmb read-block <rpmb device> <address> <blocks count> <output file> [key file]"
90Blocks of 256 bytes will be read from <rpmb device> to output
91file or stdout if '-' is specified. If key is specified - read
92data will be verified. Instead of regular path you can specify
93'-' to read key from stdin.
94.TP
95.BR "rpmb write-block <rpmb device> <address> <256 byte data file> <key file>"
96Block of 256 bytes will be written from data file to
97<rpmb device>. Also you can specify '-' instead of key
98file path or data file to read the data from stdin.
99.TP
100.BR "cache enable <device>"
101Enable the eMMC cache feature on <device>.
102NOTE! The cache is an optional feature on devices >= eMMC4.5.
103.TP
104.BR "cache disable <device>"
105Disable the eMMC cache feature on <device>.
106NOTE! The cache is an optional feature on devices >= eMMC4.5.
107.TP
108.BR "<cmd> --help"
109Show detailed help for a command or subset of commands.
110
111.SH
112EXAMPLES
113.TP
114Program authentication key from stdin:
115echo -n AAAABBBBCCCCDDDDEEEEFFFFGGGGHHHH | mmc rpmb write-key /dev/mmcblk0rpmb -
116.TP
117Write a block of 256 bytes of data to an rpmb device:
118$ (awk 'BEGIN {while (c++<256) printf "a"}' | echo -n AAAABBBBCCCCDDDDEEEEFFFFGGGGHHHH) | mmc rpmb write-block /dev/mmcblk0rpmb 0x02 - -
119.TP
120Read a block of 256 bytes of data from an rpmb device to stdout:
121 $ echo -n AAAABBBBCCCCDDDDEEEEFFFFGGGGHHHH | mmc rpmb read-block /dev/mmcblk0rpmb 0x02 2 /tmp/block -
122.TP
123Read 2 blocks of 256 bytes from rpmb device to /tmp/block without verification:
124$ mmc rpmb read-block /dev/mmcblk0rpmb 0x02 2 /tmp/block