summaryrefslogtreecommitdiff
path: root/android/module.go
diff options
context:
space:
mode:
author Inseob Kim <inseob@google.com> 2021-04-08 21:13:22 +0900
committer Inseob Kim <inseob@google.com> 2021-04-15 00:56:30 +0000
commitf84e9c05e2103149162e4a78a68f20c164fbbba2 (patch)
treedc16f788df5498240fbe3610a124bb5eafdf6422 /android/module.go
parentd9580b84a2207a9cb552bd4595464459d9a60ba2 (diff)
Add debug ramdisk variant
A module will be installed to debug_ramdisk (or debug_ramdisk/first_stage_ramdisk if recovery as boot is true) if debug_ramdisk is set to true. Bug: 184004542 Test: soong test Change-Id: Ic5a4d27407e506fffa462de2149e0785f11b2ac7
Diffstat (limited to 'android/module.go')
-rw-r--r--android/module.go17
1 files changed, 17 insertions, 0 deletions
diff --git a/android/module.go b/android/module.go
index 9f923e2d0..942e07193 100644
--- a/android/module.go
+++ b/android/module.go
@@ -393,6 +393,7 @@ type ModuleContext interface {
InstallInSanitizerDir() bool
InstallInRamdisk() bool
InstallInVendorRamdisk() bool
+ InstallInDebugRamdisk() bool
InstallInRecovery() bool
InstallInRoot() bool
InstallBypassMake() bool
@@ -450,6 +451,7 @@ type Module interface {
InstallInSanitizerDir() bool
InstallInRamdisk() bool
InstallInVendorRamdisk() bool
+ InstallInDebugRamdisk() bool
InstallInRecovery() bool
InstallInRoot() bool
InstallBypassMake() bool
@@ -753,6 +755,9 @@ type commonProperties struct {
// Whether this module is installed to vendor ramdisk
Vendor_ramdisk *bool
+ // Whether this module is installed to debug ramdisk
+ Debug_ramdisk *bool
+
// Whether this module is built for non-native architectures (also known as native bridge binary)
Native_bridge_supported *bool `android:"arch_variant"`
@@ -1540,6 +1545,10 @@ func (m *ModuleBase) InstallInVendorRamdisk() bool {
return Bool(m.commonProperties.Vendor_ramdisk)
}
+func (m *ModuleBase) InstallInDebugRamdisk() bool {
+ return Bool(m.commonProperties.Debug_ramdisk)
+}
+
func (m *ModuleBase) InstallInRecovery() bool {
return Bool(m.commonProperties.Recovery)
}
@@ -1593,6 +1602,10 @@ func (m *ModuleBase) InVendorRamdisk() bool {
return m.base().commonProperties.ImageVariation == VendorRamdiskVariation
}
+func (m *ModuleBase) InDebugRamdisk() bool {
+ return m.base().commonProperties.ImageVariation == DebugRamdiskVariation
+}
+
func (m *ModuleBase) InRecovery() bool {
return m.base().commonProperties.ImageVariation == RecoveryVariation
}
@@ -2548,6 +2561,10 @@ func (m *moduleContext) InstallInVendorRamdisk() bool {
return m.module.InstallInVendorRamdisk()
}
+func (m *moduleContext) InstallInDebugRamdisk() bool {
+ return m.module.InstallInDebugRamdisk()
+}
+
func (m *moduleContext) InstallInRecovery() bool {
return m.module.InstallInRecovery()
}