aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBowgo Tsai <bowgotsai@google.com>2021-04-22 09:31:49 +0800
committerBowgo Tsai <bowgotsai@google.com>2021-04-22 09:49:24 +0800
commit78ea2f5eacd31b66ab148cd76bd87763b7745bf3 (patch)
treed4209415e2bd62fde5918df2188783f4b75df558
parent752d63cd83e56047ca02b30c40d6ee4fdedc24bb (diff)
downloadsoong-78ea2f5eacd31b66ab148cd76bd87763b7745bf3.tar.gz
Revert "Add debug ramdisk variant"
This reverts commit f84e9c05e2103149162e4a78a68f20c164fbbba2. Because this breaks the usage of boot-debug.img and vendor_boot-debug.img Bug: 185970130 Bug: 185990198 Test: make bootimage_debug Change-Id: I7886c971982faae1d5bc34688643de8d94d6e201
-rw-r--r--android/arch.go2
-rw-r--r--android/image.go11
-rw-r--r--android/module.go17
-rw-r--r--android/paths.go16
-rw-r--r--android/paths_test.go26
-rw-r--r--cc/genrule.go4
-rw-r--r--cc/image.go4
-rw-r--r--cc/snapshot_prebuilt.go4
-rw-r--r--etc/prebuilt_etc.go28
-rw-r--r--genrule/genrule.go1
-rw-r--r--rust/image.go4
-rw-r--r--sh/sh_binary.go4
12 files changed, 2 insertions, 119 deletions
diff --git a/android/arch.go b/android/arch.go
index 9f937522f..20fcc9598 100644
--- a/android/arch.go
+++ b/android/arch.go
@@ -617,7 +617,7 @@ func archMutator(bpctx blueprint.BottomUpMutatorContext) {
}
// only the primary arch in the ramdisk / vendor_ramdisk / recovery partition
- if os == Android && (module.InstallInRecovery() || module.InstallInRamdisk() || module.InstallInVendorRamdisk() || module.InstallInDebugRamdisk()) {
+ if os == Android && (module.InstallInRecovery() || module.InstallInRamdisk() || module.InstallInVendorRamdisk()) {
osTargets = []Target{osTargets[0]}
}
diff --git a/android/image.go b/android/image.go
index bdb9be04d..1a1a423e2 100644
--- a/android/image.go
+++ b/android/image.go
@@ -30,11 +30,6 @@ type ImageInterface interface {
// vendor ramdisk partition).
VendorRamdiskVariantNeeded(ctx BaseModuleContext) bool
- // DebugRamdiskVariantNeeded should return true if the module needs a debug ramdisk variant (installed on the
- // debug ramdisk partition: $(PRODUCT_OUT)/debug_ramdisk/first_stage_ramdisk if BOARD_USES_RECOVERY_AS_ROOT is
- // true, $(PRODUCT_OUT)/debug_ramdisk otherise).
- DebugRamdiskVariantNeeded(ctx BaseModuleContext) bool
-
// RecoveryVariantNeeded should return true if the module needs a recovery variant (installed on the
// recovery partition).
RecoveryVariantNeeded(ctx BaseModuleContext) bool
@@ -65,9 +60,6 @@ const (
// VendorRamdiskVariation means a module to be installed to vendor ramdisk image.
VendorRamdiskVariation string = "vendor_ramdisk"
-
- // DebugRamdiskVariation means a module to be installed to debug ramdisk image.
- DebugRamdiskVariation string = "debug_ramdisk"
)
// imageMutator creates variants for modules that implement the ImageInterface that
@@ -91,9 +83,6 @@ func imageMutator(ctx BottomUpMutatorContext) {
if m.VendorRamdiskVariantNeeded(ctx) {
variations = append(variations, VendorRamdiskVariation)
}
- if m.DebugRamdiskVariantNeeded(ctx) {
- variations = append(variations, DebugRamdiskVariation)
- }
if m.RecoveryVariantNeeded(ctx) {
variations = append(variations, RecoveryVariation)
}
diff --git a/android/module.go b/android/module.go
index 942e07193..9f923e2d0 100644
--- a/android/module.go
+++ b/android/module.go
@@ -393,7 +393,6 @@ type ModuleContext interface {
InstallInSanitizerDir() bool
InstallInRamdisk() bool
InstallInVendorRamdisk() bool
- InstallInDebugRamdisk() bool
InstallInRecovery() bool
InstallInRoot() bool
InstallBypassMake() bool
@@ -451,7 +450,6 @@ type Module interface {
InstallInSanitizerDir() bool
InstallInRamdisk() bool
InstallInVendorRamdisk() bool
- InstallInDebugRamdisk() bool
InstallInRecovery() bool
InstallInRoot() bool
InstallBypassMake() bool
@@ -755,9 +753,6 @@ 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"`
@@ -1545,10 +1540,6 @@ 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)
}
@@ -1602,10 +1593,6 @@ 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
}
@@ -2561,10 +2548,6 @@ 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()
}
diff --git a/android/paths.go b/android/paths.go
index 026cb8747..93c5684f3 100644
--- a/android/paths.go
+++ b/android/paths.go
@@ -106,7 +106,6 @@ type ModuleInstallPathContext interface {
InstallInSanitizerDir() bool
InstallInRamdisk() bool
InstallInVendorRamdisk() bool
- InstallInDebugRamdisk() bool
InstallInRecovery() bool
InstallInRoot() bool
InstallBypassMake() bool
@@ -1690,16 +1689,6 @@ func modulePartition(ctx ModuleInstallPathContext, os OsType) string {
if !ctx.InstallInRoot() {
partition += "/system"
}
- } else if ctx.InstallInDebugRamdisk() {
- // The module is only available after switching root into
- // /first_stage_ramdisk. To expose the module before switching root
- // on a device without a dedicated recovery partition, install the
- // recovery variant.
- if ctx.DeviceConfig().BoardUsesRecoveryAsBoot() {
- partition = "debug_ramdisk/first_stage_ramdisk"
- } else {
- partition = "debug_ramdisk"
- }
} else if ctx.InstallInRecovery() {
if ctx.InstallInRoot() {
partition = "recovery/root"
@@ -1870,7 +1859,6 @@ type testModuleInstallPathContext struct {
inSanitizerDir bool
inRamdisk bool
inVendorRamdisk bool
- inDebugRamdisk bool
inRecovery bool
inRoot bool
forceOS *OsType
@@ -1903,10 +1891,6 @@ func (m testModuleInstallPathContext) InstallInVendorRamdisk() bool {
return m.inVendorRamdisk
}
-func (m testModuleInstallPathContext) InstallInDebugRamdisk() bool {
- return m.inDebugRamdisk
-}
-
func (m testModuleInstallPathContext) InstallInRecovery() bool {
return m.inRecovery
}
diff --git a/android/paths_test.go b/android/paths_test.go
index cb9138b98..6ec75b42b 100644
--- a/android/paths_test.go
+++ b/android/paths_test.go
@@ -395,19 +395,6 @@ func TestPathForModuleInstall(t *testing.T) {
partitionDir: "target/product/test_device/vendor_ramdisk",
},
{
- name: "debug_ramdisk binary",
- ctx: &testModuleInstallPathContext{
- baseModuleContext: baseModuleContext{
- os: deviceTarget.Os,
- target: deviceTarget,
- },
- inDebugRamdisk: true,
- },
- in: []string{"my_test"},
- out: "target/product/test_device/debug_ramdisk/my_test",
- partitionDir: "target/product/test_device/debug_ramdisk",
- },
- {
name: "system native test binary",
ctx: &testModuleInstallPathContext{
baseModuleContext: baseModuleContext{
@@ -746,19 +733,6 @@ func TestPathForModuleInstallRecoveryAsBoot(t *testing.T) {
out: "target/product/test_device/vendor_ramdisk/first_stage_ramdisk/my_test",
partitionDir: "target/product/test_device/vendor_ramdisk/first_stage_ramdisk",
},
- {
- name: "debug_ramdisk binary",
- ctx: &testModuleInstallPathContext{
- baseModuleContext: baseModuleContext{
- os: deviceTarget.Os,
- target: deviceTarget,
- },
- inDebugRamdisk: true,
- },
- in: []string{"my_test"},
- out: "target/product/test_device/debug_ramdisk/first_stage_ramdisk/my_test",
- partitionDir: "target/product/test_device/debug_ramdisk/first_stage_ramdisk",
- },
}
for _, tc := range testCases {
diff --git a/cc/genrule.go b/cc/genrule.go
index 82d7205da..ca4fda7e2 100644
--- a/cc/genrule.go
+++ b/cc/genrule.go
@@ -75,10 +75,6 @@ func (g *GenruleExtraProperties) VendorRamdiskVariantNeeded(ctx android.BaseModu
return Bool(g.Vendor_ramdisk_available)
}
-func (g *GenruleExtraProperties) DebugRamdiskVariantNeeded(ctx android.BaseModuleContext) bool {
- return false
-}
-
func (g *GenruleExtraProperties) RecoveryVariantNeeded(ctx android.BaseModuleContext) bool {
// If the build is using a snapshot, the recovery variant under AOSP directories
// is not needed.
diff --git a/cc/image.go b/cc/image.go
index bf662c64f..c1e5dfeec 100644
--- a/cc/image.go
+++ b/cc/image.go
@@ -601,10 +601,6 @@ func (c *Module) VendorRamdiskVariantNeeded(ctx android.BaseModuleContext) bool
return c.Properties.VendorRamdiskVariantNeeded
}
-func (c *Module) DebugRamdiskVariantNeeded(ctx android.BaseModuleContext) bool {
- return false
-}
-
func (c *Module) RecoveryVariantNeeded(ctx android.BaseModuleContext) bool {
return c.Properties.RecoveryVariantNeeded
}
diff --git a/cc/snapshot_prebuilt.go b/cc/snapshot_prebuilt.go
index 885a0ce6d..c12ad7920 100644
--- a/cc/snapshot_prebuilt.go
+++ b/cc/snapshot_prebuilt.go
@@ -308,10 +308,6 @@ func (s *snapshot) VendorRamdiskVariantNeeded(ctx android.BaseModuleContext) boo
return false
}
-func (s *snapshot) DebugRamdiskVariantNeeded(ctx android.BaseModuleContext) bool {
- return false
-}
-
func (s *snapshot) RecoveryVariantNeeded(ctx android.BaseModuleContext) bool {
return false
}
diff --git a/etc/prebuilt_etc.go b/etc/prebuilt_etc.go
index 3204e706e..6e502b76a 100644
--- a/etc/prebuilt_etc.go
+++ b/etc/prebuilt_etc.go
@@ -84,13 +84,6 @@ type prebuiltEtcProperties struct {
// the recovery variant instead.
Vendor_ramdisk_available *bool
- // Make this module available when building for debug ramdisk.
- // On device without a dedicated recovery partition, the module is only
- // available after switching root into
- // /first_stage_ramdisk. To expose the module before switching root, install
- // the recovery variant instead.
- Debug_ramdisk_available *bool
-
// Make this module available when building for recovery.
Recovery_available *bool
@@ -166,18 +159,6 @@ func (p *PrebuiltEtc) InstallInVendorRamdisk() bool {
return p.inVendorRamdisk()
}
-func (p *PrebuiltEtc) inDebugRamdisk() bool {
- return p.ModuleBase.InDebugRamdisk() || p.ModuleBase.InstallInDebugRamdisk()
-}
-
-func (p *PrebuiltEtc) onlyInDebugRamdisk() bool {
- return p.ModuleBase.InstallInDebugRamdisk()
-}
-
-func (p *PrebuiltEtc) InstallInDebugRamdisk() bool {
- return p.inDebugRamdisk()
-}
-
func (p *PrebuiltEtc) inRecovery() bool {
return p.ModuleBase.InRecovery() || p.ModuleBase.InstallInRecovery()
}
@@ -196,7 +177,7 @@ func (p *PrebuiltEtc) ImageMutatorBegin(ctx android.BaseModuleContext) {}
func (p *PrebuiltEtc) CoreVariantNeeded(ctx android.BaseModuleContext) bool {
return !p.ModuleBase.InstallInRecovery() && !p.ModuleBase.InstallInRamdisk() &&
- !p.ModuleBase.InstallInVendorRamdisk() && !p.ModuleBase.InstallInDebugRamdisk()
+ !p.ModuleBase.InstallInVendorRamdisk()
}
func (p *PrebuiltEtc) RamdiskVariantNeeded(ctx android.BaseModuleContext) bool {
@@ -207,10 +188,6 @@ func (p *PrebuiltEtc) VendorRamdiskVariantNeeded(ctx android.BaseModuleContext)
return proptools.Bool(p.properties.Vendor_ramdisk_available) || p.ModuleBase.InstallInVendorRamdisk()
}
-func (p *PrebuiltEtc) DebugRamdiskVariantNeeded(ctx android.BaseModuleContext) bool {
- return proptools.Bool(p.properties.Debug_ramdisk_available) || p.ModuleBase.InstallInDebugRamdisk()
-}
-
func (p *PrebuiltEtc) RecoveryVariantNeeded(ctx android.BaseModuleContext) bool {
return proptools.Bool(p.properties.Recovery_available) || p.ModuleBase.InstallInRecovery()
}
@@ -336,9 +313,6 @@ func (p *PrebuiltEtc) AndroidMkEntries() []android.AndroidMkEntries {
if p.inVendorRamdisk() && !p.onlyInVendorRamdisk() {
nameSuffix = ".vendor_ramdisk"
}
- if p.inDebugRamdisk() && !p.onlyInDebugRamdisk() {
- nameSuffix = ".debug_ramdisk"
- }
if p.inRecovery() && !p.onlyInRecovery() {
nameSuffix = ".recovery"
}
diff --git a/genrule/genrule.go b/genrule/genrule.go
index 77dae755a..b426b207a 100644
--- a/genrule/genrule.go
+++ b/genrule/genrule.go
@@ -626,7 +626,6 @@ func (x noopImageInterface) ImageMutatorBegin(android.BaseModuleContext)
func (x noopImageInterface) CoreVariantNeeded(android.BaseModuleContext) bool { return false }
func (x noopImageInterface) RamdiskVariantNeeded(android.BaseModuleContext) bool { return false }
func (x noopImageInterface) VendorRamdiskVariantNeeded(android.BaseModuleContext) bool { return false }
-func (x noopImageInterface) DebugRamdiskVariantNeeded(android.BaseModuleContext) bool { return false }
func (x noopImageInterface) RecoveryVariantNeeded(android.BaseModuleContext) bool { return false }
func (x noopImageInterface) ExtraImageVariations(ctx android.BaseModuleContext) []string { return nil }
func (x noopImageInterface) SetImageVariation(ctx android.BaseModuleContext, variation string, module android.Module) {
diff --git a/rust/image.go b/rust/image.go
index 900842ec8..7eb49d962 100644
--- a/rust/image.go
+++ b/rust/image.go
@@ -97,10 +97,6 @@ func (mod *Module) RamdiskVariantNeeded(android.BaseModuleContext) bool {
return mod.InRamdisk()
}
-func (mod *Module) DebugRamdiskVariantNeeded(ctx android.BaseModuleContext) bool {
- return false
-}
-
func (mod *Module) RecoveryVariantNeeded(android.BaseModuleContext) bool {
return mod.InRecovery()
}
diff --git a/sh/sh_binary.go b/sh/sh_binary.go
index 42d5680f1..662338133 100644
--- a/sh/sh_binary.go
+++ b/sh/sh_binary.go
@@ -210,10 +210,6 @@ func (s *ShBinary) VendorRamdiskVariantNeeded(ctx android.BaseModuleContext) boo
return proptools.Bool(s.properties.Vendor_ramdisk_available) || s.ModuleBase.InstallInVendorRamdisk()
}
-func (s *ShBinary) DebugRamdiskVariantNeeded(ctx android.BaseModuleContext) bool {
- return false
-}
-
func (s *ShBinary) RecoveryVariantNeeded(ctx android.BaseModuleContext) bool {
return proptools.Bool(s.properties.Recovery_available) || s.ModuleBase.InstallInRecovery()
}