summaryrefslogtreecommitdiff
path: root/filesystem/filesystem.go
diff options
context:
space:
mode:
author Spandan Das <spandandas@google.com> 2025-01-06 20:23:55 +0000
committer Spandan Das <spandandas@google.com> 2025-01-06 20:23:55 +0000
commita0ddc511d9b3b2d4773214878c57629d1a1511eb (patch)
tree38bc853b9b5f079d2d77a40f692e5f39f793cf37 /filesystem/filesystem.go
parent5a4f022c9d8fed286e891fb77b3ab2d59138aafa (diff)
Use fixed timestamp in img files using an environment variable
This creates hermetic img files, and will be used to assert equivalence between make and soong built img files. An alternative would be to use the timestamp from build_date.txt, but that causes a full push on the first adb sync (b/385995921) Test: spot checked that system_ext.img built by make and soong are bit identical (with notice files commeted out) Change-Id: I89e318f630f488074369fb88556215989271260e
Diffstat (limited to 'filesystem/filesystem.go')
-rw-r--r--filesystem/filesystem.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/filesystem/filesystem.go b/filesystem/filesystem.go
index 43fd390ce..6dfbfd1be 100644
--- a/filesystem/filesystem.go
+++ b/filesystem/filesystem.go
@@ -751,7 +751,10 @@ func (f *filesystem) buildPropFile(ctx android.ModuleContext) (android.Path, and
}
if timestamp := proptools.String(f.properties.Fake_timestamp); timestamp != "" {
addStr("timestamp", timestamp)
+ } else if ctx.Config().Getenv("USE_FIXED_TIMESTAMP_IMG_FILES") == "true" {
+ addStr("use_fixed_timestamp", "true")
}
+
if uuid := proptools.String(f.properties.Uuid); uuid != "" {
addStr("uuid", uuid)
addStr("hash_seed", uuid)