Index: build_gpt.sh |
diff --git a/build_gpt.sh b/build_gpt.sh |
index b0d77228ae957e023064b42d258718ba18db72d8..a8b37e8fa7f6fc205e096fe02cb321bc2a1e4660 100755 |
--- a/build_gpt.sh |
+++ b/build_gpt.sh |
@@ -100,6 +100,12 @@ if [ ! -s ${STATEFUL_IMG} ] && [ ${FLAGS_recovery} -eq $FLAGS_FALSE ]; then |
exit 1 |
fi |
+OEM_IMG="${IMAGEDIR}/partner_partition.image" |
+if [[ ! -s ${OEM_IMG} ]]; then |
+ error "Can't find ${OEM_IMG}" |
+ exit 1 |
+fi |
+ |
ESP_IMG="${IMAGEDIR}/esp.image" |
if [ ! -s ${ESP_IMG} ] && [ ${FLAGS_recovery} -eq $FLAGS_FALSE ]; then |
error "Can't find ${ESP_IMG}" |
@@ -117,7 +123,7 @@ fi |
# Create the GPT. This has the side-effect of setting some global vars |
# describing the partition table entries (see the comments in the source). |
install_gpt $OUTDEV $ROOTFS_IMG $KERNEL_IMG $STATEFUL_IMG $PMBRCODE $ESP_IMG \ |
- false $FLAGS_recovery $FLAGS_rootfs_partition_size |
+ false $FLAGS_recovery $FLAGS_rootfs_partition_size |
if [[ "$ARCH" = "arm" ]]; then |
# assume /dev/mmcblk1. we could not get this from ${OUTDEV} |
@@ -145,6 +151,9 @@ echo "Copying stateful partition..." |
$sudo dd if=${STATEFUL_IMG} of=${OUTDEV} conv=notrunc bs=512 \ |
seek=${START_STATEFUL} |
+echo "Copying OEM partition..." |
+$sudo dd if=${OEM_IMG} of=${OUTDEV} conv=notrunc bs=512 seek=${START_OEM} |
+ |
echo "Copying kernel..." |
$sudo dd if=${KERNEL_IMG} of=${OUTDEV} conv=notrunc bs=512 seek=${START_KERN_A} |