diff --git a/tools/ak3-core.sh b/tools/ak3-core.sh index 79f3a32..96d34ca 100755 --- a/tools/ak3-core.sh +++ b/tools/ak3-core.sh @@ -391,6 +391,7 @@ flash_boot() { elif [ "$(wc -c < boot-new.img)" -gt "$(wc -c < boot.img)" ]; then abort "New image larger than boot partition. Aborting..."; fi; + blockdev --setrw $block 2>/dev/null; if [ -f "$bin/flash_erase" -a -f "$bin/nandwrite" ]; then $bin/flash_erase $block 0 0; $bin/nandwrite -p $block boot-new.img; @@ -422,6 +423,7 @@ flash_dtbo() { if [ ! -e "$dtboblock" ]; then abort "dtbo partition could not be found. Aborting..."; fi; + blockdev --setrw $dtboblock 2>/dev/null; if [ -f "$bin/flash_erase" -a -f "$bin/nandwrite" ]; then $bin/flash_erase $dtboblock 0 0; $bin/nandwrite -p $dtboblock $dtbo;