Introduce Srcs_16k to prebuilt_kernel_modules module type The packaging rules to install 16k kernel modules are currently written in make https://source.corp.google.com/h/googleplex-android/platform/build/+/8d135ca73082dc04f123892f109d4eefb5fa3a6f:core/Makefile;l=1520-1523;drc=acc8d6594498f50db20f04e0e05fff09750c412c;bpv=1;bpt=0 In preparation for building 16k supported devices like husky wih only soong, introduce a 16k srcs option to prebuilt_kernel_modules soong module type. This should be a noop for now. Bug: 420669218 Test: m nothing Change-Id: Ida110bd2704407fb5b20352a5f556020cffa678e
diff --git a/kernel/prebuilt_kernel_modules.go b/kernel/prebuilt_kernel_modules.go index 716ba75..1ba4f88 100644 --- a/kernel/prebuilt_kernel_modules.go +++ b/kernel/prebuilt_kernel_modules.go
@@ -47,6 +47,11 @@ // List or filegroup of prebuilt kernel module files. Should have .ko suffix. Srcs []string `android:"path,arch_variant"` + // List or filegroup of prebuilt kernel module files for 16k. Should have .ko suffix. + // These files will be installed in lib/modules/16k-mode/ + // These files are ONLY loaded during the Second Boot Stage when the device is in 16k mode. + Srcs_16k []string `android:"path,arch_variant"` + // List of system_dlkm kernel modules that the local kernel modules depend on. // The deps will be assembled into intermediates directory for running depmod // but will not be added to the current module's installed files. @@ -125,7 +130,13 @@ installPath := ctx.InstallFile(installDir, filepath.Base(m.String()), m) dests = append(dests, installPath.String()) } + installDir16k := installDir.Join(ctx, "16k-mode") + for _, m := range android.PathsForModuleSrc(ctx, pkm.properties.Srcs_16k) { + installPath := ctx.InstallFile(installDir16k, filepath.Base(m.String()), m) + dests = append(dests, installPath.String()) + } srcs := android.PathsForModuleSrc(ctx, pkm.properties.Srcs).Strings() + srcs = append(srcs, android.PathsForModuleSrc(ctx, pkm.properties.Srcs_16k).Strings()...) // Use ANDROID-GEN to identify the source of module.* files which are generated in the build process. // See the use of ANDROID-GEN in build/make/core/Makefile androidGen := "ANDROID-GEN"