Back to home page

OSCL-LXR

 
 

    


0001 ============================
0002 SD and MMC Device Partitions
0003 ============================
0004 
0005 Device partitions are additional logical block devices present on the
0006 SD/MMC device.
0007 
0008 As of this writing, MMC boot partitions as supported and exposed as
0009 /dev/mmcblkXboot0 and /dev/mmcblkXboot1, where X is the index of the
0010 parent /dev/mmcblkX.
0011 
0012 MMC Boot Partitions
0013 ===================
0014 
0015 Read and write access is provided to the two MMC boot partitions. Due to
0016 the sensitive nature of the boot partition contents, which often store
0017 a bootloader or bootloader configuration tables crucial to booting the
0018 platform, write access is disabled by default to reduce the chance of
0019 accidental bricking.
0020 
0021 To enable write access to /dev/mmcblkXbootY, disable the forced read-only
0022 access with::
0023 
0024         echo 0 > /sys/block/mmcblkXbootY/force_ro
0025 
0026 To re-enable read-only access::
0027 
0028         echo 1 > /sys/block/mmcblkXbootY/force_ro
0029 
0030 The boot partitions can also be locked read only until the next power on,
0031 with::
0032 
0033         echo 1 > /sys/block/mmcblkXbootY/ro_lock_until_next_power_on
0034 
0035 This is a feature of the card and not of the kernel. If the card does
0036 not support boot partition locking, the file will not exist. If the
0037 feature has been disabled on the card, the file will be read-only.
0038 
0039 The boot partitions can also be locked permanently, but this feature is
0040 not accessible through sysfs in order to avoid accidental or malicious
0041 bricking.