blob: f08d078d43cff58e7ab939dae1f1108f7c3a517b [file] [log] [blame]
Andrei Warkentin371a6892011-04-11 18:10:25 -05001SD and MMC Device Partitions
2============================
3
4Device partitions are additional logical block devices present on the
5SD/MMC device.
6
7As of this writing, MMC boot partitions as supported and exposed as
8/dev/mmcblkXboot0 and /dev/mmcblkXboot1, where X is the index of the
9parent /dev/mmcblkX.
10
11MMC Boot Partitions
12===================
13
14Read and write access is provided to the two MMC boot partitions. Due to
15the sensitive nature of the boot partition contents, which often store
16a bootloader or bootloader configuration tables crucial to booting the
17platform, write access is disabled by default to reduce the chance of
18accidental bricking.
19
20To enable write access to /dev/mmcblkXbootY, disable the forced read-only
21access with:
22
23echo 0 > /sys/block/mmcblkXbootY/force_ro
24
25To re-enable read-only access:
26
27echo 1 > /sys/block/mmcblkXbootY/force_ro
Johan Rudholmadd710e2011-12-02 08:51:06 +010028
29The boot partitions can also be locked read only until the next power on,
30with:
31
32echo 1 > /sys/block/mmcblkXbootY/ro_lock_until_next_power_on
33
34This is a feature of the card and not of the kernel. If the card does
35not support boot partition locking, the file will not exist. If the
36feature has been disabled on the card, the file will be read-only.
37
38The boot partitions can also be locked permanently, but this feature is
39not accessible through sysfs in order to avoid accidental or malicious
40bricking.