Add debug ramdisk variant.
A module will be installed to /debug_ramdisk if debug_ramdisk is set to
true.
This is a reland of f84e9c05e2
, with a fix
that removes /first_stage_ramdisk.
Bug: 184004542
Test: soong test
Change-Id: I739de63cfec6b0fec5a90f7c4741fc4d884d209c
This commit is contained in:
@@ -30,6 +30,10 @@ 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).
|
||||
DebugRamdiskVariantNeeded(ctx BaseModuleContext) bool
|
||||
|
||||
// RecoveryVariantNeeded should return true if the module needs a recovery variant (installed on the
|
||||
// recovery partition).
|
||||
RecoveryVariantNeeded(ctx BaseModuleContext) bool
|
||||
@@ -60,6 +64,9 @@ 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
|
||||
@@ -83,6 +90,9 @@ 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)
|
||||
}
|
||||
|
Reference in New Issue
Block a user