summaryrefslogtreecommitdiffstats
path: root/generate-factory-images-common.sh
diff options
context:
space:
mode:
authorJean-Baptiste Queru <jbq@google.com>2012-10-01 17:34:18 -0700
committerJean-Baptiste Queru <jbq@google.com>2012-10-01 17:34:18 -0700
commit2466e5eaa596c7704a78af71a73e86bacca1032e (patch)
treebc876c27ae8a8d62aebcd1a1ab0118c2c94de84a /generate-factory-images-common.sh
parent8422277e4c07a3fa77947805a977af321779512b (diff)
downloadandroid_device_common-2466e5eaa596c7704a78af71a73e86bacca1032e.tar.gz
android_device_common-2466e5eaa596c7704a78af71a73e86bacca1032e.tar.bz2
android_device_common-2466e5eaa596c7704a78af71a73e86bacca1032e.zip
Handle devices with two bootloader copies
Change-Id: I47c63182d3e5be489a422ca6aad7b34add1e1586
Diffstat (limited to 'generate-factory-images-common.sh')
-rw-r--r--generate-factory-images-common.sh24
1 files changed, 24 insertions, 0 deletions
diff --git a/generate-factory-images-common.sh b/generate-factory-images-common.sh
index 32c4a00..a6122d9 100644
--- a/generate-factory-images-common.sh
+++ b/generate-factory-images-common.sh
@@ -107,6 +107,14 @@ EOF
fi
cat >> tmp/$PRODUCT-$VERSION/flash-all.sh << EOF
fastboot flash bootloader bootloader-$DEVICE-$BOOTLOADER.img
+EOF
+if test "$TWINBOOTLOADERS" = "true"
+then
+cat >> tmp/$PRODUCT-$VERSION/flash-all.sh << EOF
+fastboot flash bootloader2 bootloader-$DEVICE-$BOOTLOADER.img
+EOF
+fi
+cat >> tmp/$PRODUCT-$VERSION/flash-all.sh << EOF
fastboot reboot-bootloader
sleep $SLEEPDURATION
EOF
@@ -168,6 +176,14 @@ EOF
fi
cat >> tmp/$PRODUCT-$VERSION/flash-all.bat << EOF
fastboot flash bootloader bootloader-$DEVICE-$BOOTLOADER.img
+EOF
+if test "$TWINBOOTLOADERS" = "true"
+then
+cat >> tmp/$PRODUCT-$VERSION/flash-all.bat << EOF
+fastboot flash bootloader2 bootloader-$DEVICE-$BOOTLOADER.img
+EOF
+fi
+cat >> tmp/$PRODUCT-$VERSION/flash-all.bat << EOF
fastboot reboot-bootloader
ping -n $SLEEPDURATION 127.0.0.1 >nul
EOF
@@ -222,6 +238,14 @@ EOF
fi
cat >> tmp/$PRODUCT-$VERSION/flash-base.sh << EOF
fastboot flash bootloader bootloader-$DEVICE-$BOOTLOADER.img
+EOF
+if test "$TWINBOOTLOADERS" = "true"
+then
+cat >> tmp/$PRODUCT-$VERSION/flash-base.sh << EOF
+fastboot flash bootloader2 bootloader-$DEVICE-$BOOTLOADER.img
+EOF
+fi
+cat >> tmp/$PRODUCT-$VERSION/flash-base.sh << EOF
fastboot reboot-bootloader
sleep $SLEEPDURATION
EOF