OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium OS Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Update file format: A delta update file contains all the deltas needed | 5 // Update file format: A delta update file contains all the deltas needed |
6 // to update a system from one specific version to another specific | 6 // to update a system from one specific version to another specific |
7 // version. The update format is represented by this struct pseudocode: | 7 // version. The update format is represented by this struct pseudocode: |
8 // struct delta_update_file { | 8 // struct delta_update_file { |
9 // char magic[4] = "CrAU"; | 9 // char magic[4] = "CrAU"; |
10 // uint64 file_format_version = 1; | 10 // uint64 file_format_version = 1; |
11 // uint64 manifest_size; // Size of protobuf DeltaArchiveManifest | 11 // uint64 manifest_size; // Size of protobuf DeltaArchiveManifest |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 } | 78 } |
79 | 79 |
80 message Signatures { | 80 message Signatures { |
81 message Signature { | 81 message Signature { |
82 optional uint32 version = 1; | 82 optional uint32 version = 1; |
83 optional bytes data = 2; | 83 optional bytes data = 2; |
84 } | 84 } |
85 repeated Signature signatures = 1; | 85 repeated Signature signatures = 1; |
86 } | 86 } |
87 | 87 |
| 88 message PartitionInfo { |
| 89 optional uint64 size = 1; |
| 90 optional bytes hash = 2; |
| 91 } |
| 92 |
88 message DeltaArchiveManifest { | 93 message DeltaArchiveManifest { |
89 message InstallOperation { | 94 message InstallOperation { |
90 enum Type { | 95 enum Type { |
91 REPLACE = 0; // Replace destination extents w/ attached data | 96 REPLACE = 0; // Replace destination extents w/ attached data |
92 REPLACE_BZ = 1; // Replace destination extents w/ attached bzipped data | 97 REPLACE_BZ = 1; // Replace destination extents w/ attached bzipped data |
93 MOVE = 2; // Move source extents to destination extents | 98 MOVE = 2; // Move source extents to destination extents |
94 BSDIFF = 3; // The data is a bsdiff binary diff | 99 BSDIFF = 3; // The data is a bsdiff binary diff |
95 } | 100 } |
96 required Type type = 1; | 101 required Type type = 1; |
97 // The offset into the delta file (after the protobuf) | 102 // The offset into the delta file (after the protobuf) |
(...skipping 21 matching lines...) Expand all Loading... |
119 // (At time of writing) usually 4096 | 124 // (At time of writing) usually 4096 |
120 optional uint32 block_size = 3 [default = 4096]; | 125 optional uint32 block_size = 3 [default = 4096]; |
121 | 126 |
122 // If signatures are present, the offset into the blobs, generally | 127 // If signatures are present, the offset into the blobs, generally |
123 // tacked onto the end of the file, and the length. We use an offset | 128 // tacked onto the end of the file, and the length. We use an offset |
124 // rather than a bool to allow for more flexibility in future file formats. | 129 // rather than a bool to allow for more flexibility in future file formats. |
125 // If either is absent, it means signatures aren't supported in this | 130 // If either is absent, it means signatures aren't supported in this |
126 // file. | 131 // file. |
127 optional uint64 signatures_offset = 4; | 132 optional uint64 signatures_offset = 4; |
128 optional uint64 signatures_size = 5; | 133 optional uint64 signatures_size = 5; |
| 134 |
| 135 // Partition data that can be used to validate the update. |
| 136 optional PartitionInfo old_kernel_info = 6; |
| 137 optional PartitionInfo new_kernel_info = 7; |
| 138 optional PartitionInfo old_rootfs_info = 8; |
| 139 optional PartitionInfo new_rootfs_info = 9; |
129 } | 140 } |
OLD | NEW |