Emit XOR ops at OTA generation time
1. Add a new merge operation type: COW_XOR
2. When running bsdiff, extract similar blocks and record them in
annotated operations
3. During merge sequence generation, include COW_XOR ops as well
Test: treehugger
Bug: 177104308
Change-Id: If894736859b572e761e83be5a9498235caa68866
diff --git a/scripts/brillo_update_payload b/scripts/brillo_update_payload
index d1a1781..0be2b0d 100755
--- a/scripts/brillo_update_payload
+++ b/scripts/brillo_update_payload
@@ -202,6 +202,8 @@
DEFINE_string full_boot "" "Will include full boot image"
DEFINE_string disable_vabc "" \
"Optional: Disables Virtual AB Compression when installing the OTA"
+ DEFINE_string enable_vabc_xor "" \
+ "Optional: Enable the use of Virtual AB Compression XOR feature"
fi
if [[ "${COMMAND}" == "hash" || "${COMMAND}" == "sign" ]]; then
DEFINE_string unsigned_payload "" "Path to the input unsigned payload."
@@ -708,6 +710,11 @@
fi
fi
+ if [[ -n "${FLAGS_enable_vabc_xor}" ]]; then
+ GENERATOR_ARGS+=(
+ --enable_vabc_xor="${FLAGS_enable_vabc_xor}" )
+ fi
+
if [[ -n "${FLAGS_disable_vabc}" ]]; then
GENERATOR_ARGS+=(
--disable_vabc="${FLAGS_disable_vabc}" )