AK3: unlock blocks before flash to handle post-incremental-OTA cases
This commit is contained in:
1 file changed
+2
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user