Support generation of partial updates
Add a new minor version kPartialUpdateMinorPayloadVersion for
partial updates. Also, we always treat the partial update as a
delta update in payload consumer, so new update_engine can
perform minor version check correctly.
Conceptually, partial update is indeed a delta update; because we
need to copy | use the untouched partitions. Since the payload for
the partial update doesn't carry old partition info, old update
engines will treat them as full update. So old UE will also fail
the minor version check correctly; because we always expect
kFullPayloadMinorVersion for full updates.
Bug: 157778739
Test: generate & apply partial full|incremental updates, generate
regular updates, unittests pass
Change-Id: I7f8365cf99098269150dd08e028120354944f3c6
diff --git a/payload_consumer/payload_constants.h b/payload_consumer/payload_constants.h
index 5c2d17c..03647ee 100644
--- a/payload_consumer/payload_constants.h
+++ b/payload_consumer/payload_constants.h
@@ -56,6 +56,9 @@
// The minor version that allows Verity hash tree and FEC generation.
extern const uint32_t kVerityMinorPayloadVersion;
+// The minor version that allows partial update, e.g. kernel only update.
+extern const uint32_t kPartialUpdateMinorPayloadVersion;
+
// The minimum and maximum supported minor version.
extern const uint32_t kMinSupportedMinorPayloadVersion;
extern const uint32_t kMaxSupportedMinorPayloadVersion;