blob: 971feae8d7f15a98c47dd8604d5f4a9c70446452 [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>.
Markus Schuetterlefbc0e6c2016-03-19 08:42:41 +010055Disable the boot partition for the <device> with <boot_partition> set to 0.
Marcus Folkessonf319eb72015-11-18 11:39:49 +010056To receive acknowledgment of boot from the card set <send_ack>
57to 1, else set it to 0.
58.TP
59.BR "bootbus set <boot_mode> <reset_boot_bus_conditions> <boot_bus_width> <device>"
60Set Boot Bus Conditions.
61<boot_mode> must be "single_backward|single_hs|dual"
62<reset_boot_bus_conditions> must be "x1|retain"
63<boot_bus_width> must be "x1|x4|x8"
64.TP
65.BR "bkops enable <device>"
66Enable the eMMC BKOPS feature on <device>.
67NOTE! This is a one-time programmable (unreversible) change.
68.TP
69.BR "hwreset enable <device>"
70Permanently enable the eMMC H/W Reset feature on <device>.
71NOTE! This is a one-time programmable (unreversible) change.
72.TP
73.BR "hwreset disable <device>"
74Permanently disable the eMMC H/W Reset feature on <device>.
75NOTE! This is a one-time programmable (unreversible) change.
76.TP
77.BR "sanitize <device>"
78Send Sanitize command to the <device>.
79This will delete the unmapped memory region of the device.
80.TP
81.BR "rpmb write-key <rpmb device> <key file>"
82Program authentication key which is 32 bytes length and stored
83in the specified file. Also you can specify '-' instead of
84key file path to read the key from stdin.
85NOTE! This is a one-time programmable (unreversible) change.
86.TP
87.BR "rpmb read-counter <rpmb device>"
88Counter value for the <rpmb device> will be read to stdout.
89.TP
90.BR "rpmb read-block <rpmb device> <address> <blocks count> <output file> [key file]"
91Blocks of 256 bytes will be read from <rpmb device> to output
92file or stdout if '-' is specified. If key is specified - read
93data will be verified. Instead of regular path you can specify
94'-' to read key from stdin.
95.TP
96.BR "rpmb write-block <rpmb device> <address> <256 byte data file> <key file>"
97Block of 256 bytes will be written from data file to
98<rpmb device>. Also you can specify '-' instead of key
99file path or data file to read the data from stdin.
100.TP
101.BR "cache enable <device>"
102Enable the eMMC cache feature on <device>.
103NOTE! The cache is an optional feature on devices >= eMMC4.5.
104.TP
105.BR "cache disable <device>"
106Disable the eMMC cache feature on <device>.
107NOTE! The cache is an optional feature on devices >= eMMC4.5.
108.TP
109.BR "<cmd> --help"
110Show detailed help for a command or subset of commands.
111
112.SH
113EXAMPLES
114.TP
115Program authentication key from stdin:
116echo -n AAAABBBBCCCCDDDDEEEEFFFFGGGGHHHH | mmc rpmb write-key /dev/mmcblk0rpmb -
117.TP
118Write a block of 256 bytes of data to an rpmb device:
119$ (awk 'BEGIN {while (c++<256) printf "a"}' | echo -n AAAABBBBCCCCDDDDEEEEFFFFGGGGHHHH) | mmc rpmb write-block /dev/mmcblk0rpmb 0x02 - -
120.TP
121Read a block of 256 bytes of data from an rpmb device to stdout:
122 $ echo -n AAAABBBBCCCCDDDDEEEEFFFFGGGGHHHH | mmc rpmb read-block /dev/mmcblk0rpmb 0x02 2 /tmp/block -
123.TP
124Read 2 blocks of 256 bytes from rpmb device to /tmp/block without verification:
125$ mmc rpmb read-block /dev/mmcblk0rpmb 0x02 2 /tmp/block