Loading android/module.go +24 −0 Original line number Diff line number Diff line Loading @@ -81,6 +81,9 @@ type Module interface { InstallInProduct() bool InstallInVendor() bool InstallInSystemExt() bool InstallInSystemDlkm() bool InstallInVendorDlkm() bool InstallInOdmDlkm() bool InstallForceOS() (*OsType, *ArchType) PartitionTag(DeviceConfig) string HideFromMake() Loading Loading @@ -386,6 +389,15 @@ type commonProperties struct { // Whether this module is installed to debug ramdisk Debug_ramdisk *bool // Install to partition system_dlkm when set to true. System_dlkm_specific *bool // Install to partition vendor_dlkm when set to true. Vendor_dlkm_specific *bool // Install to partition odm_dlkm when set to true. Odm_dlkm_specific *bool // Whether this module is built for non-native architectures (also known as native bridge binary) Native_bridge_supported *bool `android:"arch_variant"` Loading Loading @@ -1535,6 +1547,18 @@ func (m *ModuleBase) InstallInRoot() bool { return false } func (m *ModuleBase) InstallInSystemDlkm() bool { return Bool(m.commonProperties.System_dlkm_specific) } func (m *ModuleBase) InstallInVendorDlkm() bool { return Bool(m.commonProperties.Vendor_dlkm_specific) } func (m *ModuleBase) InstallInOdmDlkm() bool { return Bool(m.commonProperties.Odm_dlkm_specific) } func (m *ModuleBase) InstallForceOS() (*OsType, *ArchType) { return nil, nil } Loading android/module_context.go +15 −0 Original line number Diff line number Diff line Loading @@ -196,6 +196,9 @@ type ModuleContext interface { InstallInOdm() bool InstallInProduct() bool InstallInVendor() bool InstallInSystemDlkm() bool InstallInVendorDlkm() bool InstallInOdmDlkm() bool InstallForceOS() (*OsType, *ArchType) RequiredModuleNames(ctx ConfigurableEvaluatorContext) []string Loading Loading @@ -493,6 +496,18 @@ func (m *moduleContext) InstallInVendor() bool { return m.module.InstallInVendor() } func (m *moduleContext) InstallInSystemDlkm() bool { return m.module.InstallInSystemDlkm() } func (m *moduleContext) InstallInVendorDlkm() bool { return m.module.InstallInVendorDlkm() } func (m *moduleContext) InstallInOdmDlkm() bool { return m.module.InstallInOdmDlkm() } func (m *moduleContext) skipInstall() bool { if m.module.base().commonProperties.SkipInstall { return true Loading android/module_proxy.go +12 −0 Original line number Diff line number Diff line Loading @@ -106,6 +106,18 @@ func (m ModuleProxy) InstallInSystemExt() bool { panic("method is not implemented on ModuleProxy") } func (m ModuleProxy) InstallInSystemDlkm() bool { panic("method is not implemented on ModuleProxy") } func (m ModuleProxy) InstallInVendorDlkm() bool { panic("method is not implemented on ModuleProxy") } func (m ModuleProxy) InstallInOdmDlkm() bool { panic("method is not implemented on ModuleProxy") } func (m ModuleProxy) InstallForceOS() (*OsType, *ArchType) { panic("method is not implemented on ModuleProxy") } Loading android/paths.go +36 −0 Original line number Diff line number Diff line Loading @@ -117,6 +117,9 @@ type ModuleInstallPathContext interface { InstallInOdm() bool InstallInProduct() bool InstallInVendor() bool InstallInSystemDlkm() bool InstallInVendorDlkm() bool InstallInOdmDlkm() bool InstallForceOS() (*OsType, *ArchType) } Loading Loading @@ -170,6 +173,18 @@ func (ctx *baseModuleContextToModuleInstallPathContext) InstallInVendor() bool { return ctx.Module().InstallInVendor() } func (ctx *baseModuleContextToModuleInstallPathContext) InstallInSystemDlkm() bool { return ctx.Module().InstallInSystemDlkm() } func (ctx *baseModuleContextToModuleInstallPathContext) InstallInVendorDlkm() bool { return ctx.Module().InstallInVendorDlkm() } func (ctx *baseModuleContextToModuleInstallPathContext) InstallInOdmDlkm() bool { return ctx.Module().InstallInOdmDlkm() } func (ctx *baseModuleContextToModuleInstallPathContext) InstallForceOS() (*OsType, *ArchType) { return ctx.Module().InstallForceOS() } Loading Loading @@ -2131,6 +2146,12 @@ func modulePartition(ctx ModuleInstallPathContext, device bool) string { partition = ctx.DeviceConfig().SystemExtPath() } else if ctx.InstallInRoot() { partition = "root" } else if ctx.InstallInSystemDlkm() { partition = ctx.DeviceConfig().SystemDlkmPath() } else if ctx.InstallInVendorDlkm() { partition = ctx.DeviceConfig().VendorDlkmPath() } else if ctx.InstallInOdmDlkm() { partition = ctx.DeviceConfig().OdmDlkmPath() } else { partition = "system" } Loading Loading @@ -2334,6 +2355,9 @@ type testModuleInstallPathContext struct { inOdm bool inProduct bool inVendor bool inSystemDlkm bool inVendorDlkm bool inOdmDlkm bool forceOS *OsType forceArch *ArchType } Loading Loading @@ -2388,6 +2412,18 @@ func (m testModuleInstallPathContext) InstallInVendor() bool { return m.inVendor } func (m testModuleInstallPathContext) InstallInSystemDlkm() bool { return m.inSystemDlkm } func (m testModuleInstallPathContext) InstallInVendorDlkm() bool { return m.inVendorDlkm } func (m testModuleInstallPathContext) InstallInOdmDlkm() bool { return m.inOdmDlkm } func (m testModuleInstallPathContext) InstallForceOS() (*OsType, *ArchType) { return m.forceOS, m.forceArch } Loading etc/prebuilt_etc.go +1 −16 Original line number Diff line number Diff line Loading @@ -137,15 +137,6 @@ type prebuiltEtcProperties struct { // Install symlinks to the installed file. Symlinks []string `android:"arch_variant"` // Install to partition system_dlkm when set to true. System_dlkm_specific *bool `android:"arch_variant"` // Install to partition vendor_dlkm when set to true. Vendor_dlkm_specific *bool `android:"arch_variant"` // Install to partition odm_dlkm when set to true. Odm_dlkm_specific *bool `android:"arch_variant"` // Install to partition oem when set to true. Oem_specific *bool `android:"arch_variant"` } Loading Loading @@ -386,13 +377,7 @@ func (p *PrebuiltEtc) GenerateAndroidBuildActions(ctx android.ModuleContext) { } baseInstallDirPath := android.PathForModuleInstall(ctx, p.installBaseDir(ctx), p.SubDir()) // TODO(b/377304441) if android.Bool(p.properties.System_dlkm_specific) { baseInstallDirPath = android.PathForModuleInPartitionInstall(ctx, ctx.DeviceConfig().SystemDlkmPath(), p.installBaseDir(ctx), p.SubDir()) } else if android.Bool(p.properties.Vendor_dlkm_specific) { baseInstallDirPath = android.PathForModuleInPartitionInstall(ctx, ctx.DeviceConfig().VendorDlkmPath(), p.installBaseDir(ctx), p.SubDir()) } else if android.Bool(p.properties.Odm_dlkm_specific) { baseInstallDirPath = android.PathForModuleInPartitionInstall(ctx, ctx.DeviceConfig().OdmDlkmPath(), p.installBaseDir(ctx), p.SubDir()) } else if android.Bool(p.properties.Oem_specific) { if android.Bool(p.properties.Oem_specific) { baseInstallDirPath = android.PathForModuleInPartitionInstall(ctx, ctx.DeviceConfig().OemPath(), p.installBaseDir(ctx), p.SubDir()) } Loading Loading
android/module.go +24 −0 Original line number Diff line number Diff line Loading @@ -81,6 +81,9 @@ type Module interface { InstallInProduct() bool InstallInVendor() bool InstallInSystemExt() bool InstallInSystemDlkm() bool InstallInVendorDlkm() bool InstallInOdmDlkm() bool InstallForceOS() (*OsType, *ArchType) PartitionTag(DeviceConfig) string HideFromMake() Loading Loading @@ -386,6 +389,15 @@ type commonProperties struct { // Whether this module is installed to debug ramdisk Debug_ramdisk *bool // Install to partition system_dlkm when set to true. System_dlkm_specific *bool // Install to partition vendor_dlkm when set to true. Vendor_dlkm_specific *bool // Install to partition odm_dlkm when set to true. Odm_dlkm_specific *bool // Whether this module is built for non-native architectures (also known as native bridge binary) Native_bridge_supported *bool `android:"arch_variant"` Loading Loading @@ -1535,6 +1547,18 @@ func (m *ModuleBase) InstallInRoot() bool { return false } func (m *ModuleBase) InstallInSystemDlkm() bool { return Bool(m.commonProperties.System_dlkm_specific) } func (m *ModuleBase) InstallInVendorDlkm() bool { return Bool(m.commonProperties.Vendor_dlkm_specific) } func (m *ModuleBase) InstallInOdmDlkm() bool { return Bool(m.commonProperties.Odm_dlkm_specific) } func (m *ModuleBase) InstallForceOS() (*OsType, *ArchType) { return nil, nil } Loading
android/module_context.go +15 −0 Original line number Diff line number Diff line Loading @@ -196,6 +196,9 @@ type ModuleContext interface { InstallInOdm() bool InstallInProduct() bool InstallInVendor() bool InstallInSystemDlkm() bool InstallInVendorDlkm() bool InstallInOdmDlkm() bool InstallForceOS() (*OsType, *ArchType) RequiredModuleNames(ctx ConfigurableEvaluatorContext) []string Loading Loading @@ -493,6 +496,18 @@ func (m *moduleContext) InstallInVendor() bool { return m.module.InstallInVendor() } func (m *moduleContext) InstallInSystemDlkm() bool { return m.module.InstallInSystemDlkm() } func (m *moduleContext) InstallInVendorDlkm() bool { return m.module.InstallInVendorDlkm() } func (m *moduleContext) InstallInOdmDlkm() bool { return m.module.InstallInOdmDlkm() } func (m *moduleContext) skipInstall() bool { if m.module.base().commonProperties.SkipInstall { return true Loading
android/module_proxy.go +12 −0 Original line number Diff line number Diff line Loading @@ -106,6 +106,18 @@ func (m ModuleProxy) InstallInSystemExt() bool { panic("method is not implemented on ModuleProxy") } func (m ModuleProxy) InstallInSystemDlkm() bool { panic("method is not implemented on ModuleProxy") } func (m ModuleProxy) InstallInVendorDlkm() bool { panic("method is not implemented on ModuleProxy") } func (m ModuleProxy) InstallInOdmDlkm() bool { panic("method is not implemented on ModuleProxy") } func (m ModuleProxy) InstallForceOS() (*OsType, *ArchType) { panic("method is not implemented on ModuleProxy") } Loading
android/paths.go +36 −0 Original line number Diff line number Diff line Loading @@ -117,6 +117,9 @@ type ModuleInstallPathContext interface { InstallInOdm() bool InstallInProduct() bool InstallInVendor() bool InstallInSystemDlkm() bool InstallInVendorDlkm() bool InstallInOdmDlkm() bool InstallForceOS() (*OsType, *ArchType) } Loading Loading @@ -170,6 +173,18 @@ func (ctx *baseModuleContextToModuleInstallPathContext) InstallInVendor() bool { return ctx.Module().InstallInVendor() } func (ctx *baseModuleContextToModuleInstallPathContext) InstallInSystemDlkm() bool { return ctx.Module().InstallInSystemDlkm() } func (ctx *baseModuleContextToModuleInstallPathContext) InstallInVendorDlkm() bool { return ctx.Module().InstallInVendorDlkm() } func (ctx *baseModuleContextToModuleInstallPathContext) InstallInOdmDlkm() bool { return ctx.Module().InstallInOdmDlkm() } func (ctx *baseModuleContextToModuleInstallPathContext) InstallForceOS() (*OsType, *ArchType) { return ctx.Module().InstallForceOS() } Loading Loading @@ -2131,6 +2146,12 @@ func modulePartition(ctx ModuleInstallPathContext, device bool) string { partition = ctx.DeviceConfig().SystemExtPath() } else if ctx.InstallInRoot() { partition = "root" } else if ctx.InstallInSystemDlkm() { partition = ctx.DeviceConfig().SystemDlkmPath() } else if ctx.InstallInVendorDlkm() { partition = ctx.DeviceConfig().VendorDlkmPath() } else if ctx.InstallInOdmDlkm() { partition = ctx.DeviceConfig().OdmDlkmPath() } else { partition = "system" } Loading Loading @@ -2334,6 +2355,9 @@ type testModuleInstallPathContext struct { inOdm bool inProduct bool inVendor bool inSystemDlkm bool inVendorDlkm bool inOdmDlkm bool forceOS *OsType forceArch *ArchType } Loading Loading @@ -2388,6 +2412,18 @@ func (m testModuleInstallPathContext) InstallInVendor() bool { return m.inVendor } func (m testModuleInstallPathContext) InstallInSystemDlkm() bool { return m.inSystemDlkm } func (m testModuleInstallPathContext) InstallInVendorDlkm() bool { return m.inVendorDlkm } func (m testModuleInstallPathContext) InstallInOdmDlkm() bool { return m.inOdmDlkm } func (m testModuleInstallPathContext) InstallForceOS() (*OsType, *ArchType) { return m.forceOS, m.forceArch } Loading
etc/prebuilt_etc.go +1 −16 Original line number Diff line number Diff line Loading @@ -137,15 +137,6 @@ type prebuiltEtcProperties struct { // Install symlinks to the installed file. Symlinks []string `android:"arch_variant"` // Install to partition system_dlkm when set to true. System_dlkm_specific *bool `android:"arch_variant"` // Install to partition vendor_dlkm when set to true. Vendor_dlkm_specific *bool `android:"arch_variant"` // Install to partition odm_dlkm when set to true. Odm_dlkm_specific *bool `android:"arch_variant"` // Install to partition oem when set to true. Oem_specific *bool `android:"arch_variant"` } Loading Loading @@ -386,13 +377,7 @@ func (p *PrebuiltEtc) GenerateAndroidBuildActions(ctx android.ModuleContext) { } baseInstallDirPath := android.PathForModuleInstall(ctx, p.installBaseDir(ctx), p.SubDir()) // TODO(b/377304441) if android.Bool(p.properties.System_dlkm_specific) { baseInstallDirPath = android.PathForModuleInPartitionInstall(ctx, ctx.DeviceConfig().SystemDlkmPath(), p.installBaseDir(ctx), p.SubDir()) } else if android.Bool(p.properties.Vendor_dlkm_specific) { baseInstallDirPath = android.PathForModuleInPartitionInstall(ctx, ctx.DeviceConfig().VendorDlkmPath(), p.installBaseDir(ctx), p.SubDir()) } else if android.Bool(p.properties.Odm_dlkm_specific) { baseInstallDirPath = android.PathForModuleInPartitionInstall(ctx, ctx.DeviceConfig().OdmDlkmPath(), p.installBaseDir(ctx), p.SubDir()) } else if android.Bool(p.properties.Oem_specific) { if android.Bool(p.properties.Oem_specific) { baseInstallDirPath = android.PathForModuleInPartitionInstall(ctx, ctx.DeviceConfig().OemPath(), p.installBaseDir(ctx), p.SubDir()) } Loading