Ignore source partitions smaller than 4 KiB.

When rounding down source partitions to the nearest 4 KiB boundary we
hit an error condition that checks for empty partitions. This patch
ignores partitions that are less than 4 KiB.

Bug: 37266429
Test: ota_from_target_files -i target_files-3901180.zip target_files-3903096.zip ota.zip
Change-Id: I165a3f9a9f73044d7520d042727caf1cf63a80c7
diff --git a/scripts/brillo_update_payload b/scripts/brillo_update_payload
index ebb2e3a..e62ba94 100755
--- a/scripts/brillo_update_payload
+++ b/scripts/brillo_update_payload
@@ -459,6 +459,11 @@
       if [[ "${partitions_array}" == "SRC_PARTITIONS" ]]; then
         echo "Rounding DOWN partition ${part}.img to a multiple of 4 KiB."
         : $(( filesize = filesize & -4096 ))
+        if [[ ${filesize} == 0 ]]; then
+          echo "Source partition ${part}.img is empty after rounding down," \
+            "skipping."
+          continue
+        fi
       else
         echo "Rounding UP partition ${part}.img to a multiple of 4 KiB."
         : $(( filesize = (filesize + 4095) & -4096 ))