Skip to content
This repository has been archived by the owner on May 7, 2021. It is now read-only.

Finish kernel support in Go update payload implementation #616

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

marineam
Copy link
Contributor

Dug this code out of an old branch I left unfinished last summer and cleaned it up.

PCR policy data is left unimplemented but we haven't started using that feature anyway.

Verified by switching the generator to use bzip2 instead of lbzip2 and diffing the protobuf manifest generated against what update_engine's delta_generator does, resulting in:

+++ out.txt	2017-05-24 13:09:18.025764192 -0700
@@ -10932,7 +10932,7 @@
     data_length: 873139
     dst_extents: <
       start_block: 8448
-      num_blocks: 256
+      num_blocks: 233
     >
     data_sha256_hash: "\r\332\216p\376\006\335\201\265L\320\237\023\001\246+\025\376\3451\274?\240\213\026\177\377\346\375\311&~"
   >

That 256 value is from a known but harmless bug in delta_generator. If it wasn't for that the two payloads would be bit-for-bit identical.

This was mistakenly left on a development branch of mine.
This is the default value but doesn't hurt to be explicit and the
existing delta_generator sets the value explicitly too.
Needed for payload objects that are files instead of partitions such as
the kernel. Check that partitions are block aligned elsewhere.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant