summaryrefslogtreecommitdiff
path: root/filesystem/android_device.go
diff options
context:
space:
mode:
author Spandan Das <spandandas@google.com> 2025-01-14 19:26:23 +0000
committer Spandan Das <spandandas@google.com> 2025-01-15 01:29:16 +0000
commit33c9c479989870e4a1bd82f61312eb0e2e5ebeb0 (patch)
tree5a8580bc7a4b7f1d0bce4af1d39a4baaf7066ec3 /filesystem/android_device.go
parentd60d5e1e5df5453da800c3ba145b1a87eb0a2c3a (diff)
Generate block list info file of .img files
This is a text file with block size information of the contents of the .img files. build_image supports creating this as an implicit output. This CL creates the build rule to generate this output. This will be copied to IMAGES/ subdir of target_files.zip There is a subtle difference between the make and soong implementation. In make, we generate two $partiton.img files. One is hermetic (for targret_files.zip), and other is non-hermetic (for adb sync). The block file is generated from the hermetic one. OTOH, in the soong implementation, we are generating the block file from the non-hermetic one. This should not matter, since pinning the timestamp should not have an effect on block sizes. This implementation detail can be changed in a follow up CL if necessary. Test: diff'd target_files.zip locally, all $partition.map files are identical Bug: 388635097 Change-Id: I984d4fb55071296a82dae38ef09be6804ff0f3ae
Diffstat (limited to 'filesystem/android_device.go')
-rw-r--r--filesystem/android_device.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/filesystem/android_device.go b/filesystem/android_device.go
index c8c535475..8332bc5f3 100644
--- a/filesystem/android_device.go
+++ b/filesystem/android_device.go
@@ -378,6 +378,7 @@ func (a *androidDevice) copyImagesToTargetZip(ctx android.ModuleContext, builder
if info, ok := android.OtherModuleProvider(ctx, superPartition, SuperImageProvider); ok {
for _, partition := range android.SortedKeys(info.SubImageInfo) {
builder.Command().Textf("cp ").Input(info.SubImageInfo[partition].Output).Textf(" %s/IMAGES/", targetFilesDir.String())
+ builder.Command().Textf("cp ").Input(info.SubImageInfo[partition].MapFile).Textf(" %s/IMAGES/", targetFilesDir.String())
}
} else {
ctx.ModuleErrorf("Super partition %s does set SuperImageProvider\n", superPartition.Name())