summaryrefslogtreecommitdiff
path: root/payload_generator/deflate_utils.cc
diff options
context:
space:
mode:
authorAmin Hassani <ahassani@chromium.org>2019-01-29 10:24:19 -0800
committerchrome-bot <chrome-bot@chromium.org>2019-02-22 11:01:15 -0800
commit77c25fce5fe363cf84d521ed2c0148b4e0efdc07 (patch)
treec474302ca207871b86ba75864f72a7cf6530b6be /payload_generator/deflate_utils.cc
parent0ef9a2fc5b51ae22721dcd95b088d3274d2ec060 (diff)
update_engine: Add delta payload support for squashfs
This patch adds support for generating delta payloads for squashfs images. This is needed to get delta payloads for DLC images. In order to get the supported major and minor versions of the update_engine that matches the squashfs image (either squashfs image contains the entire rootfs, including the update_engine, or the image is a DLC), we need to read /etc/update_engine inside the image. We do this by calling unsquashfs and only unsquashing the target file and later reading its content into a key-value store to be used for delta payload generation. BUG=chromium:926986 TEST=unittest TEST=delta_generator --out_file=output --partition_names=dlc --new_partitions=dlc.img --old_partitions=dlc.img Change-Id: Ib5599032c873223a5caca82918e138d8b4fcec43 Reviewed-on: https://chromium-review.googlesource.com/1446278 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: Amin Hassani <ahassani@chromium.org> Reviewed-by: Sen Jiang <senj@chromium.org>
Diffstat (limited to 'payload_generator/deflate_utils.cc')
-rw-r--r--payload_generator/deflate_utils.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/payload_generator/deflate_utils.cc b/payload_generator/deflate_utils.cc
index a7a05032..ef8d257d 100644
--- a/payload_generator/deflate_utils.cc
+++ b/payload_generator/deflate_utils.cc
@@ -273,8 +273,9 @@ bool PreprocessPartitionFiles(const PartitionConfig& part,
TEST_AND_RETURN_FALSE(
CopyExtentsToFile(part.path, file.extents, path.value(), kBlockSize));
// Test if it is actually a Squashfs file.
- auto sqfs =
- SquashfsFilesystem::CreateFromFile(path.value(), extract_deflates);
+ auto sqfs = SquashfsFilesystem::CreateFromFile(path.value(),
+ extract_deflates,
+ /*load_settings=*/false);
if (sqfs) {
// It is an squashfs file. Get its files to replace with itself.
vector<FilesystemInterface::File> files;