summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Baptiste Queru <jbq@google.com>2012-04-27 18:31:48 -0700
committerJean-Baptiste Queru <jbq@google.com>2012-04-27 18:31:48 -0700
commitd06dd400f224f966d2603a75a4431805c349c221 (patch)
tree8af824e69e19527c4992b9e984359dc9ea28b748
parent9cb1b4a67ef2a9c0a487606aee8f11f2c906a84b (diff)
downloaddevice_common-d06dd400f224f966d2603a75a4431805c349c221.zip
device_common-d06dd400f224f966d2603a75a4431805c349c221.tar.gz
device_common-d06dd400f224f966d2603a75a4431805c349c221.tar.bz2
Allow packaging factory images from a separate bootloader file
Change-Id: Iffdf98cb424b4f7e82cd231395d736e572ae453d
-rw-r--r--clear-factory-images-variables.sh1
-rw-r--r--generate-factory-images-common.sh12
2 files changed, 11 insertions, 2 deletions
diff --git a/clear-factory-images-variables.sh b/clear-factory-images-variables.sh
index 5528938..312f195 100644
--- a/clear-factory-images-variables.sh
+++ b/clear-factory-images-variables.sh
@@ -13,6 +13,7 @@
# limitations under the License.
unset BOOTLOADER
+unset BOOTLOADERFILE
unset BOOTLOADERSRC
unset BUILD
unset CDMARADIO
diff --git a/generate-factory-images-common.sh b/generate-factory-images-common.sh
index ef58ae4..5d06a09 100644
--- a/generate-factory-images-common.sh
+++ b/generate-factory-images-common.sh
@@ -22,7 +22,10 @@ then
fi
rm -rf tmp
mkdir -p tmp/$PRODUCT-$VERSION
-unzip -d tmp ${SRCPREFIX}$PRODUCT-target_files-$BUILD.zip RADIO/$BOOTLOADERSRC
+if test "$BOOTLOADERFILE" = ""
+then
+ unzip -d tmp ${SRCPREFIX}$PRODUCT-target_files-$BUILD.zip RADIO/$BOOTLOADERSRC
+fi
if test "$RADIO" != ""
then
unzip -d tmp ${SRCPREFIX}$PRODUCT-target_files-$BUILD.zip RADIO/$RADIOSRC
@@ -32,7 +35,12 @@ then
unzip -d tmp ${SRCPREFIX}$PRODUCT-target_files-$BUILD.zip RADIO/radio-cdma.img
fi
cp ${SRCPREFIX}$PRODUCT-img-$BUILD.zip tmp/$PRODUCT-$VERSION/image-$PRODUCT-$VERSION.zip
-cp tmp/RADIO/$BOOTLOADERSRC tmp/$PRODUCT-$VERSION/bootloader-$DEVICE-$BOOTLOADER.img
+if test "$BOOTLOADERFILE" = ""
+then
+ cp tmp/RADIO/$BOOTLOADERSRC tmp/$PRODUCT-$VERSION/bootloader-$DEVICE-$BOOTLOADER.img
+else
+ cp $BOOTLOADERFILE tmp/$PRODUCT-$VERSION/bootloader-$DEVICE-$BOOTLOADER.img
+fi
if test "$RADIO" != ""
then
cp tmp/RADIO/$RADIOSRC tmp/$PRODUCT-$VERSION/radio-$DEVICE-$RADIO.img