mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
mmc: boot partition ro lock support
Enable boot partitions to be read-only locked until next power on via a sysfs entry. There will be one sysfs entry for each boot partition: /sys/block/mmcblkXbootY/ro_lock_until_next_power_on Each boot partition is locked by writing 1 to its file. Signed-off-by: Johan Rudholm <[email protected]> Signed-off-by: John Beckett <[email protected]> Signed-off-by: Chris Ball <[email protected]>
This commit is contained in:
parent
92df954df3
commit
add710eaa8
5 changed files with 153 additions and 11 deletions
|
|
@ -25,3 +25,16 @@ echo 0 > /sys/block/mmcblkXbootY/force_ro
|
|||
To re-enable read-only access:
|
||||
|
||||
echo 1 > /sys/block/mmcblkXbootY/force_ro
|
||||
|
||||
The boot partitions can also be locked read only until the next power on,
|
||||
with:
|
||||
|
||||
echo 1 > /sys/block/mmcblkXbootY/ro_lock_until_next_power_on
|
||||
|
||||
This is a feature of the card and not of the kernel. If the card does
|
||||
not support boot partition locking, the file will not exist. If the
|
||||
feature has been disabled on the card, the file will be read-only.
|
||||
|
||||
The boot partitions can also be locked permanently, but this feature is
|
||||
not accessible through sysfs in order to avoid accidental or malicious
|
||||
bricking.
|
||||
|
|
|
|||
Loading…
Reference in a new issue