summaryrefslogtreecommitdiff
path: root/filesystem/android_device.go
diff options
context:
space:
mode:
author Spandan Das <spandandas@google.com> 2025-02-28 09:48:28 +0000
committer Spandan Das <spandandas@google.com> 2025-02-28 09:52:07 +0000
commit3dfa17f31c8c310d220f6ff1df43d072659e3e68 (patch)
tree00eb9410f1f9059f6888663da48b3628776f6416 /filesystem/android_device.go
parent9da8a2dc1d3c8d09d6cf7cb69390ebbd60810476 (diff)
Generate META/fastboot-info.txt file
Make packaging system generates META/fastboot-info.txt by 1. A checked-in fastboot-info file (TARGET_BOARD_FASTBOOT_INFO_FILE), OR 2. Generating a fastboot-info file from board config vars This CL implements (1). Cuttlefish uses a checked-in fastboot-info.txt file. To implement this, a new property has been added to `android_device` Test: Built Soong's META/fastboot-info.txt file locally Bug: 399788523 Change-Id: Iadef020b1144ec72efc3bc3c7020fe63b6c47d4a
Diffstat (limited to 'filesystem/android_device.go')
-rw-r--r--filesystem/android_device.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/filesystem/android_device.go b/filesystem/android_device.go
index 6718320e1..c0f0676af 100644
--- a/filesystem/android_device.go
+++ b/filesystem/android_device.go
@@ -87,6 +87,7 @@ type DeviceProperties struct {
Ramdisk_node_list *string `android:"path"`
Releasetools_extension *string `android:"path"`
+ FastbootInfo *string `android:"path"`
}
type androidDevice struct {
@@ -621,6 +622,12 @@ func (a *androidDevice) copyMetadataToTargetZip(ctx android.ModuleContext, build
}
installedApexKeys = android.SortedUniquePaths(installedApexKeys) // Sort by keypath to match make
builder.Command().Text("cat").Inputs(installedApexKeys).Textf(" >> %s/META/apexkeys.txt", targetFilesDir.String())
+ // Copy fastboot-info.txt
+ if fastbootInfo := android.PathForModuleSrc(ctx, proptools.String(a.deviceProps.FastbootInfo)); fastbootInfo != nil {
+ // TODO (b/399788523): Autogenerate fastboot-info.txt if there is no source fastboot-info.txt
+ // https://cs.android.com/android/_/android/platform/build/+/80b9546f8f69e78b8fe1870e0e745d70fc18dfcd:core/Makefile;l=5831-5893;drc=077490384423dff9eac954da5c001c6f0be3fa6e;bpv=0;bpt=0
+ builder.Command().Textf("cp").Input(fastbootInfo).Textf(" %s/META/fastboot-info.txt", targetFilesDir.String())
+ }
if a.partitionProps.Super_partition_name != nil {
superPartition := ctx.GetDirectDepProxyWithTag(*a.partitionProps.Super_partition_name, superPartitionDepTag)