Dist kernel_version.txt in soong-only builds
This ports some of the kernel version/config extraction code from
make, and updates our handling of kernel_version_for_uffd_gc.txt as
well.
There are a number of differences in the implementation vs how make
implements it. See comments in the source code for more information.
Bug: 398023642
Test: m dist, see kernel_version.txt
Change-Id: I53c9ef12912683585e45da04a44890fff1381398
diff --git a/fsgen/filesystem_creator.go b/fsgen/filesystem_creator.go
index d286c66..9378822 100644
--- a/fsgen/filesystem_creator.go
+++ b/fsgen/filesystem_creator.go
@@ -425,6 +425,7 @@
Ab_ota_postinstall_config: ctx.Config().ProductVariables().PartitionVarsForSoongMigrationOnlyDoNotUse.AbOtaPostInstallConfig,
Ramdisk_node_list: proptools.StringPtr(":ramdisk_node_list"),
Android_info: proptools.StringPtr(":" + generatedModuleName(ctx.Config(), "android_info.prop{.txt}")),
+ Kernel_version: ctx.Config().ProductVariables().BoardKernelVersion,
}
if bootloader, ok := f.createBootloaderFilegroup(ctx); ok {