mmc.1 4.6 KB

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