summaryrefslogtreecommitdiff
path: root/recipes-bsp/u-boot/files/fw_unlock_mmc.sh
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-bsp/u-boot/files/fw_unlock_mmc.sh')
-rw-r--r--recipes-bsp/u-boot/files/fw_unlock_mmc.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/recipes-bsp/u-boot/files/fw_unlock_mmc.sh b/recipes-bsp/u-boot/files/fw_unlock_mmc.sh
new file mode 100644
index 0000000..8982640
--- /dev/null
+++ b/recipes-bsp/u-boot/files/fw_unlock_mmc.sh
@@ -0,0 +1,6 @@
+# Give fw_setenv mmcblk0boot1 write permissions
+function fw_setenv() {
+ echo 0 > /sys/block/mmcblk0boot1/force_ro
+ /sbin/fw_setenv "$@"
+ echo 1 > /sys/block/mmcblk0boot1/force_ro
+}