From 1f0a5a181c26a8cf59e29dcc01706d7fa59237aa Mon Sep 17 00:00:00 2001 From: Spandan Das Date: Wed, 15 Jan 2025 00:53:15 +0000 Subject: Create build rules for hermetic .img files Make packaging generates build rules for two $partition.img files 1. Containing inodes with build timestamps 2. Containing inodes with pinned timestamps The former is useful for adb sync. The latter is used for target_files.zip. This CL creates a build rule to generate (2) with soong `filesystem` modules. The propFile for (2) will be created by concat'ing the propFile for (1) with `use_fixed_timestamp=true` Test: m out/soong/.intermediates/build/soong/fsgen/aosp_cf_x86_64_phone_generated_device/android_x86_64_silvermont/target_files.zip out/target/product/vsoc_x86_64/obj/PACKAGING/target_files_intermediates/aosp_cf_x86_64_phone-target_files.zip Test: diff -r out/target/product/vsoc_x86_64/obj/PACKAGING/target_files_intermediates/aosp_cf_x86_64_phone-target_files/ out/soong/.intermediates/build/soong/fsgen/aosp_cf_x86_64_phone_generated_device/android_x86_64_silvermont/target_files_dir/ --no-dereference - super_empty.img and system_other.img are missing - vbmeta*, boot* and userdata have binary diffs - the rest are identical Change-Id: If078220f215693660796090eb9b690b0ad41fd38 --- filesystem/filesystem_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'filesystem/filesystem_test.go') diff --git a/filesystem/filesystem_test.go b/filesystem/filesystem_test.go index 33cddf87d..47d06f669 100644 --- a/filesystem/filesystem_test.go +++ b/filesystem/filesystem_test.go @@ -356,7 +356,7 @@ func TestFileSystemWithCoverageVariants(t *testing.T) { inputs.Strings(), "out/soong/.intermediates/libbar/android_arm64_armv8-a_shared_cov/libbar.so") - filesystemOutput := filesystem.Output("myfilesystem.img").Output + filesystemOutput := filesystem.OutputFiles(result.TestContext, t, "")[0] prebuiltInput := result.ModuleForTests("prebuilt", "android_arm64_armv8-a").Rule("Cp").Input if filesystemOutput != prebuiltInput { t.Error("prebuilt should use cov variant of filesystem") -- cgit v1.2.3-59-g8ed1b