AK3: ensure dtbo does not get flashed twice in multi-partition setups
This commit is contained in:
1 file changed
+3
-1
+3
-1
@@ -418,12 +418,13 @@ flash_dtbo() {
|
|||||||
fi;
|
fi;
|
||||||
done;
|
done;
|
||||||
|
|
||||||
if [ "$dtbo" ]; then
|
if [ "$dtbo" -a ! -f dtbo_flashed ]; then
|
||||||
dtboblock=/dev/block/bootdevice/by-name/dtbo$slot;
|
dtboblock=/dev/block/bootdevice/by-name/dtbo$slot;
|
||||||
if [ ! -e "$dtboblock" ]; then
|
if [ ! -e "$dtboblock" ]; then
|
||||||
abort "dtbo partition could not be found. Aborting...";
|
abort "dtbo partition could not be found. Aborting...";
|
||||||
fi;
|
fi;
|
||||||
blockdev --setrw $dtboblock 2>/dev/null;
|
blockdev --setrw $dtboblock 2>/dev/null;
|
||||||
|
ui_print " " "$dtboblock";
|
||||||
if [ -f "$bin/flash_erase" -a -f "$bin/nandwrite" ]; then
|
if [ -f "$bin/flash_erase" -a -f "$bin/nandwrite" ]; then
|
||||||
$bin/flash_erase $dtboblock 0 0;
|
$bin/flash_erase $dtboblock 0 0;
|
||||||
$bin/nandwrite -p $dtboblock $dtbo;
|
$bin/nandwrite -p $dtboblock $dtbo;
|
||||||
@@ -436,6 +437,7 @@ flash_dtbo() {
|
|||||||
if [ $? != 0 ]; then
|
if [ $? != 0 ]; then
|
||||||
abort "Flashing dtbo failed. Aborting...";
|
abort "Flashing dtbo failed. Aborting...";
|
||||||
fi;
|
fi;
|
||||||
|
touch dtbo_flashed;
|
||||||
fi;
|
fi;
|
||||||
}
|
}
|
||||||
### write_boot (repack ramdisk then build, sign and write image and dtbo)
|
### write_boot (repack ramdisk then build, sign and write image and dtbo)
|
||||||
|
|||||||
Reference in new issue
Block a user