Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f6b5e8fb authored by Jihoon Kang's avatar Jihoon Kang
Browse files

Specify correct install location for vendor_ramdisk prebuilt kernel module

vendor_ramdisk prebuilt kernel files are installed under
`vendor_ramdisk/lib/modules` regardless of the product configuration in
make. This change matches the behavior and allows the kernel files to be
installed in the correct location.

Test: m soong_generated_vendor_ramdisk_filesystem_test
Bug: 381104942
Change-Id: Id2086de95f0554c849c1667ce190274232db6b99
parent 60c23299
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -100,6 +100,13 @@ func (pkm *prebuiltKernelModules) GenerateAndroidBuildActions(ctx android.Module
	strippedModules := stripDebugSymbols(ctx, modules)

	installDir := android.PathForModuleInstall(ctx, "lib", "modules")
	// Kernel module is installed to vendor_ramdisk/lib/modules regardless of product
	// configuration. This matches the behavior in make and prevents the files from being
	// installed in `vendor_ramdisk/first_stage_ramdisk`.
	if pkm.InstallInVendorRamdisk() {
		installDir = android.PathForModuleInPartitionInstall(ctx, "vendor_ramdisk", "lib", "modules")
	}

	if pkm.KernelVersion() != "" {
		installDir = installDir.Join(ctx, pkm.KernelVersion())
	}