update_payload: De-duplicate paycheck partition handling for major version 2

This commit makes handling of major version 2 rootfs/kernel partitions more
generic, with the goal of reusing the same code paths for major version 2
(which has an arbitrary number of partitions per payload).

BUG=b:794404
TEST=no errors during run_unittests and test_paycheck.sh

Change-Id: Ic6e8cdaae557c10dfbd302dba0e52ff8b2870c9f
Reviewed-on: https://chromium-review.googlesource.com/1101500
Commit-Ready: Tudor Brindus <tbrindus@chromium.org>
Tested-by: Tudor Brindus <tbrindus@chromium.org>
Reviewed-by: Amin Hassani <ahassani@chromium.org>
diff --git a/scripts/update_payload/common.py b/scripts/update_payload/common.py
index 4e7b2e3..88df32e 100644
--- a/scripts/update_payload/common.py
+++ b/scripts/update_payload/common.py
@@ -42,6 +42,10 @@
 BROTLI_BSDIFF_MINOR_PAYLOAD_VERSION = 4
 PUFFDIFF_MINOR_PAYLOAD_VERSION = 5
 
+KERNEL = 'kernel'
+ROOTFS = 'rootfs'
+CROS_PARTITIONS = (KERNEL, ROOTFS)
+
 #
 # Payload operation types.
 #