summaryrefslogtreecommitdiff
path: root/filesystem/android_device.go
diff options
context:
space:
mode:
author Spandan Das <spandandas@google.com> 2025-03-07 18:32:06 +0000
committer Spandan Das <spandandas@google.com> 2025-03-07 10:44:13 -0800
commit2dee3f7acad7cc5e9ff5d82b812ada56f8dc546c (patch)
treed10bf2693738664b4fbafd62e59fc548ef0b133c /filesystem/android_device.go
parentd30afaded26ae565329f4836b3f840fcc8e9e07e (diff)
Minor fixes for META/kernel_version.txt
- extractKernelVersionAndConfigs returns (version,config) but was incorrectly assigned to (config,version) - kernel_version.txt generated by make has a newline at the end. This CL adds the newline to Soong's kernel_version.txt for bit-identical. Test: Diff'd make and soong built kernel_version.txt Change-Id: I3131d1253057715e0c361c8036769223e5965b7b
Diffstat (limited to 'filesystem/android_device.go')
-rw-r--r--filesystem/android_device.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/filesystem/android_device.go b/filesystem/android_device.go
index b1f668d57..a616ee053 100644
--- a/filesystem/android_device.go
+++ b/filesystem/android_device.go
@@ -191,7 +191,7 @@ func (a *androidDevice) GenerateAndroidBuildActions(ctx android.ModuleContext) {
allInstalledModules := a.allInstalledModules(ctx)
a.apkCertsInfo = a.buildApkCertsInfo(ctx, allInstalledModules)
- a.kernelConfig, a.kernelVersion = a.extractKernelVersionAndConfigs(ctx)
+ a.kernelVersion, a.kernelConfig = a.extractKernelVersionAndConfigs(ctx)
a.miscInfo = a.addMiscInfo(ctx)
a.buildTargetFilesZip(ctx, allInstalledModules)
a.buildProguardZips(ctx, allInstalledModules)
@@ -881,11 +881,12 @@ func (a *androidDevice) extractKernelVersionAndConfigs(ctx android.ModuleContext
Flag("--tools lz4:"+lz4tool.String()).Implicit(lz4tool).
FlagWithInput("--input ", kernel).
FlagWithOutput("--output-release ", extractedVersionFile).
- FlagWithOutput("--output-configs ", extractedConfigsFile)
+ FlagWithOutput("--output-configs ", extractedConfigsFile).
+ Textf(`&& printf "\n" >> %s`, extractedVersionFile)
if specifiedVersion := proptools.String(a.deviceProps.Kernel_version); specifiedVersion != "" {
specifiedVersionFile := android.PathForModuleOut(ctx, "specified_kernel_version.txt")
- android.WriteFileRuleVerbatim(ctx, specifiedVersionFile, specifiedVersion)
+ android.WriteFileRule(ctx, specifiedVersionFile, specifiedVersion)
builder.Command().Text("diff -q").
Input(specifiedVersionFile).
Input(extractedVersionFile).